I've implemented tags now. The tags are appended to the start of the music file. The structure of them allows for tags to be excluded at anytime.
Code: Select all
First 7 bytes: "PQBCISM"
Eighth byte: Version identifier
CHR$(201)+Title$+CHR$(202)
CHR$(203)+Artist$+CHR$(204)
CHR$(253)+Comment$+CHR$(254)
CHR$(255) = Stop parsing comments, start music file
(all others above 200 are reserved for any possible future use.)
So, anything else that users may find useful I'll implement into the ISM standard. So, as of now, all of the ones not listed above (excluding 253-254) act as comments. Nobody in their right mind would use ASCII characters above 200 in tags, so that's why I did it. It also makes the file smaller.
I'll post code with this in days to come.
Meanwhile, here is some code to make some "music" that will work with the interpreter I made above (excluding tags)
Code: Select all
RANDOMIZE TIMER
MusicFile = FREEFILE
OPEN "C:\MUSIC.ISM" FOR BINARY ACCESS WRITE AS #MusicFile
FOR A = 1 TO 5000
Temp% = INT(RND*32000)+38
PUT #MusicFile, , Temp%
NEXT A
CLOSE #MusicFile
It doesn't sound pretty, but it demonstrates what I'm doing.