Midi sequence playback

Screen Shot 2022-04-26 at 16.59.18
replace 3 by 1

yeah it works fantastic. Thank u all for your help.
I created now a pattern with 3 tracks and put the track number back to 3 but it only plays back the track iput in here: notes = MidiSequence_GetCurrentEvents(cs, 4)
what is the channel mapping trick?

https://gigperformer.com/docs/GPScript40/content/reference/list-of-functions.html?highlight=midisequence#MidiSequence_MapOutputChannel

figured it out … :+1:

3 Likes

I also got the same invalid track number error on GetCurrentEvents using a single track MIDI file until making this change in the code.
notes = MidiSequence_GetCurrentEvents(cs, 0)
It works at clocking the sequence very well, though I need to adjust mindset slightly. I’ll get a stuck note if I stop clocking to adjust something before reaching a note’s off event in the sequence.

The trick is to add a few more commands to nearby keys to do things like AllNotesOff, Reset to the beginning and so forth.

1 Like

Anyone got an example midifile I can try with this script? Cheers

Do you have a DAW?

Have ableton lite

So you can create a MIDI file

Choose your weapon: Free Midi Files and Midi Songs, Free Background Music (partnersinrhyme.com)

1 Like

Hey David! I saw your YouTube video about using this with your Steely Dan group. I was wondering if you could potentially make a short video all about using the MIDI Sequencer? I feel like this is a powerful feature, and would love to have an in-depth understanding about how it works and how to make our own :slight_smile:
Thanks so much!

1 Like

I agree - this is an amazing feature demonstrating the power scripting brings to GP and the ability to design whatever functionality you have in mind. Speaking of which, David if you do decide to create a tutorial can you also include the variation on this script? Or how one can adapt the script if possible - to step through the midi play back with the two midi keys assigned to set tempo. In other words the two midi keys are not used to set tempo but instead used to advance one step at a time through the midi sequence. Thank you!

1 Like

I’m also interested in a tutorial as I’m still struggling to get it to work.