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

Method processBlock

Source/Core/CtrlrPanel/CtrlrPanelProcessor.cpp:22–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20}
21
22void CtrlrPanelProcessor::processBlock(MidiBuffer &midiMessages, MidiBuffer &leftoverBuffer, const AudioPlayHead::CurrentPositionInfo &info)
23{
24 if (owner.getMidiOptionBool(panelMidiInputFromHostCompare))
25 {
26 owner.getMIDIInputThread().handleMIDIFromHost(midiMessages);
27 }
28
29 leftoverBuffer.clear();
30
31 processLua(midiMessages, info);
32
33 MidiBuffer::Iterator i(midiMessages);
34 MidiMessage m;
35 int time;
36
37 while (i.getNextEvent(m,time))
38 {
39 _MIN("VST INPUT", m, time);
40 if (owner.getMidiOptionBool(panelMidiThruH2D) == true)
41 {
42 if (owner.getMidiOptionBool(panelMidiThruH2DChannelize))
43 {
44 m.setChannel (owner.getMidiChannel(panelMidiOutputChannelDevice));
45 }
46
47 owner.sendMidi(m);
48 }
49
50 if (owner.getMidiOptionBool(panelMidiThruH2H) == true)
51 {
52 if (owner.getMidiOptionBool(panelMidiThruH2HChannelize))
53 {
54 m.setChannel (owner.getMidiChannel(panelMidiOutputChannelHost));
55 }
56
57 leftoverBuffer.addEvent (m, time);
58 }
59 }
60}
61
62void CtrlrPanelProcessor::midiOptionChanged(const CtrlrPanelMidiOption optionThatChanged)
63{

Callers

nothing calls this directly

Calls 8

getMidiOptionBoolMethod · 0.80
handleMIDIFromHostMethod · 0.80
getNextEventMethod · 0.80
getMidiChannelMethod · 0.80
sendMidiMethod · 0.65
clearMethod · 0.45
setChannelMethod · 0.45
addEventMethod · 0.45

Tested by

no test coverage detected