[CM] cm3 midifile importing
Heinrich Taube
taube at uiuc.edu
Sat Mar 21 07:24:34 PDT 2009
svn trunk has midi importing working in cm3. the importing tool is in
Audio>MidiIn>Import Midifile... menu. The tool gives you full
controls over what tracks to import , what message types (notes,
program changes etc) and channels to include, and where to import the
events to (console window, editor buffer or clipboard). it also lets
you import the midi events in different formats, eg as lists of
parameter values or as actualy send messages. here is example imports
from bach269.mid in both formats:
(define bach269-track1-notes
'(
(1.364 0.500 67 96 0) ; time dur key chan
(2.045 0.500 67 96 0)
(3.409 0.500 74 96 0)
(4.091 0.500 71 96 0)
(5.114 0.500 69 96 0)
(5.455 0.500 67 96 0)
(6.136 0.500 67 96 0)
(7.159 0.500 69 96 0)
(7.500 0.500 71 96 0)
(8.182 0.500 69 96 0)
(9.545 0.500 71 96 0)
(10.227 0.500 74 96 0)
(11.591 0.500 72 96 0)
(12.273 0.500 71 96 0)
(12.955 0.500 69 96 0)
(14.318 0.500 67 96 0)
(15.682 0.500 67 96 0)
(16.364 0.500 67 96 0)
(17.727 0.500 74 96 0)
(18.409 0.500 71 96 0)
(19.432 0.500 69 96 0)
(19.773 0.500 67 96 0)
(20.455 0.500 67 96 0)
(21.477 0.500 69 96 0)
(21.818 0.500 71 96 0)
(22.500 0.500 69 96 0)
(23.864 0.500 71 96 0)
(24.546 0.500 74 96 0)
(25.909 0.500 72 96 0)
(26.591 0.500 71 96 0)
(27.273 0.500 69 96 0)
(28.636 0.500 67 96 0)
(30.000 0.500 71 96 0)
(30.682 0.500 71 96 0)
(31.364 0.500 72 96 0)
(32.046 0.500 74 96 0)
(32.727 0.500 74 96 0)
(33.750 0.500 72 96 0)
(34.091 0.500 71 96 0)
(34.773 0.500 69 96 0)
(36.136 0.500 67 96 0)
(36.818 0.500 71 96 0)
(38.182 0.500 72 96 0)
(38.864 0.500 74 96 0)
(40.227 0.500 72 96 0)
(40.909 0.500 71 96 0)
(42.955 0.500 67 96 0)
(44.318 0.500 71 96 0)
(45.000 0.500 74 96 0)
(46.364 0.500 72 96 0)
(47.046 0.500 71 96 0)
(48.409 0.500 69 96 0)
(49.091 0.500 67 96 0)
(50.114 0.500 69 96 0)
(50.455 0.500 71 96 0)
(51.137 0.500 69 96 0)
(52.500 0.500 71 96 0)
(53.182 0.500 74 96 0)
(54.546 0.500 72 96 0)
(55.227 0.500 71 96 0)
(55.909 0.500 69 96 0)
(57.273 0.500 67 96 0)
))
(define bach269-track1-ctrls
'(
(0.000 7 101 0) ; time controller value chan
(0.000 10 64 0)
))
(define bach269-track1-metas
'(
(0.000 #x9 "SmartMusic SoftSynth 1")
(0.000 #x3 "Instrument 1")
))
;; imported send messages
(begin
(send "mp:meta" 0.000 #x9 "SmartMusic SoftSynth 1")
(send "mp:meta" 0.000 #x3 "Instrument 1")
(send "mp:ctrl" 0.000 7 101 0)
(send "mp:ctrl" 0.000 10 64 0)
(send "mp:note" 1.364 0.500 67 96 0)
(send "mp:note" 2.045 0.500 67 96 0)
(send "mp:note" 3.409 0.500 74 96 0)
(send "mp:note" 4.091 0.500 71 96 0)
(send "mp:note" 5.114 0.500 69 96 0)
(send "mp:note" 5.455 0.500 67 96 0)
(send "mp:note" 6.136 0.500 67 96 0)
(send "mp:note" 7.159 0.500 69 96 0)
(send "mp:note" 7.500 0.500 71 96 0)
(send "mp:note" 8.182 0.500 69 96 0)
(send "mp:note" 9.545 0.500 71 96 0)
(send "mp:note" 10.227 0.500 74 96 0)
(send "mp:note" 11.591 0.500 72 96 0)
(send "mp:note" 12.273 0.500 71 96 0)
(send "mp:note" 12.955 0.500 69 96 0)
(send "mp:note" 14.318 0.500 67 96 0)
(send "mp:note" 15.682 0.500 67 96 0)
(send "mp:note" 16.364 0.500 67 96 0)
(send "mp:note" 17.727 0.500 74 96 0)
(send "mp:note" 18.409 0.500 71 96 0)
(send "mp:note" 19.432 0.500 69 96 0)
(send "mp:note" 19.773 0.500 67 96 0)
(send "mp:note" 20.455 0.500 67 96 0)
(send "mp:note" 21.477 0.500 69 96 0)
(send "mp:note" 21.818 0.500 71 96 0)
(send "mp:note" 22.500 0.500 69 96 0)
(send "mp:note" 23.864 0.500 71 96 0)
(send "mp:note" 24.546 0.500 74 96 0)
(send "mp:note" 25.909 0.500 72 96 0)
(send "mp:note" 26.591 0.500 71 96 0)
(send "mp:note" 27.273 0.500 69 96 0)
(send "mp:note" 28.636 0.500 67 96 0)
(send "mp:note" 30.000 0.500 71 96 0)
(send "mp:note" 30.682 0.500 71 96 0)
(send "mp:note" 31.364 0.500 72 96 0)
(send "mp:note" 32.046 0.500 74 96 0)
(send "mp:note" 32.727 0.500 74 96 0)
(send "mp:note" 33.750 0.500 72 96 0)
(send "mp:note" 34.091 0.500 71 96 0)
(send "mp:note" 34.773 0.500 69 96 0)
(send "mp:note" 36.136 0.500 67 96 0)
(send "mp:note" 36.818 0.500 71 96 0)
(send "mp:note" 38.182 0.500 72 96 0)
(send "mp:note" 38.864 0.500 74 96 0)
(send "mp:note" 40.227 0.500 72 96 0)
(send "mp:note" 40.909 0.500 71 96 0)
(send "mp:note" 42.955 0.500 67 96 0)
(send "mp:note" 44.318 0.500 71 96 0)
(send "mp:note" 45.000 0.500 74 96 0)
(send "mp:note" 46.364 0.500 72 96 0)
(send "mp:note" 47.046 0.500 71 96 0)
(send "mp:note" 48.409 0.500 69 96 0)
(send "mp:note" 49.091 0.500 67 96 0)
(send "mp:note" 50.114 0.500 69 96 0)
(send "mp:note" 50.455 0.500 71 96 0)
(send "mp:note" 51.137 0.500 69 96 0)
(send "mp:note" 52.500 0.500 71 96 0)
(send "mp:note" 53.182 0.500 74 96 0)
(send "mp:note" 54.546 0.500 72 96 0)
(send "mp:note" 55.227 0.500 71 96 0)
(send "mp:note" 55.909 0.500 69 96 0)
(send "mp:note" 57.273 0.500 67 96 0)
)
;
More information about the Cmdist
mailing list