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 development > Streaming music vs. sequenced music

#152222 - tepples - Wed Mar 12, 2008 3:47 am

In this topic, wintermute wrote:
The idea that running mp3 playback on the ARM7 has minimal impact on the ARM9 is rather misleading. As you've mentioned, the audio streaming needs to take place on the 9 but further to that, any accesses the arm7 makes to the shared memory have a large impact on the other processor. You also have to consider the speed of the various FAT devices and their effect on processor time.

True so far.

Quote:
The DS audio hardware also outputs it's final mix stage at 32KHz which reduces any quality gains from a purely streamed audio system. A sequenced format such as the trackers mentioned above is eminently more suited to a resource limited device like the DS.

Animal Crossing: Wild World uses an ADPCM-compressed stream for its title screen music, and I'm pretty sure Meteos uses one for its menu music. And I'd like to see anyone try to implement StepMania with just a sequenced music format.

Quote:
There are applications where mp3 playback is a good choice - video players and mp3 players spring to mind, but not in a DS game.

There's a continuum between "mp3 player" and "game". Things such as StepMania and Luminesweeper fall somewhere in the middle: they're games, but the action is synchronized to a music stream that the end user or a third party content pack author provides.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#152226 - M3d10n - Wed Mar 12, 2008 5:11 am

Well put. In the end it depends on the requirements of each game. For most applications sequenced music is fine, but some games, or segments of a game might need something else. And while it's usually non-existent on homebrew games, what about voice tracks?

But I'm not too keen on vanilla mp3 files for streaming audio on the DS. I'm sure there are other solutions which suit the hardware better. I really need to get doing some serious tests with WavPack one of these days, using DS-tailored bit-depth and sampling rates.

Commercial games always seem to use other (proprietary) solutions too, ADX as example. It was originally developed by CRI for the Sega Saturn and offers good audio quality at 256kbps. It was also low-footprint enough to be used on hardware-intensive games like the first Grandia or Burning Rangers. I've seen CRI's logo on a bunch of DS games already.

Anyway, if this topic is about the inclusion of sequenced music capabilities to libnds's default arm7 binary versus a mp3/ogg/whatever stream decoder... I'd favor the sequenced approach, since it's closer to the way commercial games work.

#152232 - wintermute - Wed Mar 12, 2008 1:45 pm

tepples wrote:

Animal Crossing: Wild World uses an ADPCM-compressed stream for its title screen music, and I'm pretty sure Meteos uses one for its menu music. And I'd like to see anyone try to implement StepMania with just a sequenced music format.


Official code has the advantage of extremely fast storage. Something like Stepmania could easily be done with a sequenced music format but, yes, I can see the advantage of pure streaming. It's certainly much easier to obtain music in mp3 format and convert it to something streamed than to find a good musician with the skills needed to recompose a track.
_________________
devkitPro - professional toolchains at amateur prices
devkitPro IRC support
Personal Blog

#152235 - Lord Graga - Wed Mar 12, 2008 2:35 pm

Most sequenced music players play music differently. Maybe, the pitch table for vibrato is slightly different, or the mixing algorithms are varying or just have different precision, etc. If you want to give the musician 100% control, the only way forward is streamed music (unless he likes to transfer his songs forward and backward between his PC and DS, which is a tedious process).

#152237 - sonny_jim - Wed Mar 12, 2008 3:04 pm

Quote:

Maybe, the pitch table for vibrato is slightly different, or the mixing algorithms are varying or just have different precision

You could say the same for the actual sound hardware itself, ie the frequency range of the DS speakers as compared to the monitor speakers the musician will be using. When producing any kind of music/media the creator always has to bear in mind the final output format, regardless of whether it's streamed/sequenced. Look in the background of most professional studios and you'll spot a pair of the ubiquitous Yamaha NS10. These speakers are well renowned for being crap but the theory goes if you can get it sound good on the NS10's it'll sound good on anything.

But I digress......

#152261 - tepples - Wed Mar 12, 2008 10:15 pm

In this post, Sweater Fish Deluxe wrote:
Personally, I like tracker music better, not because it's more efficient, but because it's more flexible. Unfortunately, the fact is that it's very difficult to find people willing or able to make music for a game in tracker formats. I showed ModPlug Tracker to a couple people I know who had offered to make music for my homebrew DS games, but they just sort of laughed at me.

