Skip to content

Commit 65f9c04

Browse files
Key split restructure (#2168)
Key split tables have been given names based on usage (KeySplitTable1 -> keysplit_piano etc) and a new macro has been set up to better represent the individual bytes for key splits with it being more obvious to how said bytes are used for the respective voice in the voicegroup. --------- Co-authored-by: Martin Griffin <[email protected]>
1 parent 0dfec24 commit 65f9c04

File tree

157 files changed

+472
-802
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

157 files changed

+472
-802
lines changed

asm/macros/m4a.inc

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,31 @@
2121
.set voicegroup_\label, . - \starting_note * 0xC
2222
.endif
2323
.endm
24+
25+
.macro keysplit label:req, starting_note
26+
.ifb \starting_note
27+
.global keysplit_\label
28+
keysplit_\label:
29+
.set _last_note, 0
30+
.else
31+
.set keysplit_\label, . - \starting_note
32+
.set _last_note, \starting_note
33+
.endif
34+
.set _last_split, 0
35+
.endm
36+
37+
.macro split index:req, ending_note:req
38+
.if \ending_note < _last_note
39+
.if _last_split == 0
40+
.error "split's ending_note earlier than previous keysplit's starting_note"
41+
.else
42+
.error "split's ending_note earlier than previous split's ending_note"
43+
.endif
44+
.else
45+
.rept \ending_note - _last_note
46+
.byte \index
47+
.endr
48+
.endif
49+
.set _last_note, \ending_note
50+
.set _last_split, 1
51+
.endm

0 commit comments

Comments
 (0)