GetMidiInNoteValue() not working
Posted: Thu May 02, 2013 3:04 am
I'm trying to run the example found in the documentation and I'm not getting any response with my MIDI controller (MPD32). Under Device Manager my device is the second one listed. When I verify that Madrix is in fact acquiring midi data, the MIDI Watcher is telling me Note On with Chn=02, Note=48, and Vol=127. In the example script I've set the parameters as follows and loaded it into the Main Output Macro. When I press the note, I get no indication that the script has seen a value change. How is this suppose to work?
Code: Select all
@scriptname="MIDItoMaster";
@author="jky";
@version="2.14b";
@description="Uses incoming MIDI to control the Master Fader";
const int NOTE=48; // MIDI Note for control
const int CHANNEL=2; // MIDI Channel for control
const int DEVICE_ID=2; // MIDI Device for control
void InitEffect()
{
}
void PreRenderEffect()
{
}
void PostRenderEffect()
{
if(IsMidiInEnabled()==1)
{
const float Value = (float)GetMidiInNoteValue(NOTE,CHANNEL,DEVICE_ID)/127.0;
//const float Value = (float)GetMidiInControlValue(NOTE,CHANNEL,DEVICE_ID)/127.0;
// MIDI CONTROLLER 0xb
SetMasterFader(Value*255);
}
}
void MatrixSizeChanged()
{
InitEffect();
}