gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

DS homebrew announcements > Homebrew SSEQ player

#176320 - fincs - Sun Jun 26, 2011 1:15 pm

Hello,

It's been a long time since I've done anything related to the DS, but now I'm back to 'brewing!

Here's my current project: a homebrew player for Nintendo's official music sequence format: SSEQ. It's still a very incomplete proof of concept, but it already plays Pok?mon music pretty well :)

Any help and advice from sound people is very much appreciated.

EDIT: A MID to SSEQ converter is now up. Check it out, there's even a demo package.


Last edited by fincs on Sun Jul 03, 2011 9:37 pm; edited 2 times in total

#176322 - sverx - Mon Jun 27, 2011 11:44 am

a link to the SSEQ specs?

#176324 - fincs - Mon Jun 27, 2011 7:53 pm

The documentation is here (warning: it forces you to download the html file).

#176329 - sverx - Tue Jun 28, 2011 10:36 am

It looks like the sound banks are very similar to XM instruments (multisample, loop points, envelopes, etc.)...
We could collaborate and make a library so that the DS homebrew community would be able to use this kind of music in their games/apps...

#176330 - wintermute - Tue Jun 28, 2011 2:30 pm

What would be the point without access to the tools used to create the music? Sticking with "standard" mod/xm/it trackers seems like a better option to me.
_________________
devkitPro - professional toolchains at amateur prices
devkitPro IRC support
Personal Blog

#176331 - sverx - Tue Jun 28, 2011 3:23 pm

I read there are converters... of course if there's no tool I agree with you.
Edit: I also love XMs much more anyway ;)

#176332 - fincs - Tue Jun 28, 2011 9:31 pm

If this is developed into a general purpose sound library, (open source) converters will of course be made. Currently it's just a little proof of concept.

#176333 - sverx - Wed Jun 29, 2011 10:07 am

If it's already playing well I see no reason why not starting working on making it a library :) I guess then you'll have feedback from interested homebrewers too...

#176336 - wintermute - Wed Jun 29, 2011 8:58 pm

Seems a bit backwards to me, what does this format do that Maxmod doesn't? Is there a good reason to write a library to play these files rather than extending mmutil to convert the format to Maxmod's own internal format?

Personally I think the community would benefit a great deal more from composition tools than they would from yet another custom music format.
_________________
devkitPro - professional toolchains at amateur prices
devkitPro IRC support
Personal Blog

#176337 - Dwedit - Wed Jun 29, 2011 9:39 pm

We really need a better MIDI to MOD converter.
_________________
"We are merely sprites that dance at the beck and call of our button pressing overlord."

#176339 - headspin - Thu Jun 30, 2011 6:04 am

Dwedit wrote:
We really need a better MIDI to MOD converter.


How about MODPlug Tracker?
_________________
Warhawk DS | Manic Miner: The Lost Levels | The Detective Game

#176340 - fincs - Thu Jun 30, 2011 9:43 am

The main problem with tracked music (MOD, XM, IT, S3M, etc) is that they're designed from the point of view of a programmer, not of a musician.
There's a reason why Nintendo has always chosen a MIDI-like format (SSEQ, Sappy sequences) for their official SDK...

Dwedit wrote:
We really need a better MIDI to MOD converter.

headspin wrote:
How about MODPlug Tracker?

I've tried, countless times, to convert MIDIs to tracked formats and I always got the same mess as an output. I've even tried alternate programs (MID2XM) and they still didn't get it right. Tuplets? Wrong rhythm. Non-standard time signatures (even 3/4)? Messed up pattern divisions.
It's not really these programs' fault, it's just that tracked music formats aren't designed to cope with all those things (instead you have to do ugly things such as changing the tick value (wtf) or change the pattern size). Similarly enough, module to MIDI conversion is also messy.

#176342 - sverx - Thu Jun 30, 2011 1:04 pm

I completely agree about the fact that MIDI is much more 'natural' for musicians, so actually maybe what is needed is something that can load sound banks and play MIDI sequences with these banks and then, on top of that, it shouldn't be really hard to support even this SSEQ format.

(BTW I've seen XMs with triplets and every kind of time signatures, so it's not that these things are unsupported, but I believe there are no MIDI converters good enough to do that well...)

#176343 - wintermute - Thu Jun 30, 2011 1:27 pm

fincs wrote:
The main problem with tracked music (MOD, XM, IT, S3M, etc) is that they're designed from the point of view of a programmer, not of a musician.
There's a reason why Nintendo has always chosen a MIDI-like format (SSEQ, Sappy sequences) for their official SDK...



Yet countless musicians have created some really impressive compositions with the protracker spawned formats and, better yet, they mostly sound like they're supposed to on the final target. Sadly MIDI never really achieved that on low power/resource devices.

