MCPcopy Create free account
hub / github.com/RomanKubiak/ctrlr / channelizeBuffer

Function channelizeBuffer

Source/Core/CtrlrUtilities.cpp:861–878  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

859}
860
861void channelizeBuffer(MidiBuffer &inputBuffer, MidiBuffer &outputBuffer, const int channel, const bool channelizeAllowed)
862{
863 if (channelizeAllowed == false)
864 {
865 outputBuffer.swapWith(inputBuffer);
866 return;
867 }
868
869 MidiBuffer::Iterator i(inputBuffer);
870 int time;
871 MidiMessage m;
872
873 while (i.getNextEvent(m, time))
874 {
875 m.setChannel(channel);
876 outputBuffer.addEvent(m, 1);
877 }
878}
879
880float normalizeValue(const double& value, const double& minValue, const double& maxValue)
881{

Callers 1

processMethod · 0.85

Calls 4

getNextEventMethod · 0.80
swapWithMethod · 0.45
setChannelMethod · 0.45
addEventMethod · 0.45

Tested by

no test coverage detected