One thing you can do: First the musician hands you the the multitrack files from Audacity, GarageBand, or whatever. Then you chop it up into notes and sequence those notes. I'm pretty sure that's how keysounded music games for PS2 such as Frequency, Amplitude, Beatmania, and Guitar Hero work. But then those games use samples compressed with Sony's variant of ADPCM (VAG, which is an elaboration on SNES BRR), and I don't know of any tracker formats that support the IMA ADPCM used by the DS.

Sweater Fish Deluxe wrote:
I don't know about using the PSG for music, though. I know there was a demo released a while back showing how to do it, but man...if finding people to compose MOD music for you is difficult, just try finding someone to compose PSG music!

That's what asking around on nesdev.com and 2a03.org is for. Specifically, I have used PSG based music in three GBA/DS projects: TOD, RAC, and Lockjaw.

sonny_jim wrote:
Quote:
Maybe, the pitch table for vibrato is slightly different, or the mixing algorithms are varying or just have different precision

You could say the same for the actual sound hardware itself, ie the frequency range of the DS speakers as compared to the monitor speakers the musician will be using.

The speaker in a GBA or DS can be approximated by EQing the bass way down. Several years ago, I managed to approximate the frequency response of my GBA's speaker by using a third order Butterworth high-pass filter with cutoff frequency 800 Hz. Or on a graphic equalizer, for each band below 800 Hz, drop 18 dB per octave (or 6 dB per major third on a 30-band).

sonny_jim wrote:
When producing any kind of music/media the creator always has to bear in mind the final output format, regardless of whether it's streamed/sequenced. Look in the background of most professional studios and you'll spot a pair of the ubiquitous Yamaha NS10. These speakers are well renowned for being crap but the theory goes if you can get it sound good on the NS10's it'll sound good on anything.

So what we really need in this case is a DS program that combines an FTP server and a mod player. Whenever the user on the PC uploads a tracker file, start playing it.

sonny_jim wrote:
But I digress......

"I'm a little man, and I'm also evil, also into cats, also into cats." How do we put vocals into a tracker file without bloating it to high heck?
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#152262 - sonny_jim - Wed Mar 12, 2008 10:54 pm

Quote:

So what we really need in this case is a DS program that combines an FTP server and a mod player. Whenever the user on the PC uploads a tracker file, start playing it.

Shameless plug, but DSLinux features both a module player (xmp) and an ftp server. It would be pretty easy to knock up a script that combines the two, although xmp sucks up a bit too much cpu power on larger mods.
Quote:

"I'm a little man, and I'm also evil, also into cats, also into cats."

Eh?

#152265 - tepples - Wed Mar 12, 2008 11:28 pm

sonny_jim wrote:
tepples wrote:
sonny_jim wrote:
But I digress...
"I'm a little man, and I'm also evil, also into cats, also into cats."

Eh?

It's a line from "This Ain't a Scene, It's an Arms Race" by Fall Out Boy. Try the YouTube videos behind the Google link that I provided. I thought it would be easier to recognize that than a reference to Blathers from Animal Crossing.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#152267 - nanou - Thu Mar 13, 2008 12:58 am

tepples wrote:

One thing you can do: First the musician hands you the the multitrack files from Audacity, GarageBand, or whatever. Then you chop it up into notes and sequence those notes.

Ouch, that's a lot of work! Go with bars at least. But if you're really going to sequence it, it's best to start from the beginning with a tracker.

Sweater Fish Deluxe wrote:
I don't know about using the PSG for music, though. I know there was a demo released a while back showing how to do it, but man...if finding people to compose MOD music for you is difficult, just try finding someone to compose PSG music!

It's a shame, since there are PSG-compatible trackers and formats but they all suffer from the fact that just about every PSG is different, so you can't just pick up a PSG tracker and make it work. If only there were a tracker that had configurable PSG support (most PSGs can be represented similarly, and mostly the functionality is fairly simple.)

I would personally be delighted to compose with PSG channels in, but there's no way to do it without creating a tracker, a format and a player for it. Not something I feel like spending time on. But what about this? - co-opt the standard module formats to configure PSG settings as empty samples, with the config data in the sample text area. Then you can track it with representative samples in, and just delete them before use. Configuration would admittedly be a pain though.
_________________
- nanou