libgig  4.0.0
DLS::Info Class Reference

Optional information for DLS files, instruments, samples, etc. More...

#include <DLS.h>

Classes

struct  string_length_t
 

Public Member Functions

 Info (RIFF::List *list)
 Constructor. More...
 
void SetFixedStringLengths (const string_length_t *lengths)
 Forces specific Info fields to be of a fixed length when being saved to a file. More...
 
virtual ~Info ()
 
virtual void UpdateChunks (progress_t *pProgress)
 Update chunks with current info values. More...
 
virtual void CopyAssign (const Info *orig)
 Make a deep copy of the Info object given by orig and assign it to this object. More...
 

Public Attributes

String Name
 <INAM-ck>. Stores the title of the subject of the file, such as, Seattle From Above. More...
 
String ArchivalLocation
 <IARL-ck>. Indicates where the subject of the file is stored. More...
 
String CreationDate
 <ICRD-ck>. Specifies the date the subject of the file was created. List dates in yyyy-mm-dd format. More...
 
String Comments
 <ICMT-ck>. Provides general comments about the file or the subject of the file. Sentences might end with semicolon. More...
 
String Product
 <IPRD-ck>. Specifies the name of the title the file was originally intended for, such as World Ruler V. More...
 
String Copyright
 <ICOP-ck>. Records the copyright information for the file. More...
 
String Artists
 <IART-ck>. Lists the artist of the original subject of the file. More...
 
String Genre
 <IGNR-ck>. Descirbes the original work, such as, Jazz, Classic, Rock, Techno, Rave, etc. More...
 
String Keywords
 <IKEY-ck>. Provides a list of keywords that refer to the file or subject of the file. Keywords are separated with semicolon and blank, e.g., FX; death; murder. More...
 
String Engineer
 <IENG-ck>. Stores the name of the engineer who worked on the file. Multiple engineer names are separated by semicolon and blank, e.g, Smith, John; Adams, Joe. More...
 
String Technician
 <ITCH-ck>. Identifies the technician who sampled the subject file. More...
 
String Software
 <ISFT-ck>. Identifies the name of the sofware package used to create the file. More...
 
String Medium
 <IMED-ck>. Describes the original subject of the file, such as, record, CD, and so forth. More...
 
String Source
 <ISRC-ck>. Identifies the name of the person or organization who supplied the original subject of the file. More...
 
String SourceForm
 <ISRF-ck>. Identifies the original form of the material that was digitized, such as record, sampling CD, TV sound track. This is not neccessarily the same as Medium. More...
 
String Commissioned
 <ICMS-ck>. Lists the name of the person or organization that commissioned the subject of the file, e.g., Pope Julian II. More...
 
String Subject
 <ISBJ-ck>. Describes the contents of the file. More...
 
bool UseFixedLengthStrings
 

Detailed Description

Optional information for DLS files, instruments, samples, etc.

Definition at line 305 of file DLS.h.

Constructor & Destructor Documentation

◆ Info()

DLS::Info::Info ( RIFF::List list)

Constructor.

Initializes the info strings with values provided by an INFO list chunk.

Parameters
list- pointer to a list chunk which contains an INFO list chunk

Definition at line 255 of file DLS.cpp.

References CHUNK_ID_IARL, CHUNK_ID_IART, CHUNK_ID_ICMS, CHUNK_ID_ICMT, CHUNK_ID_ICOP, CHUNK_ID_ICRD, CHUNK_ID_IENG, CHUNK_ID_IGNR, CHUNK_ID_IKEY, CHUNK_ID_IMED, CHUNK_ID_INAM, CHUNK_ID_IPRD, CHUNK_ID_ISBJ, CHUNK_ID_ISFT, CHUNK_ID_ISRC, CHUNK_ID_ISRF, CHUNK_ID_ITCH, RIFF::List::GetSubList(), LIST_TYPE_INFO, sf2::LoadString(), and DLS::Connection::Source.

◆ ~Info()

DLS::Info::~Info ( )
virtual

Definition at line 282 of file DLS.cpp.

Member Function Documentation

◆ CopyAssign()

void DLS::Info::CopyAssign ( const Info orig)
virtual

Make a deep copy of the Info object given by orig and assign it to this object.

Parameters
orig- original Info object to be copied from

Definition at line 408 of file DLS.cpp.

References ArchivalLocation, Artists, Comments, Commissioned, Copyright, CreationDate, Engineer, Genre, Keywords, Medium, Name, Product, Software, DLS::Connection::Source, Source, SourceForm, Subject, and Technician.

◆ SetFixedStringLengths()

void DLS::Info::SetFixedStringLengths ( const string_length_t lengths)

Forces specific Info fields to be of a fixed length when being saved to a file.

By default the respective RIFF chunk of an Info field will have a size analogue to its actual string length. With this method however this behavior can be overridden, allowing to force an arbitrary fixed size individually for each Info field.

This method is used as a workaround for the gig format, not for DLS.

Parameters
lengths- NULL terminated array of string_length_t elements

Definition at line 296 of file DLS.cpp.

References RIFF::List::GetSubChunk(), and sf2::LoadString().

Referenced by gig::File::File(), gig::Instrument::Instrument(), and gig::Sample::Sample().

◆ UpdateChunks()

