As with most unpredictable problems in pd, this one was solved with a trigger object banging a float so the velocity could be set before the note.
I've had this problem for days and solved it just after posting to the list.
On Wed, Feb 9, 2022 at 12:52 PM Samuel Burt composer.samuel.burt@gmail.com wrote:
I'm working with [midifile] to create algorithmic scores from analog-style synthesis models. Really I'm at the beginning stages of doing so.
My flow is to generate data, write it into a MIDI file, and then open it in Finale to see the results. Unfortunately, I'm seeing an accumulation of previous notes that appears at the start of each measure.
Here's a picture of the patch and the output: https://i.imgur.com/t4naCah.png
Any idea what I'm doing wrong? I'm assuming there might be some kind of problem with how I'm creating noteoff commands.
What I remember from study is that the MIDI spec has both noteon and noteoff messages, but most instruments just use noteon messages with zero velocity. Do sequencers translate those zero velocity messages into noteoff messages before saving them into a file?
Thanks, Sam