I've got a midi file that was recorded on a Yamaha keyboard, and I'm trying to import it into LMMS. However, as far as I can tell, LMMS ignores pedal information when importing MIDI and it sounds terrible.

I'm wondering, are there any other tools that can "flatten" the pedal information i.e. change the note lengths so it sounds the same but doesn't explicitly require the pedal track? So that it can then be imported into LMMS?

  • 2
    I've never tried LMMS, but it seems very odd that any modern sequencer couldn't handle controller data, especially the more common ones. Did you try the manual or their support area?
    – Tetsujin
    Sep 24 '20 at 18:30
  • I'll keep looking, I'll see what sort of support. I'm thinking it's a bug, it records pedal information just fine, it just ignores it when importing an existing MIDI file.
    – jmite
    Sep 24 '20 at 18:42
  • 1
    I found this bug report from August 2018 is still open?: Sustain pedal not being read on import from midi
    – Bavi_H
    Jul 6 at 0:17

Yes there are tools.

The filter would be simple.

If pedal control > 63, delete note-off (usually note-on velocity 0)
If pedal control < 64, leave note-off (usually note-on velocity 0) as is

You just need a tool that can read MIDI files and apply the said filter to incoming data.

You'll need

  • Pure Data to filter data
  • loopMIDI to send data from a midi file to Pure Data and record its' output
  • THIS PATCH for Pure Data Pure Data Patch Image

Not a complete solution, but it will get you started (there may be other tools more specialised for the job; you could ask someone to write a Python script; it is up to you whether you want to process the MIDI file (a bit of a mess) or process MIDI data in realtime via the loopback driver)

BTW, I use all software that I recommend, and highly recommend it (these are official websites)

  • I wouldn't want to delete the note-ends, that would leave the notes stuck on forever. I would want to delay the note-ends until the point in time when pedal is released.
    – Bavi_H
    Jul 6 at 0:16
  • @Bavi_H you're right about that - i've said this is only the starting point - you need to check for the pedal on, if so, save an array of notes (list or whatever) that were pressed, and send velocity 0 to all the notes in that list when pedal lifts up. But there are many edge cases that can make this complicated. But in this program, you are given tutorials for handling polyphony, that's why it was the first thing I came up with.
    – Hatebit
    Jul 10 at 11:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.