本文整理汇总了C++中MidiMessage::isControllerOfType方法的典型用法代码示例。如果您正苦于以下问题:C++ MidiMessage::isControllerOfType方法的具体用法?C++ MidiMessage::isControllerOfType怎么用?C++ MidiMessage::isControllerOfType使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MidiMessage
的用法示例。
在下文中一共展示了MidiMessage::isControllerOfType方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: addEvent
void Song::addEvent(MidiMessage m)
{
// filter some events...
// filter stop notes event
if (m.isControllerOfType(123))
{
return;
}
if (_state==SONG_RECORDING)
{
_sections[_currentSection]->addEvent(m);
}
}
示例2: processBlock
//.........这里部分代码省略.........
}
}
} else if (m.isNoteOff()) {
if (monoMode)
{
switch (m.getChannel())
{
case 1:
p << osc::BeginMessage( "/gate1" )
<< 0 << osc::EndMessage;
break;
case 2:
p << osc::BeginMessage( "/gate2" )
<< 0 << osc::EndMessage;
break;
case 3:
p << osc::BeginMessage( "/gate3" )
<< 0 << osc::EndMessage;
break;
case 4:
p << osc::BeginMessage( "/gate4" )
<< 0 << osc::EndMessage;
break;
default:
break;
}
sendOSCData(p);
} else if (shiftMode) {
p << osc::BeginBundleImmediate
<< osc::BeginMessage( "/gate1" )
<< 0 << osc::EndMessage
<< osc::BeginMessage( "/gate2" )
<< 0 << osc::EndMessage
<< osc::EndBundle;
sendOSCData(p);
} else {
gateCount --;
if (gateCount <= 0)
{
p << osc::BeginBundleImmediate
<< osc::BeginMessage( "/gate1" )
<< 0 << osc::EndMessage
<< osc::BeginMessage( "/gate2" )
<< 0 << osc::EndMessage
<< osc::EndBundle;
sendOSCData(p);
gateCount = 0;
}
ch--;
if (ch == -1)
{
ch = 0;
}
}
} else if (m.isControllerOfType(1)) { // Modulation Wheel
float modulation = m.getControllerValue();
if (!monoMode && !shiftMode)
{
p << osc::BeginMessage("/fader8")
<< (modulation / 127) << osc::EndMessage;
sendOSCData(p);
}
}
processedMidi.addEvent (m, time);
}
midiMessages.swapWith (processedMidi);
buffer.clear();
for (int channel = 0; channel < getNumInputChannels(); ++channel)
{
float* channelData = 0;
}
}