Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

My First Successful MIDI Project

Status
Not open for further replies.

Jon Wilder

Active Member
So I've officially built my first successful MIDI project. It's the dumbest thing in the world but the point is I wrote the code and got the damn thing to work with minimal hardware debugging and no software debugging.

It's basically an LED that only turns on/off when sending it a MIDI CC 80 On/Off message on MIDI channel 16. The CC and MIDI channel are hard coded at the moment but the point was to build a project that responded to A MIDI message. Here's the schematic -

**broken link removed**

I have also attached the code.

This was my first ever attempt at writing any sort of MIDI code along with building a uC circuit that would respond to MIDI. Hopefully this is the beginning of some cool ideas I've had that have to do with MIDI that I never implemented due to not knowing anything about uC's and programming.
 

Attachments

  • code1.asm
    4.8 KB · Views: 304
Last edited:
Thanks for posting. Keep it up.

I am planning to design a Robot to play the Steelpan...Trinidad's National Instrument. Hopefully I will want to feed it a MIDI score and it will respond appropriately.
 
You've build that circuit with a PC 900 instead an CNY 17 - Very good, that avoid Problems!

You should enhance the schematic with an THRU output, to implement it to an existing MiDi environment.

The Controller should have more ports, to implement tip switches and a Display.
Than you get a very universial MiDi Board.
 
You've build that circuit with a PC 900 instead an CNY 17 - Very good, that avoid Problems!

You should enhance the schematic with an THRU output, to implement it to an existing MiDi environment.

The Controller should have more ports, to implement tip switches and a Display.
Than you get a very universial MiDi Board.

I figure since the MIDI electrical specification calls for a PC900 specifically I couldn't go wrong there. Plus...they're cheaper than a 6N138.

The MIDI Thru shouldn't be too hard. A couple of inverting buffers (either IC or discrete transistors) and a couple of 220 ohm resistors + another DIN port.

I'm very new to the uC world so this was just kind of a "first stepping stone" for me to see if I could even build a circuit around a PIC and write a code that would respond to MIDI. However, I plan to further my education in this and build much more elaborate MIDI stuff to include a display and some sort of user configurable interface to it. However I haven't yet gotten to the point of learning how to write dynamic code yet with user definable variables and things like that.

Any sort of guidance and info anyone here can offer up is greatly appreciated.

I honestly thought configuring the USART would be a trying task but with some online examples plus the information contained in the 16F628 datasheet it was actually a breeze.
 
Last edited:
Last edited:
Everytime the discusses about the best Optocoupler for an MiDi in port! I can't hear it anymore.

When you will create larger MiDi programs, I think it is better to change to an other program language.
Variable handling and inserting of math operations is much easier in an higher order language.

Assembler is very useful for time critical routines, for a whole project it will be to complex to handle it.
My favorite is "C". It is possible to insert assembler routines into "C" Sourcecodes.
That can speed up the program massive.
How to do this appends from the used compiler.

I came from the ATMEL AVR World, so i can't give you tips about an useful compiler for an PIC Microcontroller.

I think your schematic is a very good startpoint to get experience with microcontrollers and MiDi.
For complex MiDi applications the controller would be a little bit tiny.
So i suggest you to take a microcontroller with more resources.

At time i collect information for an 4 Channel MiDi merger.
I found no sources for the best strategy, how to handle the different commands from the 4 inputs, to merge it to one output.
As controller i want to take an ATMEGA1280, because it has 4 USART, enough RAM and more than enough ports ( 100 Pins! ) for this project.
I hope to finish this project any time ;-) .
 
Yes the whole PIC thing was just a basic starting point for me. I'm wanting to get into the 8051 world of uC's as most high end MIDI devices use an 8031 with separate PROM.

Assembly was a little tricky for me to catch onto but with some repetitive reading I finally have the hang of it somewhat. With any sort of C language however I'm WAY lost without knowing where to start.

I am willing to learn C if I can find some instruction that is comprehensible to me.
 
Yes the whole PIC thing was just a basic starting point for me. I'm wanting to get into the 8051 world of uC's as most high end MIDI devices use an 8031 with separate PROM.

Unless you're moving out to India it seems a bit pointless?, if MIDI devices are using 8051's it's because they are antique designs, or come from India etc. which seems the only place to still be using them.

If you want higher end devices then the higher end PIC's (or higher end AVR's as mentioned above) would be a far better choice.
 
Unless you're moving out to India it seems a bit pointless?, if MIDI devices are using 8051's it's because they are antique designs, or come from India etc. which seems the only place to still be using them.

If you want higher end devices then the higher end PIC's (or higher end AVR's as mentioned above) would be a far better choice.

I actually work for Voodoo Lab (formerly Digital Music Corporation) as their tech support. We make the Ground Control Pro MIDI foot controller along with the GCX Guitar Audio Switcher. Both devices use an 8031/8032 as the brain.

The Marshall JMP-1 MIDI preamp also used an 8031 as the brain.

Guitar devices (unless you're using a guitar synth) use only a small spectrum of MIDI...Program Change, Control Change, and Bank Select. We use it mainly for switching multiple devices in/out of the signal path, patch/scene memory recall, as well as controlling a parameter setting in real time via an expression pedal, CC On/Off messages and controlling banks on processors that have more than 128 "patches" as those are done in multiple banks of 100 or so.

I don't plan to build any sort of MIDI devices that involve any sort of Velocity or Note On/Off like synthesizers do. I'm only using it as a control protocol. But since every other manufacturer of MIDI guitar gear uses the 8051 family of uC's the higher end PIC line would be an option to explore as it would make my devices different from everyone elses.
 
I actually work for Voodoo Lab (formerly Digital Music Corporation) as their tech support. We make the Ground Control Pro MIDI foot controller along with the GCX Guitar Audio Switcher. Both devices use an 8031/8032 as the brain.

The Marshall JMP-1 MIDI preamp also used an 8031 as the brain.

Guitar devices (unless you're using a guitar synth) use only a small spectrum of MIDI...Program Change, Control Change, and Bank Select. We use it mainly for switching multiple devices in/out of the signal path, patch/scene memory recall, as well as controlling a parameter setting in real time via an expression pedal, CC On/Off messages and controlling banks on processors that have more than 128 "patches" as those are done in multiple banks of 100 or so.

I don't plan to build any sort of MIDI devices that involve any sort of Velocity or Note On/Off like synthesizers do. I'm only using it as a control protocol. But since every other manufacturer of MIDI guitar gear uses the 8051 family of uC's the higher end PIC line would be an option to explore as it would make my devices different from everyone elses.

As I said, they only use the 8051 for historical reasons (very old designs), or because they are designed in India :D
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top