18 MIDIParserFrom::MIDIParserFrom() :
24 MIDIParserFrom::~MIDIParserFrom()
33 address = kTTAdrsEmpty;
38 TTUInt8 command = statusByte & 0xF0;
39 TTUInt8 channel = (statusByte & 0x0F) + 1;
42 if (!sysex && command == 240 && channel == 1) {
53 if (command == 247 && channel == 1) {
61 if (
TTUInt8(dataByte1) == 247) {
69 if (
TTUInt8(dataByte2) == 247) {
82 editAddress(
"/channel.%ld", channel, channelPart);
91 editAddress(
"note.%ld", dataByte1, commandPart);
97 editAddress(
"note.%ld", dataByte1, commandPart);
103 editAddress(
"pressure.%ld", dataByte1, commandPart);
109 editAddress(
"control.%ld", dataByte1, commandPart);
115 editAddress(
"program.%ld", dataByte1, commandPart);
136 channelPart = kTTAdrsRoot;
137 editAddress(
"undefined.%ld", command, commandPart);
143 channelPart = kTTAdrsRoot;
144 commandPart =
TTAddress(
"song/position");
153 channelPart = kTTAdrsRoot;
160 channelPart = kTTAdrsRoot;
161 editAddress(
"undefined.%ld", command, commandPart);
167 channelPart = kTTAdrsRoot;
168 editAddress(
"undefined.%ld", command, commandPart);
186 channelPart = kTTAdrsRoot;
187 editAddress(
"undefined.%ld", command, commandPart);
211 channelPart = kTTAdrsRoot;
212 editAddress(
"undefined.%ld", command, commandPart);
218 commandPart =
TTAddress(
"active_sensing");
230 channelPart = kTTAdrsRoot;
231 editAddress(
"undefined.%ld", command, commandPart);
254 s_num = (
char *)malloc(
sizeof(
char)*len);
255 snprintf(s_num, len, format.
c_str(), i);
TTAddress appendAddress(const TTAddress &toAppend)
Return a new TTAddress with the appended part.
bool TTBoolean
Boolean flag, same as Boolean on the Mac.
std::uint16_t TTUInt16
16 bit unsigned integer
edit /channel.N/command.M TTAddress and a TTValue from incoming bytes
const char * c_str() const
Return a pointer to the internal C-string.
The TTAddress class is used to represent a string and efficiently pass and compare that string...
float TTFloat32
32 bit floating point number
std::int32_t TTInt32
32 bit signed integer
std::uint32_t TTUInt32
32 bit unsigned integer
size_t size() const
Find out the length of a string.
The TTString class is used to represent a string.
[doxygenAppendixC_copyExample]
unsigned char TTUInt8
8 bit unsigned integer (char)