トピック
MathPRG MathProgrammer

BitByte MML Storage Method

I think I have a better idea for how BitByte MML songs will be saved. My idea is to use PRG Slot 1 and DATA commands under labels to organize the song into each channel. The first line will look something like this: DATA 2, 120 'This is the number of channels and the tempo
1そうだね
プレイ済み
返信[1]
親投稿
MathPRG MathProgrammer
For each channel: @C0_PIANO 'Channel number and name DATA "FF0000847F407F7F7F7F00" 'The first line is a hexadecimal string representing channel color and initial values for the MML commands Q, O, V, P, @E, and @. DATA 260, 3, 513, 9, 769, 770, 10, 1028, 11, 262, 12, 31 'Each element represents a command or operand for one
0そうだね
プレイ済み
返信[2]
親投稿
MathPRG MathProgrammer
The MML commands are represented by integer values: 0-8: O // 9: & // 10: _ // 11/12: [/] (Next element after ] is loop times, 0 for infinite) 13/14: (/) (Nudge volume, used if change is under 4) 15: @ER 16-31: Call macros (up to 16 can be created with BitByte MML) 32-40: Q // 40-167: Pan // 168: @MOF 169: @E (Next element is hexadecimal string for ADSR)
0そうだね
プレイ済み
返信[3]
親投稿
MathPRG MathProgrammer
Continued: 170: @MP // 171: @MA // 172: @ML 173-1613: Notes. Subtracts 173 and divides by 120 for pitch, subtracts pitch multiplied by 120 for duration. Actual value represents length, so 3 would be a 1/3 note. Above 60 represents a dotted note (like 68 for 8.) 1614-2125: @ // 2126-2253: V // 2254-2445: L 2446-2701: @D (Subtracts 128 from operand) 2702-3213: T (Affects all channels)
0そうだね
プレイ済み
返信[4]
親投稿
MathPRG MathProgrammer
I hope its not too confusing. I figure it should work while still allowing the program to run relatively fast. Any thoughts?
0そうだね
プレイ済み
返信[5]
親投稿
Brandon niorg2606
Very interesting concept, but you have to remember that you can only use so many DATAs and labels before your program runs out of memory. Other than that it seems like you've got a gold hat, cool cat.
0そうだね
プレイ済み
返信[6]
親投稿
MathPRG MathProgrammer
Yeah, like I said I'll use PRG slots 1-3. The program will of course create them as you use it. And of course I have to consider the upload memory limit! I figure DATA would be the most efficient so the program can search through the information quickly.
0そうだね
プレイ済み