[linux-audio-user] MIDI file (SMF) conversions

Bob van der Poel bob at mellowood.ca
Wed Feb 21 11:18:17 EST 2007



Alexandre Ratchov wrote:
> On Sat, Feb 17, 2007 at 01:11:19PM -0700, Bob van der Poel wrote:
>> Anyone know of a little utility to convert SMF files from type 0 to type 
>> 1? I can do this one at a time with a seq like rosegarden, but I'd like 
>> to bulk process a bunch of files.
>>
> 
> hi,
> 
> you can import midi files of type 0 in midish (use a recent
> snapshot) and export them back as SMF type 1. For instance the
> follwing shell script should do it:
> 
> 
> #!/bin/sh
> 
> for i; do
> mv $i $i.old
> echo "songimportsmf \"$i.old\"; songexportsmf \"$i\";" |midish
> done
> 
> 
> resulting files may slightly differ from original: certain events
> are removed/modified/added to ensure consistency, system exclusive
> messages are moved into the beggining of the track.
> 
> cheers,
> 
> -- Alexandre
> 

Thanks! I've seen references to midish but never took the time to look. 
Very interesting piece of work ... not sure if I'll use it.

The import/export does work. But, as you said it does tend to lose some 
bits of meta data. Not sure if that is critical in what I'm doing. The 
files do _sound_ the same.

Best.
-- 
Bob van der Poel ** Wynndel, British Columbia, CANADA **
EMAIL: bob at mellowood.ca
WWW:   http://www.mellowood.ca





More information about the Linux-audio-user mailing list