EasyManua.ls Logo

TC Electronic M5000 - Spontaneous Data-Emissions; Conversion Routines; Convertmiditopar; Convertpartomidi

TC Electronic M5000
203 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Chapter 2: Individual Parameter-Access 5
Note: If you set a parameter that hasn’t yet been extracted from the queue, the queue-entry for the
given parameter is updated to hold the new value. This means that you don’t need to worry about
placing delays in the MIDI data-stream while the user is dragging a slider in a patch-editor.
Simply transmit the new value for the given parameter every time the slider is moved.
The parameter-queue in the M5000 holds 32 messages. If you are setting up an algorithm like
TAPFAC-1 or DYNAMIC1 (which have more than 32 parameters), you must place slight delays in
the MIDI data-stream. Some special parameters take some time to recalculate (you will know these
parameters from the M5000 front panel). Instead of having a specific delay for each parameter-type,
you should simply transmit the parameters at a pace that works.
2.5 Spontaneous Data-Emissions
The M5000 will generally never output parameter-packets spontaneously. However Recall Preset
packet will be transmitted if the user recalls a preset via the front-panel or an ATAC.
Meters are never transmitted spontaneously, but must be polled.
2.6 Conversion Routines
2.6.1 convertMIDItoPar
The following routine combines the two MIDI-bytes that identify the parameter-ID and return a
single unsigned short:
unsigned short convertMIDItoPar(char byte1, char byte2)
{
return byte2+(byte1 << 7);
}
2.6.2 convertPartoMIDI
The following routine derives the two MIDI-bytes that identify the parameter-ID from a single short:
void convertMIDItoPar(unsigned short parNo, char *byte1,
char *byte2)
{
*byte1=parNo >> 7;
*byte2=parNo & 0x7f;
}
2.6.3 convertMIDItoValue
The following routine combines the two MIDI-bytes that identify the parameter-value and return a
single short:
short convertMIDItoValue(char byte1, char byte2)
{
short value;
value=(byte2 & 0x7f) + ( (short) (byte1 & 0x7f) << 7);
if (value & 0x2000) i |= 0xc000; // Extend sign bit
return value;
}

Table of Contents

Other manuals for TC Electronic M5000

Related product manuals