Re: [linux-audio-user] utility to convert midi-to-text-to-midi or how to drop programchange info?

From: Mario Lang <mlang@email-addr-hidden>
Date: Fri Sep 16 2005 - 10:21:34 EEST

Julien Claassen <julien@email-addr-hidden-lab.de> writes:

> Hi all!
> I'm looking for a utility to drop filter program-change data from a
> midi-file. I tried lilypond, but it didn't work properly on the midi-file. Is
> there any _CONSOLE-BASE_ way to do it?

With midi.el for Emacs, I'd currently do:

C-x C-f filename.mid RET
M-: (setq newdat (append (list smf-type smf-ppqn) (mapcar (lambda (track) (cons (car track) (remove-if (lambda (event) (eq (smf-event-type event) 'PC)) (cdr track)))) smf-chunks))) RET
C-x C-f newmidi.mid
M-: (smf-write newdat) RET
C-x C-s
 
A somewhat more convinient way to do operations like this going to
be written soon, but if you know some bit of lisp, you can already do
all sorts of operations on MIDI data.
CM can most probably solve your problem too, but I dont know the syntax
off-hand.

http://delysid.org/emacs/midi.el

-- 
CYa,
  Mario
Received on Fri Sep 16 12:15:07 2005

This archive was generated by hypermail 2.1.8 : Fri Sep 16 2005 - 12:15:08 EEST