mirror of
https://github.com/sshlien/abcmidi.git
synced 2026-05-30 20:09:29 +00:00
abc2midi: allow %%MIDIdef macros to be defined anywhere (#23)
* abc2midi: allow %%MIDIdef macros to be defined anywhere Fix also some lost CHANGES from previous commit. abc2midi: allow %%MIDIdef macros to be defined anywhere, including before the first X: field (outside any tune). Previously %%MIDIdef was only handled inside event_specific() after the started_parsing check,so macros defined in the file header were silently ignored. The %%MIDIdef handling has been moved before the started_parsing check in event_specific() in store.c since macro definitions are context-independent. * Update the golden test files since X:, R: and C: are now emitted
This commit is contained in:
@@ -14,6 +14,8 @@ Track end
|
||||
Track start
|
||||
Time=0 Meta Text, type=0x01 (Text Event) leng=10
|
||||
Text = <note track>
|
||||
Time=0 Meta Text, type=0x01 (Text Event) leng=3
|
||||
Text = <X:8>
|
||||
Time=1 Program, chan=1 program=26
|
||||
Time=1 Meta Text, type=0x03 (Sequence/Track Name) leng=9
|
||||
Text = <Coleraine>
|
||||
@@ -21,6 +23,8 @@ Time=1 Meta Text, type=0x01 (Text Event) leng=18
|
||||
Text = <B:Kerr's Violin IV>
|
||||
Time=1 Meta Text, type=0x01 (Text Event) leng=66
|
||||
Text = <Z:John Chambers <jc@eddie.mit.edu> http://eddie.mit.edu/~jc/music/>
|
||||
Time=1 Meta Text, type=0x01 (Text Event) leng=5
|
||||
Text = <R:jig>
|
||||
Time=1 Program, chan=1 program=72
|
||||
Time=1 Parameter, chan=1 c1=7 c2=115
|
||||
Time=1 Parameter, chan=1 c1=10 c2=67
|
||||
@@ -361,12 +365,16 @@ Track end
|
||||
Track start
|
||||
Time=0 Meta Text, type=0x01 (Text Event) leng=12
|
||||
Text = <gchord track>
|
||||
Time=0 Meta Text, type=0x01 (Text Event) leng=3
|
||||
Text = <X:8>
|
||||
Time=1 Program, chan=3 program=3
|
||||
Time=1 Program, chan=2 program=3
|
||||
Time=1 Meta Text, type=0x01 (Text Event) leng=18
|
||||
Text = <B:Kerr's Violin IV>
|
||||
Time=1 Meta Text, type=0x01 (Text Event) leng=66
|
||||
Text = <Z:John Chambers <jc@eddie.mit.edu> http://eddie.mit.edu/~jc/music/>
|
||||
Time=1 Meta Text, type=0x01 (Text Event) leng=5
|
||||
Text = <R:jig>
|
||||
Time=1 Parameter, chan=1 c1=7 c2=115
|
||||
Time=1 Parameter, chan=1 c1=10 c2=67
|
||||
Time=1 Note on, chan=2 pitch=40 vol=65
|
||||
@@ -932,10 +940,14 @@ Track end
|
||||
Track start
|
||||
Time=0 Meta Text, type=0x01 (Text Event) leng=10
|
||||
Text = <drum track>
|
||||
Time=0 Meta Text, type=0x01 (Text Event) leng=3
|
||||
Text = <X:8>
|
||||
Time=0 Meta Text, type=0x01 (Text Event) leng=18
|
||||
Text = <B:Kerr's Violin IV>
|
||||
Time=0 Meta Text, type=0x01 (Text Event) leng=66
|
||||
Text = <Z:John Chambers <jc@eddie.mit.edu> http://eddie.mit.edu/~jc/music/>
|
||||
Time=0 Meta Text, type=0x01 (Text Event) leng=5
|
||||
Text = <R:jig>
|
||||
Time=0 Parameter, chan=1 c1=7 c2=115
|
||||
Time=0 Parameter, chan=1 c1=10 c2=67
|
||||
Time=1 Note on, chan=10 pitch=65 vol=90
|
||||
|
||||
@@ -5,8 +5,12 @@ Time=0 Meta Text, type=0x01 (Text Event) leng=10
|
||||
Time=0 Tempo, microseconds-per-MIDI-quarter-note=472440
|
||||
Time=0 Key signature, sharp/flats=1 minor=0
|
||||
Time=0 Time signature=4/4 MIDI-clocks/click=48 32nd-notes/24-MIDI-clocks=8
|
||||
Time=0 Meta Text, type=0x01 (Text Event) leng=3
|
||||
Text = <X:1>
|
||||
Time=0 Meta Text, type=0x03 (Sequence/Track Name) leng=13
|
||||
Text = <Horses Branle>
|
||||
Time=0 Meta Text, type=0x01 (Text Event) leng=6
|
||||
Text = <C:Trad>
|
||||
Time=1 Note on, chan=1 pitch=67 vol=105
|
||||
Time=360 Note off, chan=1 pitch=67 vol=0
|
||||
Time=361 Note on, chan=1 pitch=69 vol=80
|
||||
|
||||
@@ -14,6 +14,8 @@ Track end
|
||||
Track start
|
||||
Time=0 Meta Text, type=0x01 (Text Event) leng=10
|
||||
Text = <note track>
|
||||
Time=0 Meta Text, type=0x01 (Text Event) leng=3
|
||||
Text = <X:8>
|
||||
Time=1 Program, chan=1 program=26
|
||||
Time=1 Meta Text, type=0x03 (Sequence/Track Name) leng=9
|
||||
Text = <Coleraine>
|
||||
@@ -21,6 +23,8 @@ Time=1 Meta Text, type=0x01 (Text Event) leng=18
|
||||
Text = <B:Kerr's Violin IV>
|
||||
Time=1 Meta Text, type=0x01 (Text Event) leng=66
|
||||
Text = <Z:John Chambers <jc@eddie.mit.edu> http://eddie.mit.edu/~jc/music/>
|
||||
Time=1 Meta Text, type=0x01 (Text Event) leng=5
|
||||
Text = <R:jig>
|
||||
Time=1 Program, chan=1 program=72
|
||||
Time=1 Parameter, chan=1 c1=7 c2=115
|
||||
Time=1 Parameter, chan=1 c1=10 c2=67
|
||||
@@ -361,12 +365,16 @@ Track end
|
||||
Track start
|
||||
Time=0 Meta Text, type=0x01 (Text Event) leng=12
|
||||
Text = <gchord track>
|
||||
Time=0 Meta Text, type=0x01 (Text Event) leng=3
|
||||
Text = <X:8>
|
||||
Time=1 Program, chan=3 program=3
|
||||
Time=1 Program, chan=2 program=3
|
||||
Time=1 Meta Text, type=0x01 (Text Event) leng=18
|
||||
Text = <B:Kerr's Violin IV>
|
||||
Time=1 Meta Text, type=0x01 (Text Event) leng=66
|
||||
Text = <Z:John Chambers <jc@eddie.mit.edu> http://eddie.mit.edu/~jc/music/>
|
||||
Time=1 Meta Text, type=0x01 (Text Event) leng=5
|
||||
Text = <R:jig>
|
||||
Time=1 Parameter, chan=1 c1=7 c2=115
|
||||
Time=1 Parameter, chan=1 c1=10 c2=67
|
||||
Time=1 Note on, chan=2 pitch=40 vol=65
|
||||
@@ -932,10 +940,14 @@ Track end
|
||||
Track start
|
||||
Time=0 Meta Text, type=0x01 (Text Event) leng=10
|
||||
Text = <drum track>
|
||||
Time=0 Meta Text, type=0x01 (Text Event) leng=3
|
||||
Text = <X:8>
|
||||
Time=0 Meta Text, type=0x01 (Text Event) leng=18
|
||||
Text = <B:Kerr's Violin IV>
|
||||
Time=0 Meta Text, type=0x01 (Text Event) leng=66
|
||||
Text = <Z:John Chambers <jc@eddie.mit.edu> http://eddie.mit.edu/~jc/music/>
|
||||
Time=0 Meta Text, type=0x01 (Text Event) leng=5
|
||||
Text = <R:jig>
|
||||
Time=0 Parameter, chan=1 c1=7 c2=115
|
||||
Time=0 Parameter, chan=1 c1=10 c2=67
|
||||
Time=1 Note on, chan=10 pitch=65 vol=90
|
||||
|
||||
@@ -14,6 +14,8 @@ Track end
|
||||
Track start
|
||||
Time=0 Meta Text, type=0x01 (Text Event) leng=10
|
||||
Text = <note track>
|
||||
Time=0 Meta Text, type=0x01 (Text Event) leng=3
|
||||
Text = <X:8>
|
||||
Time=1 Program, chan=1 program=26
|
||||
Time=1 Meta Text, type=0x03 (Sequence/Track Name) leng=9
|
||||
Text = <Coleraine>
|
||||
@@ -21,6 +23,8 @@ Time=1 Meta Text, type=0x01 (Text Event) leng=18
|
||||
Text = <B:Kerr's Violin IV>
|
||||
Time=1 Meta Text, type=0x01 (Text Event) leng=66
|
||||
Text = <Z:John Chambers <jc@eddie.mit.edu> http://eddie.mit.edu/~jc/music/>
|
||||
Time=1 Meta Text, type=0x01 (Text Event) leng=5
|
||||
Text = <R:jig>
|
||||
Time=1 Program, chan=1 program=72
|
||||
Time=1 Parameter, chan=1 c1=7 c2=115
|
||||
Time=1 Parameter, chan=1 c1=10 c2=67
|
||||
@@ -361,12 +365,16 @@ Track end
|
||||
Track start
|
||||
Time=0 Meta Text, type=0x01 (Text Event) leng=12
|
||||
Text = <gchord track>
|
||||
Time=0 Meta Text, type=0x01 (Text Event) leng=3
|
||||
Text = <X:8>
|
||||
Time=1 Program, chan=3 program=3
|
||||
Time=1 Program, chan=2 program=3
|
||||
Time=1 Meta Text, type=0x01 (Text Event) leng=18
|
||||
Text = <B:Kerr's Violin IV>
|
||||
Time=1 Meta Text, type=0x01 (Text Event) leng=66
|
||||
Text = <Z:John Chambers <jc@eddie.mit.edu> http://eddie.mit.edu/~jc/music/>
|
||||
Time=1 Meta Text, type=0x01 (Text Event) leng=5
|
||||
Text = <R:jig>
|
||||
Time=1 Parameter, chan=1 c1=7 c2=115
|
||||
Time=1 Parameter, chan=1 c1=10 c2=67
|
||||
Time=1 Note on, chan=2 pitch=40 vol=65
|
||||
@@ -932,10 +940,14 @@ Track end
|
||||
Track start
|
||||
Time=0 Meta Text, type=0x01 (Text Event) leng=10
|
||||
Text = <drum track>
|
||||
Time=0 Meta Text, type=0x01 (Text Event) leng=3
|
||||
Text = <X:8>
|
||||
Time=0 Meta Text, type=0x01 (Text Event) leng=18
|
||||
Text = <B:Kerr's Violin IV>
|
||||
Time=0 Meta Text, type=0x01 (Text Event) leng=66
|
||||
Text = <Z:John Chambers <jc@eddie.mit.edu> http://eddie.mit.edu/~jc/music/>
|
||||
Time=0 Meta Text, type=0x01 (Text Event) leng=5
|
||||
Text = <R:jig>
|
||||
Time=0 Parameter, chan=1 c1=7 c2=115
|
||||
Time=0 Parameter, chan=1 c1=10 c2=67
|
||||
Time=1 Note on, chan=10 pitch=65 vol=90
|
||||
|
||||
Reference in New Issue
Block a user