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 > DS MIDI Demo V.1 and Source

#93081 - TheRain - Sun Jul 16, 2006 9:58 pm

Check my blog http://collinmeyermusic.com/dev/
This is the DS MIDI project I've been working on. There is a dsmidi.h file I created that makes sending MIDI out the DS Card Slot Pin 16 very easy. A few defines are there as well to help in sending the proper messages.

This should also be of help to anyone looking to control or send any kind of data electronically from the DS Card slot.

More (enhenced) MIDI programs to come soon from me. I need to learn to use sprites first though ;)[/url]

#93088 - Sausage Boy - Sun Jul 16, 2006 10:22 pm

When will you release midi cards? :P
_________________
"no offense, but this is the gayest game ever"

#93098 - TheRain - Mon Jul 17, 2006 12:04 am

Lol... for the price of $30 you too can have a MIDI port hacked onto the back of a passkey2 card ;P

But really, I would like to have a real PCB made up... probably more like a general protyping PCB for things besides MIDI too. My main interest in doing this project was actually just to learn how to interface with the EEPROM serial line to do other projects... but someone here brought up MIDI and I have a great interest in that as well because I'm a musician.

BTW... does anyone know of a good etched PCB supplier?

#93253 - josath - Tue Jul 18, 2006 2:19 am

TheRain wrote:
BTW... does anyone know of a good etched PCB supplier?


I hear the people who make passme's use these guys:
http://www.goldphoenixpcb.biz/special_price.php

prices seem pretty good too. From the site, if your board is 10 square inches, you can get 15 of them made for $90 total (price includes shipping to north america)

#98268 - 0xtob - Mon Aug 14, 2006 11:52 am

Hey TheRain!

Great work on your MIDI hardware! This will draw the interest of a lot of musicians to the DS. As several people have begged for MIDI support in NitroTracker, I definitely want to play around with it. The problem is, I have no idea about MIDI. So, I have some questions:
  • What exactly does the DSMIDI device connect to (on the non-DS side)?
  • Do you have plans on selling pre-made DSMIDIs?
I have no experience in soldering and I heard of some people destroying their DSes with self-made interface hardware, so I would rather spend some money on a device made by an experienced person.

Keep going with DSMIDI / DStar!

Bye,
Tob

#98297 - Sausage Boy - Mon Aug 14, 2006 3:00 pm

Quote:
What exactly does the DSMIDI device connect to (on the non-DS side)?


A port like this one, I'd assume.
http://www.comtrade.fr/1024/presse/telechargements/terratec/images/MIDI-HUBBLE.jpg

At least that's what the ports on my synth looks like. Midi is very flexible, input and output doesn't differ much. My synth can either send keypresses to my computer or play midi composed on my computer, depending on if you wire it to the in or out port. For NitroTracker, the most obvious use would be to use a keyboard to play the notes, since most midi devices will not use the exact samples in the tracked song.

Midi keyboard data only contains when, how hard, which note (or pitch?) and which instrument (possible other effects as well), and which instrument number is which instrument is up to the implementer of the player. You can also send other cool stuff via midi (I think), like controlling volumes and stuff.
_________________
"no offense, but this is the gayest game ever"

#98305 - 0xtob - Mon Aug 14, 2006 4:07 pm

Thanks for the info, SausageBoy! I'm considering both directions actually: Using Midi keyboards to play samples / input notes into NitroTracker, and using NitroTracker as a seqencer to control other MIDI hardware.

As I don't have any synths or other MIDI devices, I'd have to test it using my PC. I guess I would then need such a MIDI hubble or similar device to connect the DS to my PC's USB port. Is that correct? There seem to be a number of MIDI to USB converters on the market, so I'll have to do some research.

Another, less costly, solution would be to send the MIDI signals to the PC via wifi, and have a PC server that sends the MIDI signals to music applications or to other MIDI hardware that is attaches via USB. This gives you more freedom, because the DS does not need any cables, but will have a larger delay, and it would require a PC.

#98308 - josath - Mon Aug 14, 2006 4:17 pm

0xtob wrote:

As I don't have any synths or other MIDI devices, I'd have to test it using my PC. I guess I would then need such a MIDI hubble or similar device to connect the DS to my PC's USB port. Is that correct? There seem to be a number of MIDI to USB converters on the market, so I'll have to do some research.


Check if your PC has a joystick port (or if you have any old soundcards with one) - almost always, the joystick port also functions as a MIDI in/output port, with a simple cable:
[Images not permitted - Click here to view it]

#98311 - 0xtob - Mon Aug 14, 2006 4:30 pm

Yes, I remember that the "gameport" was originally intended as a MIDI port, although it's actually only used for joysticks. But I would definitely need a USB adapter, as gamports are rather uncommon in notebooks :-)

#98321 - TheRain - Mon Aug 14, 2006 5:55 pm

Hi! I love Nitrotracker btw... I have been admiring the GUI programming you did for it.

The bad news is, the DSMIDI I created only goes one way- out. The reason for this is that there is only one serial line on the DS card slot... to add two way communication would require some kind of external electronic traffic control- like a Microcontroller or CPLD.

The other bad news is, I have no plans right now to have the design fabricated and sell... Mainly because I've never done this before so the cost of doing so is probably not worth it as I would probably make mistakes on at least the first run. If there was more demand for this card, I would do it.

While it is easy to pop the fuse in the DS when messing with this stuff... this particular mod is a two wire deal... The main thing you want to watch out for if you try this is there are three ground pins on the DS card slot... just make sure they NEVER come into contact with any other electrical signal. Otherwise you will pop the fuse.

Let me know if I can help you out in any way though. The dsmidi.h file is pretty easy to use, it's just one function anyhow ;) but if you need any help with how to set up and use MIDI, just let me know.
_________________
DSMIDI and dSTAR sequencer brought to you by TheRain
http://www.collinmeyermusic.com/dev/

#98328 - masscat - Mon Aug 14, 2006 6:43 pm

TheRain wrote:
The bad news is, the DSMIDI I created only goes one way- out. The reason for this is that there is only one serial line on the DS card slot... to add two way communication would require some kind of external electronic traffic control- like a Microcontroller or CPLD.

If anybody wants to do two way comms you could adapt my SPI/UART bridge by changing the line driver device to get MIDI signal levels (whatever levels these are).

#98333 - TheRain - Mon Aug 14, 2006 7:10 pm

masscat wrote:
TheRain wrote:
The bad news is, the DSMIDI I created only goes one way- out. The reason for this is that there is only one serial line on the DS card slot... to add two way communication would require some kind of external electronic traffic control- like a Microcontroller or CPLD.

If anybody wants to do two way comms you could adapt my SPI/UART bridge by changing the line driver device to get MIDI signal levels (whatever levels these are).


If someone wants to do this... all that has to be done is to add a HEX inverter at the UART inputs and outputs and to set the baud rate to 32,125. Oh, and also voltage divide the input because MIDI is 5 V. MIDI messages are composed of 3 bytes, message type, data 1 and data 2. Each byte is framed by one start and stop bit, so the total bits transmitted for one MIDI message is 30.

Nice work, BTW masscat..
_________________
DSMIDI and dSTAR sequencer brought to you by TheRain
http://www.collinmeyermusic.com/dev/