I'm not convinced by the programmer vs musician viewpoint tbh, many of the musicians I worked with in the games industry loved protracker and it's kin. The ones who didn't tended to be rather awkward to work with - especially when they started complaining about how their compositions didn't sound right on a GBA :/ (hold on a sec while I phone Nintendo and see if they're up for adding $20K worth of studio quality audio electronics to their handhelds :p )

Most MIDI to MOD converters I've seen end up with huge mods which kind of defeats the object of the exercise.

What are the chances of being able to provide support for something more MIDI like within Maxmod? Ultimately there's going to be a lot more traction for something that's built in to the default arm7 core we supply, especially if there are composition tools that musicians like (hint, hint)
_________________
devkitPro - professional toolchains at amateur prices
devkitPro IRC support
Personal Blog

#176345 - sverx - Thu Jun 30, 2011 4:37 pm

Quote:
Yet countless musicians have created some really impressive compositions with the protracker spawned formats and, better yet, they mostly sound like they're supposed to on the final target. Sadly MIDI never really achieved that on low power/resource devices.


I don't know about that, but finally the only difference between a sample based replay driven by a tracker format or one driven by a MIDI is that in the former you control the polyphony directly (each track is one voice) while in the latter you don't do that. But MaxMod, if I remember correctly, anyway had a kind of 'assign the first free voice when needed' system, which might be suitable for MIDI replay too... (but MaxMod internal tracked format unfortunately hasn't been done for MIDI, and that would require an additional format with different scheme...)

#176346 - Ruben - Sun Jul 03, 2011 2:10 am

How about a Midi-based sound system that works side-by-side with MaxMod that is only activated when a certain command is sent? It's not like the ARM9 can access the ARM7's memory, anyway, so there's no extra baggage for the support.

#176347 - wintermute - Sun Jul 03, 2011 10:30 am

If it can fit in the 30K or so we have left in the arm7 ram.
_________________
devkitPro - professional toolchains at amateur prices
devkitPro IRC support
Personal Blog

#176348 - Ruben - Sun Jul 03, 2011 10:54 am

I reckon it should fit with a lot of room to spare.

The Midi-based system I'm using takes up 2404 bytes of memory (no mixing buffers, no reverb, no mixing code. 1344 bytes are for the 24 software channels so sequence only = 1060 bytes), so provided that it uses the MaxMod interface, it should fit fine.

#176349 - Dwedit - Sun Jul 03, 2011 5:09 pm

Will the tool be able to open commercial NDS files and play the songs on them?
_________________
"We are merely sprites that dance at the beck and call of our button pressing overlord."

#176350 - fincs - Sun Jul 03, 2011 9:37 pm

A MID to SSEQ converter is now up. Check it out, there's even a demo package.

The demo package is also a showcase of why I'm doing this project. I am a user of a certain music notation program I'm (very) comfortable and productive with. I had already made the demo file earlier, and the only thing I had to do was adjust the patches, add the loop markers and export to MIDI. Afterwards I converted the MIDI to SSEQ, copied it to the SSeqPlayer project, compiled and I got instant good-sounding music.

Dwedit wrote:
Will the tool be able to open commercial NDS files and play the songs on them?

No. I don't plan on adding support for parsing the SDAT archive format, let alone NDS files; just SSEQ, SBNK and SWAR. However, you can extract those files from the commercial NDS game and feed them to the player.

#176351 - wintermute - Mon Jul 04, 2011 11:36 am

I realise the board rules forbid linking to retailers outside the retail feedback forums but you could at least have specified the actual software you're using in your blog post. I'd definitely be interested in seeing the workflow for this although I'd really prefer to see something that's platform agnostic if at all possible.

Really not a good idea, which you obviously knew given the comment ...
Code:

#define FIFO_SNDSYS FIFO_MAXMOD // Shh... Don't tell WinterMute about this...


Try not to break stuff, this is how 3rd party libraries end up being specified as "if you use this we don't give you support, at all, ever"

If you're writing an audio layer of any description then surely at some point you want to see it being suitable for inclusion in the default arm7 we provide? Even if someone wants to use MIDI based music in a game then they still want to have sound effects - the basic sound stuff in libnds is a bit eww & I'd still prefer that all audio was provided by the same base library.
_________________
devkitPro - professional toolchains at amateur prices
devkitPro IRC support
Personal Blog

#176352 - fincs - Mon Jul 04, 2011 11:59 am

WinterMute wrote:
I realise the board rules forbid linking to retailers outside the retail feedback forums but you could at least have specified the actual software you're using in your blog post. I'd definitely be interested in seeing the workflow for this although I'd really prefer to see something that's platform agnostic if at all possible.

Alright, I've edited the blog post.

WinterMute wrote:
Really not a good idea, which you obviously knew given the comment ...

Ok, I'll change it to FIFO_USER_01. It was just a temporary hack, and besides, using both Maxmod and my stuff at the same time is not tested and could possibly go horribly wrong because of interferences between the two.

WinterMute wrote:
Even if someone wants to use MIDI based music in a game then they still want to have sound effects (...) I'd still prefer that all audio was provided by the same base library.

I'm not sure if you noticed, but I intend to add sound effect support to the player when the SSEQ engine becomes mature enough: currently there's some commented-out code that more or less does that.

#176353 - sverx - Mon Jul 04, 2011 12:25 pm

I'm checking the demo and I must say it sounds really nice, even if I'm testing it on no$gba atm, but will test it on hardware this evening :)

Integrating this with MaxMod would give the programmer a chance to have both MOD/S3M/XM/IT and MIDI/SSEQ available at his request, with sfx support too (which is already in MaxMod). Not bad, really :)

