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 Misc > DJ'ing software...

#118742 - OOPMan - Fri Feb 16, 2007 10:13 am

Hmmmm, it just struck me...

Has anyone thought of creating a piece of DJ'ing software for the DS?

Would it even be a viable proposition?

It would be kind of cool if one could waltz into one's favourite club and hook up ze DS and let it do much of the work...

A quick look reveals that some OSS DJ'ing software does exist, but it's all for PC platforms...

Anyone think this is a cute idea?

:-)
_________________
"My boot, your face..." - Attributed to OOPMan, Emperor of Eroticon VI

You can find my NDS homebrew projects here...

#118748 - felix123 - Fri Feb 16, 2007 11:48 am

There's no code or binary, just a video. Very cool though.
http://www.zive.at/ndsvisuals/index.html
http://www.youtube.com/watch?v=sbTXoQzOjnc
_________________
Nintendo DS homebrew on Wikipedia

#118759 - tepples - Fri Feb 16, 2007 2:41 pm

First, it would have to be able to decode two Vorbis streams and draw a GUI at full speed. Then, the DJ would have to build a database where each file has a start and end point, a start and end BPM, and a start and end key. During play, the DJ would need ways to search for songs by BPM or by key and add them to the playlist, possibly with variations of playback sample rate to account for up to 2% variation in BPM between songs during a crossfade.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#118765 - Lynx - Fri Feb 16, 2007 3:00 pm

What happened to when the DJ had to match beats? Pretty much they are becoming just a middle man to a play list.
_________________
NDS Homebrew Roms & Reviews

#118769 - OOPMan - Fri Feb 16, 2007 4:32 pm

tepples wrote:
First, it would have to be able to decode two Vorbis streams and draw a GUI at full speed. Then, the DJ would have to build a database where each file has a start and end point, a start and end BPM, and a start and end key. During play, the DJ would need ways to search for songs by BPM or by key and add them to the playlist, possibly with variations of playback sample rate to account for up to 2% variation in BPM between songs during a crossfade.


Ouch! Two Vorbis streams!

Okay, well, one could just use MP3s, that might make it a little easier. If Helix needs roughly 33% of the ARM9 (Figure drawn from simonjhall's Quake DS thread) to decode a single MP3, then it might be do-able to briefly handle the decoding of two at once (Which would be required to do the cross-fading, I'm imagining...)

The GUI could be minimal...

The search by BPM could be handled by pre-compiling a DB based on music files...

Or something...

I've briefly tested the two DJ mixer apps I've downloaded, Ultramixer and Mixxx (Which is OSS :-), and their essential coor function seems to be the same: Maintain two playlists and play songs from them in an alternating pattern, possibly apply a fade mechanism to segue smoothly between two songs...
_________________
"My boot, your face..." - Attributed to OOPMan, Emperor of Eroticon VI

You can find my NDS homebrew projects here...

#118829 - compacho - Sat Feb 17, 2007 5:50 am

Djing software would be cool, but the DS's touch screen only supports one touch point which kinda handicaps the idea a bit. It's still would be cool though.

#118837 - Firon - Sat Feb 17, 2007 8:38 am

OOPMan wrote:

Okay, well, one could just use MP3s, that might make it a little easier. If Helix needs roughly 33% of the ARM9 (Figure drawn from simonjhall's Quake DS thread) to decode a single MP3, then it might be do-able to briefly handle the decoding of two at once (Which would be required to do the cross-fading, I'm imagining...)

He said it was only 10% faster than realtime with a 160kbps MP3 on the ARM9.

#118840 - OOPMan - Sat Feb 17, 2007 9:47 am

Ouch, damn, forgot that part :-(

Well, one could always be totally nutsy and pre-convert one's music to ADPCM.'Course that would result in substantially larger files :-(

Ah, well, it was a fun idea anyway :-)
_________________
"My boot, your face..." - Attributed to OOPMan, Emperor of Eroticon VI

You can find my NDS homebrew projects here...

#118847 - DVSoftware - Sat Feb 17, 2007 1:57 pm

you are forgetting that ds has 2 cpus, if arm9 is still busy decoding one mp3 stream, arm7 can decode another one.

#118860 - tepples - Sat Feb 17, 2007 4:41 pm

That or the program could dedicate a 2 MiB buffer to decoding ahead. At 2048 KiB / 1 byte* per sample per channel / 2 channels / 32 Kisamples per second, it can decode 32 seconds ahead.

* The DS's DAC is so gimped that during a crossfade, you can't really hear the difference between an 8-bit source and a 16-bit source, especially when both sources stay close to full scale as is common in the electronic genres generally used with long crossfades. There are companding methods that squeeze even more out of an 8-bit stereo buffer if you care much about dynamic range.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#118870 - OOPMan - Sat Feb 17, 2007 6:52 pm

Hmmmm, nice idea tepples :-)

I dunno about milking both the CPUs though. One does have to handle file I/O and minor GUI stuff somewhere, right :-)
_________________
"My boot, your face..." - Attributed to OOPMan, Emperor of Eroticon VI

You can find my NDS homebrew projects here...

#118874 - simonjhall - Sat Feb 17, 2007 7:18 pm

Firon wrote:
OOPMan wrote:

