-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmpc2000xl.mid.ksy
80 lines (67 loc) · 1.74 KB
/
mpc2000xl.mid.ksy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
meta:
id: mpc2000xl_mid
file-extension: mid
bit-endian: le
imports:
- standard_midi_file_with_running_status
enums:
foo:
0: bar
types:
sequencer:
seq:
- contents: 'LOOP='
- id: loop_enabled
type: str
encoding: ASCII
size: 4
- contents: 'START='
- id: loop_start
type: str
encoding: ASCII
size: 4
- contents: 'END='
- id: loop_end
type: str
encoding: ASCII
size: 4
- contents: 'TEMPO='
- id: tempo_source
type: str
encoding: ASCII
size: 3
instances:
meta_events:
value: tracks[0].events.event
first_meta:
value: meta_events[0].meta_event_body
is_mpc2000xl_mid:
value: tracks.size > 0 and meta_events.size > 0 and
meta_events[0].event_type == 0xF0 and
first_meta.len.value == 32 and
first_meta.body.to_s("ASCII").substring(0, 16)
== "MPC2000XL 1.00 "
sequence_name:
value: first_meta.body.to_s("ASCII").substring(16, 32)
sequencer:
io: tracks[0].events._io
pos: 40
type: sequencer
tempo_bpm:
value: 60000000.0 /
((meta_events[2].meta_event_body.body[0] << 16) +
(meta_events[2].meta_event_body.body[1] << 8) +
meta_events[2].meta_event_body.body[2])
smpte_offset:
value: meta_events[3].meta_event_body.body
numerator:
value: meta_events[4].meta_event_body.body[0]
denominator:
value: 1 << meta_events[4].meta_event_body.body[1]
seq:
- id: hdr
type: standard_midi_file_with_running_status::header
- id: tracks
type: standard_midi_file_with_running_status::track
repeat: expr
repeat-expr: hdr.num_tracks