#176354 - wintermute - Mon Jul 04, 2011 12:27 pm

Why replicate and replace what's there already? Surely it's better for everyone to integrate with existing code?
_________________
devkitPro - professional toolchains at amateur prices
devkitPro IRC support
Personal Blog

#176355 - Ruben - Mon Jul 04, 2011 2:36 pm

Well, composing for Midi is a LOT easier+faster. Most video game music uses a sequence-based format as it is simply more practical and less bulky than module-based formats, both in terms of code and data. Further, it's kind of hard to keep track of changes in an instrument (say you were working with an instrument that is used in twelve songs. You'd have to modify every instance exactly) and duplicate samples (name matching is easy enough, but as with the instrument problem, it may suffer from that).

#176356 - wintermute - Mon Jul 04, 2011 7:41 pm

I was referring to the sound effect part Ruben.

sverx has the right idea, he posted while I was replying.
_________________
devkitPro - professional toolchains at amateur prices
devkitPro IRC support
Personal Blog

#176357 - ant512 - Mon Jul 04, 2011 11:34 pm

Ruben wrote:
Well, composing for Midi is a LOT easier+faster. Most video game music uses a sequence-based format as it is simply more practical and less bulky than module-based formats, both in terms of code and data. Further, it's kind of hard to keep track of changes in an instrument (say you were working with an instrument that is used in twelve songs. You'd have to modify every instance exactly) and duplicate samples (name matching is easy enough, but as with the instrument problem, it may suffer from that).


The way to avoid all of these problems in tracker music is to have all of your songs in a single mod. Each subsong starts in a new block, so choosing the subsong is just a question of starting at the correct block number. It's a shame that, compared with what I used to have available on the Amiga, Maxmod is so limited. No way to start at a specific block, no way to get the currently playing samples/notes, no way to get the current block number...

Having written music with SoundTracker, OctaMED (MIDI and MOD), Skale Tracker, Renoise, Garageband and Logic, I don't think that writing either MIDI or MOD is easier than the other. Historically, MIDI sucked for videogame music because none of the machines had built-in soundbanks. The average MOD was 100K; MIDI soundbanks were a few MB. When your disks only contain 880K of data and mixing MIDI polyphony in software takes all of your CPU time, there's no way you'd consider using MIDI.


Last edited by ant512 on Tue Jul 05, 2011 8:35 am; edited 1 time in total

#176358 - Ruben - Tue Jul 05, 2011 3:52 am

wintermute wrote:
I was referring to the sound effect part Ruben.

sverx has the right idea, he posted while I was replying.

Ah, my bad.

ant512 wrote:
I don't think that writing either MIDI or MOD is easier than the other

It really depends on what software you use. Personally, I use Noteworthy Composer - you can literally type in the notes on a stave and they follow a sequential order rather than having overlapping notes all over the place as with most other composition software.

ant512 wrote:
The average MOD was 100K; MIDI soundbanks were a few MB.

The solution to that is to only include what's needed for your Midi file and load dynamically from ROM/FS (the game I'm working on right now has banks that are ~256kB when in ADPCM mode).

As for mixing in software, yeah, it's not exactly pretty, but I liked the idea of a challenge (my old Midi players used the hardware channels). Besides, I can't think of any other way of supporting filter-based reverberation.

#176359 - sverx - Tue Jul 05, 2011 10:16 am

wintermute wrote:
sverx has the right idea


Yes, it happens even to me, sometimes :lol: :)

ant512 wrote:
The way to avoid all of these problems in tracker music is to have all of your songs in a single mod. Each subsong starts in a new block, so choosing the subsong is just a question of starting at the correct block number. It's a shame that, compared with what I used to have available on the Amiga, Maxmod is so limited. No way to start at a specific block, no way to get the currently playing samples/notes, no way to get the current block number...


I tend to agree, but anyway patterns are quite scarce and if you need to put a lot of songs in your game you wouldn't fit all that in a single module... for instance in Manic Miner in the Lost Levels there are 36 separate XMs, to save space each one is gzipped (I mean in the single-file version, which is 3.5MB)... on the other hand in Waimanu DS instead we've been using only 9 XMs, one of them keeps all the short 'jingles' of the game, many of them keep 2 songs in a single file. Both of these games uses libXM7 anyway (...shameless promotion ;) ) which supports starting a MOD/XM from the block you prefer. (and you can even access the replay data while it's playing...)

edit: I guess anyway it should be possible also for MaxMod to start a module from a different point, put up a feature request and wait :)

#176362 - headspin - Wed Jul 06, 2011 9:39 am

You can start at a particular block in the song sequence in MaxMod using mmPosition.
_________________
Warhawk DS | Manic Miner: The Lost Levels | The Detective Game