@aulicon I tried the Midi player and I sort of got it working but now I have the problem of how to achieve this polyphonically. At the moment only the first Note On message gets processed...```
function onNoteOn()
{
{
// Check the current play state of the MIDIPlayer var playState = MIDIPlayer1.getPlayState(); // If the MIDIPlayer is playing, ignore the event if (playState == 1) { return; } // Ignore the original note event Message.ignoreEvent(true); // Get the pressed note number var pressedNote = Message.getNoteNumber(); // Get the event list from the MIDIPlayer var eventList = MIDIPlayer1.getEventList(); // Iterate through the event list and replace all note-on and note-off events with the pressed note for (i = 0; i < eventList.length; i++) { var e = eventList[i]; if (e.isNoteOn() || e.isNoteOff()) { e.setNoteNumber(pressedNote); } } // Flush the message list to apply changes MIDIPlayer1.flushMessageList(eventList); // Play the modified sequence MIDIPlayer1.play(0); MIDIPlayer1.setPlaybackPosition(0.62);}}