MIDI in with Basic Stamp II

May 05, 2007 1 Replies

I'm making an automated drum machine for my senior design project and so far I have it set up to simply play off a loop of high/low commands programmed onto the stamp...



formatting link
I want it to be able to read from a midi file (each drum component can be on a separate channel) and play the drums accordingly. I'm trying to use the m-audio Uno USB to MIDI cable, which has an LED that seems to trigger in concordance with beats on midi files, but I'm having trouble translating that to my solenoids.



Here's my questions:



1) Can I simply stick wires into the female MIDI (5 pin DIN) port when connecting it to my optoisolator circuit or is there some barrier there that I'm not seeing?
2) I'm new to BASIC and found some code online and altered it to this... snare con 1 bass con 2 hihat con 3 crash con 4 midiString var byte(3)

main: serin 8, 12, [midiString] if midiString(0) = 144 then pos1 if midiString(0) = 145 then pos2 if midiString(0) = 146 then pos3 if midiString(0) = 147 then pos4 goto main



pos1: high snare pause 10 low snare goto main pos2: high bass pause 10 low bass goto main pos3: high hihat pause 10 low hihat goto main pos4: high crash pause 10 low crash goto main



it seems to make sense...for all I know. However, this isn't working for me...should it?



I can't wait to get all this working and throw some LED rope lights onto my drums (connected in the solenoid firing circuit) and rock in a calculated and efficient manner.



any help would be great. Thanks.



-Tom



snip---

Tom, I know you will be much better off if you join the group at:

formatting link
You may get limited responses here, perhaps even a correct answer, but the stamp groups will give you ongoing support for all your future questions.

Don...

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required