Group Admins

  • Profile picture of Karim
  • Profile picture of Jean

OpenMusic

Public Group active 1 hour, 33 minutes ago

User group for OpenMusic and computer-aided composition. Visit the Forum for discussions.

filter MIDI file?

Author 2 Subscribed Users |
Profile photo of andrewdkaiser
andrewdkaiser

Hello:

I have a MIDI file (created from an SDIF file that I generated using ASAnnotation). The file is very dense, by design…but it all came out as one channel. I’d like to filter the midi values similar to how a low pass or hipass audio filter would work.

Is there a midi function in OM that allows me to (for example) extract all MIDI events above a certain pitch value? I also think if the SDIF file had generated multiple channels, I could create a chord seq with those, and then get what I need by deleting tracks. Not sure.

thanks for any help.

Cheers,
andrew

September 19, 2013 at 00:28 #5857
Profile photo of Jean
Jean

Hi Andrew,
The function get-MIDIevents converts any OM object into a list of MIDIEvents (which you can then reconvert to objects or save in a MIDI file).
It has an optional argument “test” that allows you to plug a lambda function or patch, that will filter the events.
This may allow you to split into several lists of events, according to a given pitch.
See for example the example 03-filters in the MIDI tutorial patches (Workspace window, menu Help/Import tutorial patches)
Jean

September 19, 2013 at 00:34 #5859
Profile photo of andrewdkaiser
andrewdkaiser

Jean – Thanks very much, that is exactly what I’m looking for.

,andrew

September 21, 2013 at 12:15 #5926

You must be logged in to reply to this topic.

Log in now