Jump to content

MIDI To 8 Channel Light Controller


altech0000

Recommended Posts

Hello,

I have this problem. I have a roommate and he is doing an art thing for his final project that involves eight lights that need to be turned on and off with distinct patterns(ie programmable). He is okay at coding in VB and I am okay with electronics and PICs with PICBasic Pro. So what I was going to do was have him right a VB program that was basically a channel sequencer(when to turn the lights on and off) and I was going to write the code and design the circuit for a 16F628A chip that would accept a string of serial characters that would be translated into with relay being on or off. I got to thinking and then I thought about MIDI and I was like, why reinvent the wheel?

So I did some research and I landed here, with the MIDIBox. So basically what I want to do is, he would set in a MIDI editor a C0 note to play and then as long as it is playing the light would be on(this isn't set in stone, I just kind of figured it that way, it could also be just a C0 note pulse to turn it on and then another C0 pulse to turn it off later.)

My question is:

1) When using the DOUT module how do you control what output gets turned on/off when? (Do I have to write or modify asm for this?)

Thanks for any help,

Albert

P.S. There will probably be a few more questions before this is done, just can't think of any right now.

Link to comment
Share on other sites

Welcome Altech!

Firstly - I have ask - isn't this your roommates project?? :D

Your best bet is to program in C. SDCC and the MIOS wrapper take care of the asm'ing.

A C skeleton is available to get you started (find it in the svn repository or MIOS base package)

It pretty much speaks for itself.

Programming in C is pretty easy to help for. I just use google - eg "for loop C" and get a lot of pages detailing syntax and usage

check out the C functions reference as well.

You'll see that turning DOUT pins on and off is very simple.

Link to comment
Share on other sites

Thanks for the welcome and the help, I had never found that page before, that cleared it all up for me (at least for now).

Yes this is my roommates project but he was looking at spending about 250 dollars for a professional midi to relay box and I told him I could build it for cheaper, plus I love building things and I am good at electronics. He is great at the art side and good at (better than me) programming and I can help with the hardware side.

Again, Thank You so much.

Link to comment
Share on other sites

A while ago I built a lighting project, and I was a bit weird about etching my own PCB to handle mains current, so I instead used a Velleman quad-triac board:

http://www.velleman.be/nl/en/product/view/?id=9071

It is a nicely made board capable of taking 4 digital inputs straight to opto-isolators, which then fire Triacs.  The board is rigid, the traces are fat, and I even had enough room to lay a big honkin' piece of wire along the length of the high-voltage trace.  I recommend it.  You could probably pipe your DOUTs straight to it.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...