Converting MIDI Files to/from Text/ASCII
By John Grant
To Robbie, Claus, Matt and anyone else interested:
The Cakewalk program has a MIDI-to-ASCII (and reverse) conversion routine, at least in the 4.0E DOS version. Not sure about later DOS or Windows versions but I doubt that they would have dropped the feature. I have attached herewith a short snippet of a file that has been converted using the routine, annotated as far as I can without referring to the documentation (horrors!) The limitation is that if you have a .MID file you must FIRST convert it into the Cakewalk specific format (.WRK) THEN apply the CAKE2ASC.EXE conversion routine to obtain the .ASC file. This can then be manipulated with any ASCII editor, converted back to .WRK format with ASC2CAKE.EXE and reconverted to .MID with Cakewalk. Hope this helps. -John Grant
<--- Begin sample MIDI file converted to ASCII format (Bach Toccata and Fugue, D Minor, BWV565, first phrase)--->
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Cakewalk 2.x+ ASCII conversion from file 'f:\bwv565.wrk' ;;; ;;; Copyright (C) 1987, 1988, 1989 by Greg Hendershott. ;;; "Cakewalk" is a trademark of Twelve Tone Systems, Inc. ;;; All rights reserved. ;;; ;;; This ASCII file format alone is hereby placed in the ;;; public domain without restriction. ;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; [TIMEBASE] 192
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; [VARS] Now=0 From=0 Thru=227258 KeySig=5 Clock=0 AutoSave=0 PlayDelay=0 ZeroCtrls=0 SendSPP=1 SendCont=1 PatchSearch=0 AutoStop=0 StopTime=16777215 AutoRewind=0 RewindTime=0 MetroPlay=0 MetroRecord=1 MetroAccent=1 CountIn=1 ThruOn=1 AutoRestart=0 CurTempoOfs=1 TempoOfs1=32 TempoOfs2=64 TempoOfs3=128 PunchEnabled=0 PunchInTime=0 PunchOutTime=0 EndAllTime=228026
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; [THRU] ThruMode=auto ThruPort=1 ThruChannel=0 ThruKeyPlus=0 ThruVelPlus=0 LocalOnPort=0
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; [TRACK] 0 "Right Hand" "" 1 0 0 0 0 -1 *
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; [STREAM] 0 < (Not sure what these 1802 < variables represent) 2 0 C 10 127 2 0 P 12 2 0 C 7 127 2 768 N 81 72 76 2 844 N 79 72 77 2 921 N 81 72 458 2 1532 N 79 72 77 2 1609 N 77 72 76 2 1685 N 76 72 77 2 1762 N 74 72 76 2 1838 N 73 72 153 2 1991 N 74 72 306
^ ^ ^ ^ ^ ^ | | | | | |___ Note duration (tics) | | | | |______ Note velocity (or controller value) | | | |_________ Note number (or controller # or patch value, etc.) | | |____________ Event type (C=controller, P=patch, N=note, etc.) | |________________ Event start time (number of tics from beginning of file) |___________________ MIDI channel number (file has a separate vertical listing for each different MIDI channel which contains data.
<----End sample file----> <----Begin thread history----> |
(Message sent Thu 30 Nov 1995, 22:41:22 GMT, from time zone GMT-0500.) |
|
|