stamp to midi connection
Hi everybody,
I'm new to Basic Stamp and was wondering if someone could help me figure out how to connect the stamp to a midi keyboard.
I’ve followed the instructions mentioned in the nuts and volts tutorial by soldering a female 5-pin DIN socket to a cable with 220 Ohm resistors. I’ve tested the cable and everything seems to be fine. I’ve also downloaded Jon’s mystery song and modified the baud rate (60) to match my Stamp SX module connected to a Board of Education.I’ve connected the I/O cable to pin 15, the voltage to the VDD and the ground to the VSS. However, I’m still not receiving any music from my keyboard.
I’m not sure what I’m doing wrong and would appreciate if anyone has any advice on how to send output from the stamp to the midi.
Thanks in advance for any help.
Post Edited (Lars Jepsen) : 4/6/2005 7:21:24 PM GMT
I'm new to Basic Stamp and was wondering if someone could help me figure out how to connect the stamp to a midi keyboard.
I’ve followed the instructions mentioned in the nuts and volts tutorial by soldering a female 5-pin DIN socket to a cable with 220 Ohm resistors. I’ve tested the cable and everything seems to be fine. I’ve also downloaded Jon’s mystery song and modified the baud rate (60) to match my Stamp SX module connected to a Board of Education.I’ve connected the I/O cable to pin 15, the voltage to the VDD and the ground to the VSS. However, I’m still not receiving any music from my keyboard.
I’m not sure what I’m doing wrong and would appreciate if anyone has any advice on how to send output from the stamp to the midi.
Thanks in advance for any help.
Post Edited (Lars Jepsen) : 4/6/2005 7:21:24 PM GMT
Comments
That said, the attached template may be helpful.· I use it for all my projects and as I have·bit of an interest in MIDI, I have included the correct values for the MIDI baud rate.· In my opinion, embedding numeric values (instead of named constants) into instructions like SEROUT et. al. is bad form and makes programs difficult to debug.
BTW: Since the contest is long over, the "mystery song" is the X-Files TV show theme.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas, TX· USA
Post Edited (Jon Williams) : 4/6/2005 2:35:46 PM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·
Steve
http://ca.geocities.com/steve.brady@rogers.com/index.html
"Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas, TX· USA
Thanks for the quick reply. I used the same code that you wrote for the mystery song that should be stored in the eeprom but changed the MidiBaud to $8000 + 60. I’ve also run tests with a multimetre on the female 5-pin din cable too make sure that the resistors and connection work. I’d like to know if the setup for the wiring I used in the picture I attached is correct because I can’t get any output from the stamp to the midi. Is my setup wrong?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas, TX· USA
I actually went into the closet and dragged out my RadioShack MIDI keyboard and connected it per your schematic and ran your COUT.BSX program -- it works.· As a way perhaps to assist I wrote the attached program which will play C to each MIDI channel.· I suggest you connect your Stamp to one keyboard, and if you have cables, connect the other keyboards in a chain.· Run this program and hopefully you'll get some action.· If not, I think that you've got wiring issues (I know I keep bring that up, but it's the problem 98% of the time).· FWIW, my cheapie keyboard plays a piano note on channels 0 - 3, and a steel drum on channel 9.· All other channels are silent.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas, TX· USA
Post Edited (Jon Williams) : 4/7/2005 2:52:51 PM GMT
Thanks a million for all your help and support. You were right with regards to the problems being associated with the cable wiring. I had originally soldered the wires according to figure 94.1 shown in the nuts and volts article. The code you uploaded showed a different schematic requiring that I reverse the position of the I/O and voltage wires. That seemed to solve the problem. Everything works now and I’m currently listening to your mystery song!
Post Edited (Lars Jepsen) : 4/7/2005 9:52:37 PM GMT
Here's one of my references: http://www.borg.com/~jglatt/hardware/pc_intfc.htm
You will sometimes see the connections reversed in schematics involving small microcontrollers. I think the reason is that some of them are not able to send data in True mode (idle state of serial line is +5) -- since the MIDI connection is a current loop they can make it work in Inverted mode (idle state of serial pin is Vss) by reversing the connections.
Or maybe I'm reversed -- anyway, have fun. As for me, I'm working on a couple MIDI projects: a "sniffer" that will listen to the MIDI data and tell you what's happening (on an LCD), then a general-purpose output device that will respond to Note-On commands (and Note-Off or Note-On with Velocity of 0). The latter idea may become a product for our EFX line as that kind of device is useful for triggering props and FX from a MIDI program (like Cubase). Both project use the SX micro and I'm writing the code in SX/B (BASIC compiler for the SX) with buffered serial input for the MIDI stream.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas, TX· USA