プレイ日記
MathPRG MathProgrammer
No major updates yet, the track list is my current project, however I am getting close to the creation part. Basically, whenever in the view range, placed notes will appear as sprites with colors of the track they are in (faded if not the current track) and of appropriate length - basically what you may see in a MIDI sequencer. I'd like some input for how music data is stored.
5そうだね
プレイ済み
返信[1]
親投稿
MathPRG MathProgrammer
My idea was that there are sixteen 14,400 element arrays which each store information about notes and effects for each track. This would mean 230,400 elements in all, which is somewhat concerning as this may take a good chunk of memory but should manage. Each element should be a decimal number converted from a four digit hexidecimal number. Some effects will change how many digits are required.
0そうだね
プレイ済み
返信[2]
親投稿
MathPRG MathProgrammer
Each element will look somewhat like this, for a normal note: First two digits - note to be played. Octave will be found by dividing this by twelve, and if it is different from the octave of the previous note, it will adjust the octave using <, >, and the O command. If the digits represent a number over 120, this will represent an effect (modulation, etc.)
0そうだね
プレイ済み
返信[3]
親投稿
MathPRG MathProgrammer
Next two digits - length of the note. It will represent the length exactly as it is shown in MML - 01 is a whole note (C1 for example), 04 is a quarter note (E4), and so on. Since SmileBASIC usually runs at 60 fps, the cap will be 1/60th. I highly doubt you'd want a note that short anyways! If this value is over 60, then this will be a dotted note - 61 is 1., 6F is 15., and so on.
0そうだね
プレイ済み
返信[4]
親投稿
MathPRG MathProgrammer
If the note was specified as what will be treated as an effect, plenty of the effects will need more operands. If it is just something like the "Q" or "L" commands, they will get their operands from the "length of note" spot, as that part is irrelevant to everything but the notes themselves. However, "@E" or "@MA" will need four operands, and therefore eight digits in hexadecimal.
0そうだね
プレイ済み
返信[5]
親投稿
MathPRG MathProgrammer
Since SmileBASIC can only handle a number as large as a 7-digit number, an additional spot will need to be used and therefore will block an area from placing notes - part of the downside to my idea. Would this be a good system, or should I probably use something else?
0そうだね
プレイ済み