void DLS::Info::UpdateChunks ( progress_t pProgress)
virtual

Update chunks with current info values.

Apply current INFO field values to the respective INFO chunks. You have to call File::Save() to make changes persistent.

Parameters
pProgress- callback function for progress notification

Definition at line 346 of file DLS.cpp.

References RIFF::List::AddSubList(), CHUNK_ID_IARL, CHUNK_ID_IART, CHUNK_ID_ICMS, CHUNK_ID_ICMT, CHUNK_ID_ICOP, CHUNK_ID_ICRD, CHUNK_ID_IENG, CHUNK_ID_IGNR, CHUNK_ID_IKEY, CHUNK_ID_IMED, CHUNK_ID_INAM, CHUNK_ID_IPRD, CHUNK_ID_ISBJ, CHUNK_ID_ISFT, CHUNK_ID_ISRC, CHUNK_ID_ISRF, CHUNK_ID_ITCH, RIFF::List::GetListType(), RIFF::List::GetSubList(), DLS::libraryName(), DLS::libraryVersion(), LIST_TYPE_INFO, LIST_TYPE_INS, RIFF_TYPE_DLS, and DLS::Connection::Source.

Member Data Documentation

◆ ArchivalLocation

String DLS::Info::ArchivalLocation

<IARL-ck>. Indicates where the subject of the file is stored.

Definition at line 308 of file DLS.h.

Referenced by CopyAssign(), and gig::File::File().

◆ Artists

String DLS::Info::Artists

<IART-ck>. Lists the artist of the original subject of the file.

Definition at line 313 of file DLS.h.

Referenced by CopyAssign().

◆ Comments

String DLS::Info::Comments

<ICMT-ck>. Provides general comments about the file or the subject of the file. Sentences might end with semicolon.

Definition at line 310 of file DLS.h.

Referenced by CopyAssign().

◆ Commissioned

String DLS::Info::Commissioned

<ICMS-ck>. Lists the name of the person or organization that commissioned the subject of the file, e.g., Pope Julian II.

Definition at line 322 of file DLS.h.

Referenced by CopyAssign().

◆ Copyright

String DLS::Info::Copyright

<ICOP-ck>. Records the copyright information for the file.

Definition at line 312 of file DLS.h.

Referenced by CopyAssign().

◆ CreationDate

String DLS::Info::CreationDate

<ICRD-ck>. Specifies the date the subject of the file was created. List dates in yyyy-mm-dd format.

Definition at line 309 of file DLS.h.

Referenced by CopyAssign().

◆ Engineer

String DLS::Info::Engineer

<IENG-ck>. Stores the name of the engineer who worked on the file. Multiple engineer names are separated by semicolon and blank, e.g, Smith, John; Adams, Joe.

Definition at line 316 of file DLS.h.

Referenced by CopyAssign().

◆ Genre

String DLS::Info::Genre

<IGNR-ck>. Descirbes the original work, such as, Jazz, Classic, Rock, Techno, Rave, etc.

Definition at line 314 of file DLS.h.

Referenced by CopyAssign().

◆ Keywords

String DLS::Info::Keywords

<IKEY-ck>. Provides a list of keywords that refer to the file or subject of the file. Keywords are separated with semicolon and blank, e.g., FX; death; murder.

Definition at line 315 of file DLS.h.

Referenced by CopyAssign().

◆ Medium

String DLS::Info::Medium

<IMED-ck>. Describes the original subject of the file, such as, record, CD, and so forth.

Definition at line 319 of file DLS.h.

Referenced by CopyAssign().

◆ Name

String DLS::Info::Name

<INAM-ck>. Stores the title of the subject of the file, such as, Seattle From Above.

Definition at line 307 of file DLS.h.

Referenced by CopyAssign().

◆ Product

String DLS::Info::Product

<IPRD-ck>. Specifies the name of the title the file was originally intended for, such as World Ruler V.

Definition at line 311 of file DLS.h.

Referenced by CopyAssign().

◆ Software

String DLS::Info::Software

<ISFT-ck>. Identifies the name of the sofware package used to create the file.

Definition at line 318 of file DLS.h.

Referenced by gig::File::AddInstrument(), and CopyAssign().

◆ Source

String DLS::Info::Source

<ISRC-ck>. Identifies the name of the person or organization who supplied the original subject of the file.

Definition at line 320 of file DLS.h.

Referenced by CopyAssign().

◆ SourceForm

String DLS::Info::SourceForm

<ISRF-ck>. Identifies the original form of the material that was digitized, such as record, sampling CD, TV sound track. This is not neccessarily the same as Medium.

Definition at line 321 of file DLS.h.

Referenced by CopyAssign().

◆ Subject

String DLS::Info::Subject

<ISBJ-ck>. Describes the contents of the file.

Definition at line 323 of file DLS.h.

Referenced by CopyAssign().

◆ Technician

String DLS::Info::Technician

<ITCH-ck>. Identifies the technician who sampled the subject file.

Definition at line 317 of file DLS.h.

Referenced by CopyAssign().

◆ UseFixedLengthStrings

bool DLS::Info::UseFixedLengthStrings
Deprecated:
Not used anymore, use SetFixedStringLengths() instead.

Definition at line 324 of file DLS.h.


The documentation for this class was generated from the following files: