Re: [LAU] command line midi processing

From: Christopher Arndt <chris@email-addr-hidden>
Date: Thu Aug 30 2018 - 17:00:43 EEST

Am 30.08.18 um 02:44 schrieb Maurizio Berti:
> Well, there is python-midi, which is stable enough:
> https://github.com/vishnubob/python-midi/

Another Python MIDI file library (which I wrote based on a really old
predecessor) is miditk-smf:

https://pypi.org/project/miditk-smf/

It uses an event-based approach, i.e. it works great for filtering and
changing MIDI events as they are read in. Here's an example of how you
would map MIDI program change events from one program number to another,
optionally only on selected MIDI channels or tracks in the MIDI file:

https://gist.github.com/SpotlightKid/e7f787cc142c45399f71296ac8a3de57

If you want to change the timing of events, the filtering approach is
not appropriate. miditk-smf also has support for parsing a complete MIDI
file into a MidiSequence object, which is a container for all the events
of the file, but unfortunately there is no direct support for writing
these events back to MIDI file yet.

Chris
_______________________________________________
Linux-audio-user mailing list
Linux-audio-user@lists.linuxaudio.org
https://lists.linuxaudio.org/listinfo/linux-audio-user
Received on Thu Aug 30 20:15:01 2018

This archive was generated by hypermail 2.1.8 : Thu Aug 30 2018 - 20:15:03 EEST