28 BankWin(
const String &filename,
unsigned short bankID,
bool promptForMissingFiles);
123 void GetSampleUsers(std::vector<String> &names, std::vector<int> &sampleDescIDs,
int sampleID);
150 if (name.
size() > 0) {
194 bool mAudioDataDirty;
198 bool mPromptForMissingFiles;
200 std::map<int, InstrumentWin *> mInstruments;
201 std::map<int, SampleWin *> mSamples;
~BankWin()
Delete the instruments and samples.
int DeleteSample(int sampleID, std::map< int, int > &removed)
Delete a sample and every sample description that plays it.
std::map< int, SampleWin * > & GetSamples()
Report the samples.
Definition BankWin.h:187
std::map< int, InstrumentWin * > & GetInstruments()
Report the instruments.
Definition BankWin.h:178
int NewSample(const String &filename, bool *alreadyExists)
Add a sample made from a WAV file, unless one is already made from it.
String GetSampleInfo(unsigned short sampleID)
Describe a sample: its name, its file, its format, and the instruments that play it.
String & GetName()
Report the name.
Definition BankWin.h:140
bool HasDuplicateProgramIds()
Report whether two instruments share a program number.
BankWin(const String &filename, unsigned short bankID, bool promptForMissingFiles)
Create a bank, loading it when a file is given.
void SetName(const String &name)
Rename the bank, unless the new name is empty.
Definition BankWin.h:149
int NewInstrument(unsigned short program)
Add an instrument.
int DeleteInstrument(int instrumentID, std::vector< int > &sampleIDs)
Delete an instrument.
Bank & GetBank()
Report the header.
Definition BankWin.h:169
int Save(const String &filename, bool forceAudioData)
Write the bank file, and the audio data file when the samples changed or it is requested.
friend class CSyntheditCtrl
Definition BankWin.h:192
String & GetFilename()
Report the path of the bank file.
Definition BankWin.h:160
int GetID() const
Report the identifier.
Definition BankWin.h:131
int Load()
Replace the contents with those of the bank file.
void GetSampleUsers(std::vector< String > &names, std::vector< int > &sampleDescIDs, int sampleID)
List the sample descriptions that play a sample.
An instrument bank: its header, programs, sample descriptors, and samples, and where its waveforms si...
Definition bank.h:17
Growable text buffer that is also a PrnStream.
Definition string.h:19
unsigned int size() const
Definition Str.h:226