I'm thinking it would be good to have one format for music and SFX used in homebrew video games that could be cross-console compatible, typically just like MML but in improved. The MML format as-it can hold just anything I can think of when it comes to playback a soundtrack on the NES, unfortunately its format isn't very well optimized and is doccumented in japaneese, and the replay code aslo isn't very well optimized as well.
By optimizing the replay code and the format it ustilizes to allow SFX playback, playback of more than one single song, and be less time conssuming, while doccumented in english, and creating a new MML compilator suited to this improved format, but still backward compatible with the old one, MML would definitely become the "ulitmate" format suited for homebrew video games.
But the best would be to allow the user to change a few parameters in the header of his track and be able to compile the music/SFX as well on another target than the NES : The Game Boy, the SPC700, the Playstation or whathever.
The only difference is that the replay code would be totally different and run on a different CPU with different audio hardware, but I'm thinking of a format that can work regardless of the platform.
The main differences between platforms is just the number of channels and the use or not of audio samples. Then two main category of targets can be made : The ones that use digital sampled audio (SNES, Playstation, Game Boy Advance ...) And the one that doesn't have memory for sampled audio and just use fixed waveforms (NES, Game Boy, Genesis...)
Of course the DPCM channel of the NES is the big exeption, but you can just play low quality WAV within 16 different frequencies, you cannot really play digital samples with parameters like you can with modern SPUs, so I'd keep it apart.
The advantage of this would be that a homebrew programmer can just have to type its music in always the same format regardless of the platform, and use the features he want to use and avoid the feature he don't want to use. Then he can just "compile" its music for test and play it back on the specified platform. If he want to save memory, he could just delete some command he doesn't use at all.
I have some such ideas, but I need to know if people arround thinks it as a good idea, or if everyone prefer just write their own specified sound engine with their own format forever, thrus avoiding the use of an "universal one".
Now the fetures this future format is supposed to have :
By optimizing the replay code and the format it ustilizes to allow SFX playback, playback of more than one single song, and be less time conssuming, while doccumented in english, and creating a new MML compilator suited to this improved format, but still backward compatible with the old one, MML would definitely become the "ulitmate" format suited for homebrew video games.
But the best would be to allow the user to change a few parameters in the header of his track and be able to compile the music/SFX as well on another target than the NES : The Game Boy, the SPC700, the Playstation or whathever.
The only difference is that the replay code would be totally different and run on a different CPU with different audio hardware, but I'm thinking of a format that can work regardless of the platform.
The main differences between platforms is just the number of channels and the use or not of audio samples. Then two main category of targets can be made : The ones that use digital sampled audio (SNES, Playstation, Game Boy Advance ...) And the one that doesn't have memory for sampled audio and just use fixed waveforms (NES, Game Boy, Genesis...)
Of course the DPCM channel of the NES is the big exeption, but you can just play low quality WAV within 16 different frequencies, you cannot really play digital samples with parameters like you can with modern SPUs, so I'd keep it apart.
The advantage of this would be that a homebrew programmer can just have to type its music in always the same format regardless of the platform, and use the features he want to use and avoid the feature he don't want to use. Then he can just "compile" its music for test and play it back on the specified platform. If he want to save memory, he could just delete some command he doesn't use at all.
I have some such ideas, but I need to know if people arround thinks it as a good idea, or if everyone prefer just write their own specified sound engine with their own format forever, thrus avoiding the use of an "universal one".
Now the fetures this future format is supposed to have :
Code:
???? sound format specs :
- MML compatible music format
- Cross-platfrorm compatible
- Can play any notes in the 12-tone scale and up to 8 octaves range
- Can play notes of any lenght, from 32th note's triplets to infinite lenght (by using some command to continue the previous note it become possible to obtain a note playing forever or a long note with a crazy lenght)
- Can playback music at any tempo between 1 bps and 256 bps, sound effects are fixed to 256 bps
- Music's tempo can be changed by the song itself to do ralentendo and accelerando
- Main tempo can be scaled by the main programm regardless of the tempo of the song at least for music (maybe SFX ?)
- The loop of a song can be altered by a flag set by the main programm.
- A flag can be sent to the main programm at some given point in music, SFX (more details later)
- Allow macros to definites instruments and playback features in function of the platform target
- Allow vibratoes, pitch slides and full volume control via MML macros and using the most of the target platform's features (depend of platform)
- Allow to play many song, and the user can define the start pointer to each song so that one song can begin in the middle of another
- Allow the song to "call patterns", so that it becomes easier to have a chunk of melody repeated and this saves memory after compilation
- Allow the song to repeate a chuck of patterns inside the whole music loop, OR allow the pattern to repeat some chunk inside it several times
- Allow the song to have a loop point, setup individually for each channel
- Allow SFX playback under the same format as music, but the SFX would play over the music
- Can compile to either a sound file (.nsf, .spc, etc...) or a binary file to be included in an assembly code.
- Can allow the main code to dialog with the sound handling programm to : Start a new song, pause a song and save the sate of a paused song while starting a new one (usefull for RPGs during battles), stop the playback of a song, unpause a paused song while it's old state is restored (usefull AFTER battles for RPGs), start playing a SFX, stop playing an SFX, start playing a second SFX (the # of SFX that can be played at the same time depend of the target platform).
- MML compatible music format
- Cross-platfrorm compatible
- Can play any notes in the 12-tone scale and up to 8 octaves range
- Can play notes of any lenght, from 32th note's triplets to infinite lenght (by using some command to continue the previous note it become possible to obtain a note playing forever or a long note with a crazy lenght)
- Can playback music at any tempo between 1 bps and 256 bps, sound effects are fixed to 256 bps
- Music's tempo can be changed by the song itself to do ralentendo and accelerando
- Main tempo can be scaled by the main programm regardless of the tempo of the song at least for music (maybe SFX ?)
- The loop of a song can be altered by a flag set by the main programm.
- A flag can be sent to the main programm at some given point in music, SFX (more details later)
- Allow macros to definites instruments and playback features in function of the platform target
- Allow vibratoes, pitch slides and full volume control via MML macros and using the most of the target platform's features (depend of platform)
- Allow to play many song, and the user can define the start pointer to each song so that one song can begin in the middle of another
- Allow the song to "call patterns", so that it becomes easier to have a chunk of melody repeated and this saves memory after compilation
- Allow the song to repeate a chuck of patterns inside the whole music loop, OR allow the pattern to repeat some chunk inside it several times
- Allow the song to have a loop point, setup individually for each channel
- Allow SFX playback under the same format as music, but the SFX would play over the music
- Can compile to either a sound file (.nsf, .spc, etc...) or a binary file to be included in an assembly code.
- Can allow the main code to dialog with the sound handling programm to : Start a new song, pause a song and save the sate of a paused song while starting a new one (usefull for RPGs during battles), stop the playback of a song, unpause a paused song while it's old state is restored (usefull AFTER battles for RPGs), start playing a SFX, stop playing an SFX, start playing a second SFX (the # of SFX that can be played at the same time depend of the target platform).