Okay, well, one could just use MP3s, that might make it a little easier. If Helix needs roughly 33% of the ARM9 (Figure drawn from simonjhall's Quake DS thread) to decode a single MP3, then it might be do-able to briefly handle the decoding of two at once (Which would be required to do the cross-fading, I'm imagining...)

He said it was only 10% faster than realtime with a 160kbps MP3 on the ARM9.
Don't mean to butt in here a bit, but here are a few more stats for a single song playing on the ARM7:
~25kbps VBR, mono, 11kHz, 2:32 song plays in 39 seconds
160kbps CBR, stereo, 48kHz, same song in 4 minutes (2:15 on the ARM9)
64 kbps CBR, mono, 44kHz, 2:26 song plays in 1:45
...with all the file access going through the ARM9's vblank handler.

The Helix web site gives rough stats of how how performance scales with bitrate and I don't think it's a linear scale. Also don't forget that there's no cache on the ARM7, and that I'm doing the decompression to/from main memory.

Draw whatever conclusions you like about this decoder :-)
_________________
Big thanks to everyone who donated for Quake2

#118878 - tepples - Sat Feb 17, 2007 7:28 pm

Instead of doing file access using remote procedure call, where the ARM7 has to request a read and then wait for the ARM9 to perform it, try doing file access through a ring buffer of about 16 KiB. The ARM7 tells the ARM9 how much MP3 data it has consumed, and the ARM9 keeps the buffer full by reading ahead slightly.

Have you tried splitting the processing between CPUs, where one CPU does the decoding and rescaling and the other does the MDCTs?
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#118948 - OOPMan - Sun Feb 18, 2007 2:58 pm

I feel stupid :-)

After spending about an hour last night in a DJ'ing box I realised the one over-riding flaw with the DJ'ing software idea...

Namely, the DS doesn't have two stereo outputs. Which would make cue'ing and funky tricks rather difficult.

In essence, the software would end up being a slightly fiddly media player :-)

I feel a little dur :-)

Still, one could build a slot-2 device with additional audio outputs and, maybe, an extra audio chip :-)

Or just get a real mixer :-)
_________________
"My boot, your face..." - Attributed to OOPMan, Emperor of Eroticon VI

You can find my NDS homebrew projects here...

#118950 - tepples - Sun Feb 18, 2007 3:18 pm

OOPMan wrote:
the DS doesn't have two stereo outputs. Which would make cue'ing and funky tricks rather difficult.

Cueing is what the automatic beat matching is for, right?
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#118954 - Touchstone - Sun Feb 18, 2007 4:18 pm

tepples wrote:
OOPMan wrote:
the DS doesn't have two stereo outputs. Which would make cue'ing and funky tricks rather difficult.

Cueing is what the automatic beat matching is for, right?

But then you wouldn't be DJ'ing (finding good tunes that fit, match BPM's, find where in the tune it's good to mix, determine the length of the crossfade, bob your head to the beat), instead you would have software that does the DJ'ing for you.
_________________
You can't beat our meat

#118969 - tepples - Sun Feb 18, 2007 6:48 pm

Touchstone wrote:
tepples wrote:
OOPMan wrote:
the DS doesn't have two stereo outputs. Which would make cue'ing and funky tricks rather difficult.

Cueing is what the automatic beat matching is for, right?

But then you wouldn't be DJ'ing (finding good tunes that fit

That would still be done by the user, who builds the playlist based on how the crowd is reacting.

Quote:
match BPM's

SELECT * FROM songs WHERE bpm > 120 AND bpm < 130 and if the match is inexact, resample by up to 2%.

Quote:
find where in the tune it's good to mix

Cue points set in the database, and the user drags the tracks on screen so that the cue points line up.

Quote:
determine the length of the crossfade

The user either specifies the number of measures to mix or draws the crossfade in real time on the Touch Screen.

Quote:
instead you would have software that does the DJ'ing for you.

Which gives the DJ more time to interact with the crowd.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#118972 - OOPMan - Sun Feb 18, 2007 7:23 pm

Yah, having two stereo outs is kind of necessary to beat mix. I mean, you can be dodgy like some of the DJs at that goth clob I hang out at and just fade out and in over a 15 second period, but that doesn't work for everything...

So, yeah, the lack of 2 stereo outs is a bit sucky :-(

As for the auto-DJing vs manual DJing...

Having an auto BPM matching thing doesn't make it any less difficult to pick good music :-)

As for DJ-crowd interaction, if that involves the DJ shouting lame crap like "Yeeeehaaaa" and "Everybody enjoying themselves?" then it can be done without ;-)

Blah :-)
_________________
"My boot, your face..." - Attributed to OOPMan, Emperor of Eroticon VI

You can find my NDS homebrew projects here...

#119073 - Lynx - Mon Feb 19, 2007 1:46 pm

Basically,the only "real" way you could use the DS to DJ would be to have two DSs with a mixer and then just have the software give you the options to adjust the tempo, pitch, etc. If you want to get tricky, setup an interface on slot-2 that would allow both DS access to the same HD full of MP3s.

Anything other than that, and you have a middle man to a play list. Maybe I'm just old fasion, but I don't consider that being a DJ.
_________________
NDS Homebrew Roms & Reviews

#119090 - OOPMan - Mon Feb 19, 2007 3:35 pm

Yeah, that was kinda what I was getting at :-)
_________________
"My boot, your face..." - Attributed to OOPMan, Emperor of Eroticon VI

You can find my NDS homebrew projects here...