Working with MidiPlayer
-
I've successfully implemented the MIDIPlayer into one of my projects, I want to use it for demoing the plugin, so the user would be able to chose from a couple of midi files stored in the plug.
-
Is it possible to make the keyboard in the plugin visually show the keys pressed? (As it is now nothing shows)
If yes, how do I set it up? -
Is it possible to script accelerandos and ritardandos that will follow the midi files? Or is it possible to store tempo changes in the midi files and will the MIDIPlayer follow it?
-
-
@ulrik how did you do that, I'm trying but can't quite figure it out
-
@Jay this is the code for declaring it and connecting it to my "demobtn", I will expand it so the user will be able to chose from a list of songs....
// MidiPlayer ---------------------------------------------- const var MIDIPlayer1 = Synth.getMidiProcessor("MIDI Player1"); const var MIDIPlay = Synth.getMidiPlayer("MIDI Player1"); const var DemoBtn = Content.getComponent("DemoBtn"); inline function onDemoBtnControl(component, value) { if(value == 1) { MIDIPlay.setFile("{PROJECT_FOLDER}lordamornar.mid", true, true); MIDIPlay.play(100); Engine.setHostBpm(45); midi.push(MIDIPlay.getEventList()); } if(value == 0) { MIDIPlay.stop(10); } }; Content.getComponent("DemoBtn").setControlCallback(onDemoBtnControl);
-
@ulrik thanks buddy
-
@Jay No problem, you can ignore the line "midi.push(MIDIPlay.getEventList());" it has nothing to do with the code, I just forgot to erase it :)
-
There's no support for tempo changes - it's primary use case is playing MIDI loops that sync to the DAW so it just reacts on external tempo changes.
-
Oh and no, you can't show the notes being played on the keyboard for the same reason that it won't show script generated ones - the keyboard shows the MIDI notes coming in, there's no way to display the internal ones.
-
@Christoph-Hart Ok I see, what about my other question "Is it possible to make the keyboard in the plugin visually show the keys pressed?"
-
@Christoph-Hart Sorry, I didn't see that answer :)