MIDI in with Basic Stamp II

General Robotics Forum - All aspects of robots and their applications. 

Bookmark this page:  YahooMyWeb Yahoo!  Google Google  Windows Live Favorites Windows Live  del.icio.us del.icio.us  digg digg  Add to Netscape Netscape
Subject Author Date
MIDI in with Basic Stamp II tomiedema 05-05-2007
If you were  Registered and logged in, you could reply and use other advanced thread options
Posted by on May 5, 2007, 4:02 pm
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...

http://vids.myspace.com/index.cfm?fuseaction=vids.individual&videoid 25416436

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


Posted by Don McKenzie on May 5, 2007, 6:33 pm
tomiedema@gmail.com wrote:

> 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...

snip---

> any help would be great. Thanks.
> -Tom

Tom, I know you will be much better off if you join the group at:
http://forums.parallax.com/forums/

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...

--
Don McKenzie
E-Mail Contact Page: http://www.dontronics.com/e-mail.html

Crystal clear, super bright OLED LCD (128x128) for your microcontroller.
Simple serial RX/TX interface. Many memory sizes.
http://www.dontronics-shop.com/product.php?productid 460

No More Damn Spam: http://www.wizard-of-oz.com


The site map in XML format XML site map
other useful resources:
Official Robosapien Website
Lego Mindstorms Website

Contact Us | Privacy Policy