break;
case 2: // octave shift - 0x00, 0x01, 0x02, 0x03, 0x04, 0x81, 0x82, 0x83, 0x84
smafMessage = new OctaveShiftMessage(duration, channel, value);
break;
case 3: // modulation - 0x00 ~ 0x7f
smafMessage = new ModulationMessage(duration, channel, value);
break;
case 4: // pitch bend - 0x00 ~ 0x40 ~ 0x7f
smafMessage = new PitchBendMessage(duration, channel, value << 7);
break;
case 7: // volume - 0x00 ~ 0x7f
smafMessage = new VolumeMessage(duration, channel, value);
break;
case 0x0a: // pan - 0x00 ~ x040 ~ 0x7f
smafMessage = new PanMessage(duration, channel, value);
break;
case 0x0b: // expression - normal: 0x00 ~ 0x7f
smafMessage = new ExpressionMessage(duration, channel, value);
break;
default:
smafMessage = new UndefinedMessage(duration);
Debug.println("unknown 0x00, 0x" + StringUtil.toHex2(e2) + ", 3, " + StringUtil.toHex2(data));
break;
}
break;
case 2: // modulation (short) 0x01 ~ 0x0e
smafMessage = new ModulationMessage(duration, channel, modulationTable[data]);
break;
case 1: // pitch bend (short) 0x01 ~ 0x0e
smafMessage = new PitchBendMessage(duration, channel, (data * 8) << 7);
break;
case 0: // expression (short) 0x01 ~ 0x0e