wavelength 1.0.0
Loading...
Searching...
No Matches
InstrumentWin Class Reference

Editor view of one instrument of a bank and its sample descriptions. More...

#include <InstrumentWin.h>

Public Member Functions

 InstrumentWin (unsigned short program)
 Create an instrument, named after its identifier.
 ~InstrumentWin ()
 Delete the sample descriptions.
int AttachSample (SampleWin *iSampleWin)
 Add a sample description that plays a sample, named after the sample, on the key after the highest base key in use.
int SetDefaultKeymap (SampleDescWin *sdw)
 Put a sample description on the key after the highest base key of the instrument, or on key zero when none is in use or the next key is out of range.
int DeleteSampleDescription (int sampleDescID)
 Remove and delete a sample description.
int RemoveSample (SampleWin *sampleWin, std::map< int, int > &removed)
 Remove and delete every sample description that plays a sample.
int GetID () const
 Report the identifier.
String & GetName ()
 Report the name.
void SetName (const String &name)
 Rename the instrument, unless the new name is empty.
Instrument & GetInstrument ()
 Report the program settings.
std::map< int, SampleDescWin * > & GetSampleDescs ()
 Report the sample descriptions.

Detailed Description

Editor view of one instrument of a bank and its sample descriptions.

The class has no RTTI, and its name comes from the assert text of its users. The object is 0x2c bytes. It deletes its sample descriptions. Its routines are in BankManager.cpp.

Constructor & Destructor Documentation

◆ InstrumentWin()

InstrumentWin::InstrumentWin ( unsigned short program)
explicit

Create an instrument, named after its identifier.

Parameters
programThe program number.
Ghidra address:
0x1001c1c4

◆ ~InstrumentWin()

InstrumentWin::~InstrumentWin ( )

Delete the sample descriptions.

Ghidra address:
0x1001c279

Member Function Documentation

◆ AttachSample()

int InstrumentWin::AttachSample ( SampleWin * iSampleWin)

Add a sample description that plays a sample, named after the sample, on the key after the highest base key in use.

Parameters
iSampleWinThe sample.
Returns
The identifier of the new SampleDescWin.
Ghidra address:
0x1001fb6c

◆ SetDefaultKeymap()

int InstrumentWin::SetDefaultKeymap ( SampleDescWin * sdw)

Put a sample description on the key after the highest base key of the instrument, or on key zero when none is in use or the next key is out of range.

Parameters
sdwThe sample description.
Returns
Zero.
Ghidra address:
0x1001fc9b

◆ DeleteSampleDescription()

int InstrumentWin::DeleteSampleDescription ( int sampleDescID)

Remove and delete a sample description.

Parameters
sampleDescIDThe identifier of the SampleDescWin.
Returns
Zero.
Ghidra address:
0x1001ff03

◆ RemoveSample()

int InstrumentWin::RemoveSample ( SampleWin * sampleWin,
std::map< int, int > & removed )

Remove and delete every sample description that plays a sample.

Parameters
sampleWinThe sample.
removedReceives the identifier of the instrument under the identifier of each removed SampleDescWin.
Returns
Zero.
Ghidra address:
0x1001ff52

◆ GetID()

int InstrumentWin::GetID ( ) const
inline

Report the identifier.

Returns
The identifier.

◆ GetName()

String & InstrumentWin::GetName ( )
inline

Report the name.

Returns
The name.

◆ SetName()

void InstrumentWin::SetName ( const String & name)
inline

Rename the instrument, unless the new name is empty.

Parameters
nameThe new name.

◆ GetInstrument()

Instrument & InstrumentWin::GetInstrument ( )
inline

Report the program settings.

Returns
The settings.

◆ GetSampleDescs()

std::map< int, SampleDescWin * > & InstrumentWin::GetSampleDescs ( )
inline

Report the sample descriptions.

Returns
The sample descriptions by identifier.

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