|
|
The Ins
namespace contains classes that implement the Cakewalk
instrument file parsing routines and provide name lookup for bank/patch
and controller numbers.
The facilities offered here are utilities that an application may use, and are not part of the core TSE3 functionality.
The TSE3::Ins::CakewalkInstrumentFile class is the main entrance
onto Ins
facilities.
You can get Cakewalk instrument definition files for practically
every piece of MIDI hardware in existence, which is why they have been
adopted by the TSE3 library. They are most easily obtained from the
www
.cakewalk.com website; follow the "Download" link and select
"Instrument Definitions".
See also: TSE3
Destination (class) | Destination |
The Destination class is a simple utility class that can be used to associate Instrument definitions with MIDI outputs (channel/port pairs).
An application can use this to remember what sort of instrument definition to use for which output; to present the correct program change information to the user, for example.
For each port, you may choose one Instrument for every channel, or may select a number of different Instrument objects for the different individual channels.
You may also leave a particular definition unspecified (as zero).
The Destination class has a secondary purpose of keeping track of all the currently used Instrument objects, keeping the list of desinations up to date if any Instrument is removed.
Since this class operates independantly of a TSE3::MidiScheduler it cannot track what port numbers are currently valid, and which are not.
See also: Instrument
PatchData (class) | PatchData |
This class represents a group of related patches - they will have the same bank select values.
ControlData (class) | ControlData |
This class represents a group of MIDI control change defintions.
RpnData (class) | RpnData |
This class represents a group of RPN defintions.
NrpnData (class) | NrpnData |
This class represents a group of NRPN defintions.
NoteData (class) | NoteData |
This class represents a group of note names.
inline int bankToLSB (int bank)
| bankToLSB |
Bank select values can be expressed as single 14 bit numbers (Cakewalk instrument files use this format) or as separate LSB and MSBs (the MIDI format uses this format).
This function converts a 14 bit bank number into the LSB portion.
If bank
is -1, returns -1.
Parameters:
bank | 14 bit bank select number |
Returns: LSB value
See also: bankMSB, bankFromBytes
inline int bankToMSB (int bank)
| bankToMSB |
Bank select values can be expressed as single 14 bit numbers (Cakewalk instrument files use this format) or as separate LSB and MSBs (the MIDI format uses this format).
This function converts a 14 bit bank number into the MSB portion.
If bank
is -1, returns -1.
Parameters:
bank | 14 bit bank select number |
Returns: MSB value
See also: bankLSB, bankFromBytes
inline int bankFromBytes (int bankLSB, int bankMSB)
| bankFromBytes |
Bank select values can be expressed as single 14 bit numbers (Cakewalk instrument files use this format) or as separate LSB and MSBs (the MIDI format uses this format).
This function converts a bank LSB and MSB into a 14 bit bank number.
If bank
is -1, returns -1.
Parameters:
bankLSB | Bank LSB value |
bankMSB | Bank MSB value |
Returns: bank 14 bit bank select number
See also: bankLSB, bankMSB
Voice (struct) | Voice |
A Voice struct holds information about a voice - the bank and patch
values. It is based on pair
Bank values are defined to be (MSB<<7)+LSB.
The value -1 denotes a wildcard - it matches any bank/patch.
This is a value type.
Instrument (class) | Instrument |
The Instrument class holds information about a specific MIDI instrument. This includes the voices it provides, control commands it understands, drum note names and so on.
The Instrument class is based on the instrument definitions supplied in Cakewalk .ins instrument definition files.
InstrumentData (class) | InstrumentData |
A base class for instrument data: many .ins file sections are based on simple lists of 0..127 values. This is a base class for such lists.
CakewalkInstrumentFile (class) | CakewalkInstrumentFile |
The class represents a Cakewalk .ins file.
It provides a mechanism for listing all instruments provided by a particular .ins file, and for creating an Instrument object from it.
The .ins file format is not documented. However, the documentation that ships with the TSE3 library contains a description of this format.
See also: Instrument