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 > OSCpad - NDS as an Open Sound Control interface

#161691 - halfbyte - Mon Aug 11, 2008 12:33 am

Looks like after more than one year of lurking around you guys here, I can finally step up and announce something.

OSCpad is (or at least will be) a software to use your NDS as a universal controller for OSC aware applications. Currently it sends data for the touchpad and for the ndsmotion, buttons and probably microphone volume are to follow soon.

yes, I know, there are things like Kaossds, but while I really like all the DSMI stuff, using OSC gives me much more flexibility, better controller resolution (no freakin' 7-Bit MIDI values), plus OSC feels at home in UDP packages so there's no additional software needed.

OSC aware applications are, for example:

    Max/MSP
    PureData
    SuperCollider
    ChucK
    Reaktor


I did not package a release, because there are some important things missing (like network configuration), the curious might want to check out the working prototype (please read the README) at

http://github.com/halfbyte/nds-oscpad/tree/master

Feel free to fork, patch or simply bash it, I would love to hear some criticism on my whacky C code (I am more used to higher level languages nowadays) or if you have any ideas for additional features I probably forgot.

Oh, and if someone with a little more expertise could take a look at the touchpad pressure calculation and why it's totally not working, that'd be super duper.
_________________
half/byte
officially classified as a
nintendo ds homebrew newbie

#161876 - cheesethulhu - Sat Aug 16, 2008 3:17 pm

As far as the pressure is concerned, touchReadXY() does not copy z1 and z2 from IPC to the touchPosition struct. You can get their values from IPC->touchZ1 and IPC->touchZ2. Directly accessing IPC will probably break when the next libnds is released, but the touchReadXY() in SVN looks to properly set z1 and z2, so it should be easy to fix.

#161899 - 0xtob - Sun Aug 17, 2008 8:59 pm

Great idea, I'm glad someone's finally doing it! An idea: How about making it a library like DSMI, so people can integrate OSC in their apps?

Or how about adding OSC support to DSMI? DSMI already supports two modes of operation (Wireless MIDI and DSerial), so a third one certainly wouldn't hurt. I'm not sure about OSC's interface, but if we can get it under the same API as DSMI, all people need to do to give their apps OSC support would be linking against a new library.

Just thinking out loud here. Looking forward to trying it out!
_________________
http://blog.dev-scene.com/0xtob | http://nitrotracker.tobw.net | http://dsmi.tobw.net

#161931 - halfbyte - Tue Aug 19, 2008 8:15 am

First of all, yesterday I managed to get touch sensitivity working (thanks cheesethulhu, you'll end up in "teh credits screen"), plus there's now a rudimenatary way of configuring the network parameters. That's enough for me to qualify for the first binary release. You can find only the .nds at

http://theqtisch.com/oscpad.nds.zip

(The Source, of course is still available at GitHub)

To configure the network, create a file at /oscpad/config.txt on your flashcard containing only one line consisting of hostname/IP and the port number, such as:

-----------------------8<-------------------------
foo.bar:7777
-----------------------8<-------------------------

If the host name is resolvable (Not exactly automatic on the NDS as you all will know), the app will send OSC packets to the host and port specified.

Now all I can hope for is some user feedback to hear what works for you and what not. I am especially interested in feedback from someone with a Slot1 ndsmotion, as I only have a slot 2 device.

In the next step I'll try do demo some of the stuff in video form, especially how to use the OSC data in PureData.

Next steps for the Application will be some kind of visual feedback, a little eye candy and, then, later, receiving OSC data for visual effects.

As for your remarks, 0xtob, I'll have to think a little about DSMI integration, as I see no obvious way to integrate the chaotic and free nature of the OSC protocol into the completely clear and obvious MIDI structure, but let's keep in touch on that.

Extracting the OSC stuff as a library is not only a good idea but also very much planned, especially since I am doing a bit groundbreaking work here (at least I think so) as there's not much OSC code available which scales down to these kind of machines. (There's ?OSC, but that's not OpenSource)

Watch this space :)
_________________
half/byte
officially classified as a
nintendo ds homebrew newbie