MCPcopy Create free account
hub / github.com/BespokeSynth/BespokeSynth / OnMidiPitchBend

Method OnMidiPitchBend

Source/Push2Control.cpp:2098–2111  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2096}
2097
2098void Push2Control::OnMidiPitchBend(MidiPitchBend& pitchBend)
2099{
2100 if (mGridControlInterface != nullptr)
2101 {
2102 bool handled = mGridControlInterface->OnPush2Control(this, kMidiMessage_PitchBend, pitchBend.mChannel, pitchBend.mValue);
2103 if (handled)
2104 return;
2105 }
2106
2107 float value = pitchBend.mValue / MidiDevice::kPitchBendMax;
2108 TheSynth->SetZoomLevel(pow(2, value * 2 - 1) + .1f);
2109
2110 //ofLog() << "pitchbend " << pitchBend.mChannel << " " << pitchBend.mValue;
2111}
2112
2113int Push2Control::GetGridControllerOption1Control() const
2114{

Callers 1

SendMidiMessageMethod · 0.45

Calls 2

SetZoomLevelMethod · 0.80
OnPush2ControlMethod · 0.45

Tested by

no test coverage detected