[sdiy] FW: FW: Communications with voices in a polyphonic synth
Jerry Gray-Eskue
jerryge at cableone.net
Fri Mar 12 14:44:51 CET 2010
Achim correctly pointed out that the code I posted needs to handle Real Time
messages, here is the change:
Thanks Achim
============ Original =============
...
if(MidiByte >= 0x80)
{
// STATUS Byte
MidiType = MidiByte;
if (MidiChannel != 0x0f) // Channel 16 for OMNI
{
if((MidiByte & 0x0f) != MidiChannel)
{
MidiType = 0;
}
}
DataByteCount = 0;
}
else
{
// Data Byte
switch(MidiType & 0xf0)
...
============================================
=========== Minimum Change To ==============
...
if(MidiByte >= 0x80)
{
if(MidiByte >= 0xf8)
{
//System Real Time Messages
}
else
{
// STATUS Byte
MidiType = MidiByte;
if (MidiChannel != 0x0f) // Channel 16 for OMNI
{
if((MidiByte & 0x0f) != MidiChannel)
{
MidiType = 0;
}
}
DataByteCount = 0;
}
}
else
{
// Data Byte
switch(MidiType & 0xf0)
...
============================================================================
========
=========== Change To With Placeholders for System Real Time Messages
==============
...
if(MidiByte >= 0x80)
{
if(MidiByte >= 0xf8)
{
//System Real Time Messages
//============================
// System Common Messages 0xf1 - 0xf7
// are not supported - If needed Add single byte messages here
// multi byte message cases in switch(MidiType & 0xf0) below
// NOTE: 0xf7 is EOX - end of System Exclusive
// if supported look for it and finish the Sys Ex task here
/* Placeholder
switch(MidiByte)
{
case 0xf8:
{
// Timing Clock
break;
}
case 0xf9:
{
// Undefined
break;
}
case 0xfa:
{
// Start
break;
}
case 0xfb:
{
// Continue
break;
}
case 0xfc:
{
// Stop
break;
}
case 0xfd:
{
// Undefined
break;
}
case 0xfe:
{
// Active Sensing
break;
}
case 0xff:
{
// System Reset
break;
}
}
*/
}
else
{
// STATUS Byte
MidiType = MidiByte;
if (MidiChannel != 0x0f) // Channel 16 for OMNI
{
if((MidiByte & 0x0f) != MidiChannel)
{
MidiType = 0;
}
}
DataByteCount = 0;
}
}
else
{
// Data Byte
switch(MidiType & 0xf0)
...
==========================
-----Original Message-----
From: ASSI [mailto:Stromeko at nexgo.de]
Sent: Friday, March 12, 2010 12:04 AM
To: Jerry Gray-Eskue
Subject: Re: [sdiy] FW: Communications with voices in a polyphonic synth
[off-list]
Hi Jerry,
even for this stripped down FSM you would need to handle RT messages
seperately as side-channel data, as they can come between status and
data bytes (and hence must not reset your DataByteCount).
Regards,
Achim.
--
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+
Factory and User Sound Singles for Waldorf Q+, Q and microQ:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds
More information about the Synth-diy
mailing list