File tree 1 file changed +12
-13
lines changed
1 file changed +12
-13
lines changed Original file line number Diff line number Diff line change @@ -45,22 +45,18 @@ process-midi: function [data [binary!]][
45
45
channel: UB 4
46
46
byte-1: SI8
47
47
byte-2: SI8
48
- byte-3: SI8
48
+ byte-3: SI8 ;???
49
49
time: UI32LE
50
50
]
51
- either all [
52
- byte-3 = 0
51
+ op: *MIDI_message_short/name status
52
+ prin ajoin [time #" " op " ch=" channel #" " ]
53
+ print ajoin switch /default op [
54
+ Par [["c=" byte-1 " v=" byte-2]]
55
+ Pb ChPr [reduce ["v=" byte-1 + (byte-2 << 7 )]]
56
+ PrCh [["p=" byte-1]]
53
57
][
54
- op: *MIDI_message_short/name status
55
- prin ajoin [time #" " op " ch=" channel #" " ]
56
- print ajoin switch /default op [
57
- Par [["c=" byte-1 " v=" byte-2]]
58
- Pb ChPr [reduce ["v=" byte-1 + (byte-2 << 7 )]]
59
- PrCh [["p=" byte-1]]
60
- ][
61
- ["n=" byte-1 " v=" byte-2]
62
- ]
63
- ][ print "should not happen!" ]
58
+ ["n=" byte-1 " v=" byte-2]
59
+ ]
64
60
]
65
61
]
66
62
@@ -83,6 +79,9 @@ midi-inp/awake: function [event [event!]][
83
79
true
84
80
]
85
81
82
+ wait 10
83
+ close-midi
84
+ halt
86
85
;; Play some random modern piano music ;-)
87
86
;; MIDI input should be printed in the console.
88
87
loop 50 [
You can’t perform that action at this time.
0 commit comments