Support for MIDI pitchbend

,

It seems that when loading a MIDI file via playdate.sound.sequence.new([path.mid]) in Lua pitchbend information is not retained, and playing the resulting sequence only plays back affected notes at their starting pitch. This will give an unexpected result with, for example, guitar tracks that incorporate string bends, vibrato, etc. Similarly, APIs that deal with MIDI notes such as playdate.sound.instrument:playMIDINote and, by extension, playdate.sound.track:getNotes don't offer bend functionality or information.

It would be useful to have support for pitchbend messages in playdate.sound.sequence as well as other APIs like playdate.sound.instrument:playMIDINote, which could perhaps automatically vary the note pitch over the lifetime of the note played. The game I'm working on in particular would benefit from this feature.

I can't be sure about what the difficulties could be in implementing this, but I thought that pitchbend messages could be managed similarly to the way this guide explains. I'm happy to hear other thoughts on the matter as well.

4 Likes

Thanks for that link! That'll be handy when I get around to adding pitch bend. I skipped it when I added .mid file parsing because I couldn't think of a good way to wire it to the synth implementation. Looking at it again I think I'll just add a separate pitch bend input.

I've filed that, hope to get to it soon!

3 Likes

Thanks Dave, that'd be great!