Simple Note Player (not Arpeggiator)
-
@Christoph-Hart Any chance you'll have a Tutorial posted for this feature? Im digging in tonight
-
By the way, the midi player sync is not working properly.
When I open a 4 bar midi loop, the loop plays 4 or 8 times faster.
-
@Steve-Mohican said in Simple Note Player (not Arpeggiator):
By the way, the midi player sync is not working properly.
When I open a 4 bar midi loop, the loop plays 4 or 8 times faster.
I've noticed that too
-
@Steve-Mohican @ulrik
Do you guys have a snippit of how you're implementing the feature? Looking for some programming inspiration. -
@dustbro For midi player I used drag and drop feature to load midi files. But every time I load different midi files, midi player began to so so speedy (as I mentioned above, 8 times faster). So I haven't got any special snippet yet, but I can share when I will.
-
Hmm works for me well in a project I am currently working on.
Can you send me the MIDI file, perhaps there is some metadata in my files that I am expecting to be standard, but are missing in yours?
-
@Christoph-Hart here's a midi file that I use inside Hise, the original tempo is quarter note = 200bpm, but when I play it in Hise I have to set global tempo to half the tempo, 100bpm.
Miss Karting.mid -
@dustbro I use it for demoing the sample library so the user can can chose one of many built in midi files to play, it looks like this:
inline function onDemoSongsControl(component, value) { MIDIPlay.stop(0); DemoTimer.stopTimer(); Engine.setHostBpm(-1); DemoSongs.set("items", DemoSongsArr.join("\n")); if(value < SongInfo.length) { MIDIPlay.setFile("{PROJECT_FOLDER}"+DemoSongsArr[value]+".mid", true, true); SongInfoPnl.set("visible", true); SongInfoLbl.set("text", SongInfo[value]); Engine.setHostBpm(DemoSongsTempi[value]); MIDIPlay.play(50000); DemoTimer.startTimer(7000); DemoOnBtn.setValue(1); } else { SongInfoPnl.set("visible", false); DemoSongsPnl.set("visible", false); label7.set("enabled", false); DemoOnBtn.setValue(0); } }; Content.getComponent("DemoSongs").setControlCallback(onDemoSongsControl);
-
Ah, thanks, it's what I thought, you're using a MIDI resolution of 480ppq, while I am expecting 960ppq, which I thought was standard.
Unfortunately fixing this is not as trivial as I hoped, I need to convert them manually if the resolution doesn't match (because internally I am doing everything in 960ppq).
-
@Christoph-Hart I see, is there a command to apply in the code when loading a midi file, that will half the tempo of the midi file, like "Engine.setHostBpm("midiFile.getResolution() * 2)"...
I mean "Engine.setHostBpm("midiFile.getTempo() / 2)". or something?