|
wavelength 1.0.0
|
Editor view of one bank: its instruments, its samples, and the files it is stored in. More...
#include <BankWin.h>
Public Member Functions | |
| BankWin (const String &filename, unsigned short bankID, bool promptForMissingFiles) | |
| Create a bank, loading it when a file is given. | |
| ~BankWin () | |
| Delete the instruments and samples. | |
| bool | HasDuplicateProgramIds () |
| Report whether two instruments share a program number. | |
| int | Save (const String &filename, bool forceAudioData) |
| Write the bank file, and the audio data file when the samples changed or it is requested. | |
| int | Load () |
| Replace the contents with those of the bank file. | |
| int | NewInstrument (unsigned short program) |
| Add an instrument. | |
| int | DeleteInstrument (int instrumentID, std::vector< int > &sampleIDs) |
| Delete an instrument. | |
| String | GetSampleInfo (unsigned short sampleID) |
| Describe a sample: its name, its file, its format, and the instruments that play it. | |
| int | NewSample (const String &filename, bool *alreadyExists) |
| Add a sample made from a WAV file, unless one is already made from it. | |
| int | DeleteSample (int sampleID, std::map< int, int > &removed) |
| Delete a sample and every sample description that plays it. | |
| void | GetSampleUsers (std::vector< String > &names, std::vector< int > &sampleDescIDs, int sampleID) |
| List the sample descriptions that play a sample. | |
| int | GetID () const |
| Report the identifier. | |
| String & | GetName () |
| Report the name. | |
| void | SetName (const String &name) |
| Rename the bank, unless the new name is empty. | |
| String & | GetFilename () |
| Report the path of the bank file. | |
| Bank & | GetBank () |
| Report the header. | |
| std::map< int, InstrumentWin * > & | GetInstruments () |
| Report the instruments. | |
| std::map< int, SampleWin * > & | GetSamples () |
| Report the samples. | |
Friends | |
| class | CSyntheditCtrl |
Editor view of one bank: its instruments, its samples, and the files it is stored in.
The class has no RTTI, and its name comes from the assert text of its users. The object is 0x50 bytes. It deletes its instruments and samples. Its routines are in BankManager.cpp.
| BankWin::BankWin | ( | const String & | filename, |
| unsigned short | bankID, | ||
| bool | promptForMissingFiles ) |
Create a bank, loading it when a file is given.
| filename | The path of the bank file, or an empty string for a new bank. |
| bankID | The bank identifier. |
| promptForMissingFiles | Whether loading offers to find a replacement for a missing WAV file. |
| BankWin::~BankWin | ( | ) |
Delete the instruments and samples.
| bool BankWin::HasDuplicateProgramIds | ( | ) |
Report whether two instruments share a program number.
| int BankWin::Save | ( | const String & | filename, |
| bool | forceAudioData ) |
Write the bank file, and the audio data file when the samples changed or it is requested.
The write is refused, with a notice, when the bank breaks a limit of the console.
| filename | The path to write, or an empty string for the path the bank was loaded from. |
| forceAudioData | Whether to write the audio data file even when no sample changed. |
| int BankWin::Load | ( | ) |
Replace the contents with those of the bank file.
| int BankWin::NewInstrument | ( | unsigned short | program | ) |
Add an instrument.
A program number already in use, or below 1, becomes the one after the highest in use.
| program | The program number. |
| int BankWin::DeleteInstrument | ( | int | instrumentID, |
| std::vector< int > & | sampleIDs ) |
Delete an instrument.
| instrumentID | The identifier of the InstrumentWin. |
| sampleIDs | Receives samples the instrument played. Only a sample found at the start of the list is added. |
| String BankWin::GetSampleInfo | ( | unsigned short | sampleID | ) |
Describe a sample: its name, its file, its format, and the instruments that play it.
| sampleID | The identifier of the SampleWin. |
| int BankWin::NewSample | ( | const String & | filename, |
| bool * | alreadyExists ) |
Add a sample made from a WAV file, unless one is already made from it.
| filename | The path of the WAV file. |
| alreadyExists | Receives whether a sample already used the file. |
| int BankWin::DeleteSample | ( | int | sampleID, |
| std::map< int, int > & | removed ) |
Delete a sample and every sample description that plays it.
| sampleID | The identifier of the SampleWin. |
| removed | Receives the identifier of the instrument under the identifier of each removed SampleDescWin. |
| void BankWin::GetSampleUsers | ( | std::vector< String > & | names, |
| std::vector< int > & | sampleDescIDs, | ||
| int | sampleID ) |
List the sample descriptions that play a sample.
| names | Receives the name of each SampleDescWin. |
| sampleDescIDs | Receives the identifier of each SampleDescWin. |
| sampleID | The identifier of the SampleWin. |
|
inline |
Report the identifier.
|
inline |
Report the name.
|
inline |
Rename the bank, unless the new name is empty.
| name | The new name. |
|
inline |
Report the path of the bank file.
|
inline |
Report the header.
|
inline |
Report the instruments.
|
inline |
Report the samples.
|
friend |