Go Down

Topic: works: MIDI-IN: code + schematics (Read 51353 times) previous topic - next topic

AndreasViruly

Hello,

What I did next was the following:

I connected the RX line to the red side of my voltage meter.
The black side I connected to the ground.

Here I found a voltage of around 7V (7,3-7,4).
By playing several notes at the same time this amount gets less.

The more notes I play at the same time, the lower this amount becomes.

Is this of any help in our quest?

Thanks!!!!!

tep

Yes!
But it should be about 5V... did you checked the resistors?

Titus

7V is quite impossible, given the fact that usb limits it to 5V(so does arduino).
and midi can't be 7 volts!

The "RX pin" andreas, is dat het blauwe draadje wat normaal in de arduino gaat? en zonder led naar 5V?

sciguy

Tep----

That schematic is AWESOME!!!!!
:D
Soundcloud page: http://soundcloud.com/beefinator-2
Youtube channel: http://www.youtube.com/user/beefinator14
Old soundcloud page (ran out o

AndreasViruly

Hello everyone,

I got it working!
At least.. my arduino receives the signal.
I've rebuilt the whole thing and suddently; arduino saw the light  ;)

Now.. next step to get all the lights to work properly.
Thanks for all the help you guys gave me!

Still.. you'll be hearing from me ;)
Cheers,

Andreas

tep

@sciguy: :)

@AndreasViruly: Good, now I guess it'll be very quick, if you only want to light on LED on notes!  ;)

AndreasViruly

#81
Aug 29, 2009, 08:53 pm Last Edit: Aug 29, 2009, 08:53 pm by AndreasViruly Reason: 1
Haha, no that was just the first step. I want to make 36 different LED's corresponding to 3 octaves on the piano. Everytime a note is played on the master keyboard, these LED's have to light up, and go out the moment the key is released. I already saw my keyboard works with the "note on" with 0 velocity, when switching off a note..
I only have 13 pins on my Arduino so I have to start working with multi/charlieplexing.
Programming is just completely new for me so it'll take quite a while I think ;)
But thanks anyhow!  
Andreas

tep

(pins 2-13 = 12 pins + analog pins = 6 pins. Total 18 pins ! ;))
Ok, those methods are good, but not very adapted if you plan to do other time-consuming things. I can recommend you shift registers. I got mine 5 for 1 us$ from Thailand on eBay. It's of course more assembly, but if you go this way I can give you a function to light LEDs a simple way.
Anoter thing : have a look at registers that handle PWM, you could handle the velocity!

tep

#83
Aug 30, 2009, 05:14 pm Last Edit: Aug 30, 2009, 05:49 pm by tep Reason: 1
On my MIDI controller with the MIDI IN issue I consolidated some solder and now found out that if I connect the RX pin to the RX pin of an empty Arduino Diecimila my onboard standalone Arduino receives the signal.

Do you have an idea of how to solve this?
[edit]Hm no, doesn't work anymore this way.[/edit]

tep

#84
Aug 30, 2009, 09:11 pm Last Edit: Aug 30, 2009, 09:15 pm by tep Reason: 1
Something strange: My MIDI IN circuit always work when I connect it to an Arduino. When it is a standalone Atmega, it doesn't work anymore.  :(

Look at this schematic :

He is using a 8-pin optocoupler, but he adds a 1.8k resistor to ground. What you think about it?
(My electronic knownledge is very small...)

mbira

Haven't seen it mentioned here, but I combined this sketch with teh serial to midi converter and it worked just taking the midi in through USB.  Thanks for the sketch!  I finally got my ableton clips triggering and flasing a LED at me when launched.  Nice!

joanvallve

Hey, thanks for all your information, I have an arduino receiving midi from a controller or from the computer..!

Now i have another problem!! (when will i finish!?jejeje) i bought a 9V AC/DC for go everywhere with my arduino and my midi controller. But without the USB power it doesn't works!! What happens?!


joanvallve

I have the circuit done and working, but here is the problem:

With this code, happens two diferent thinks with power via USB or 9V black power jack.

without usb power, never is available, the serie...

Code: [Select]
int statusLed=13;  //one
int statusLed2=12;  //ten
int statusLed3=11;  //hundred
byte incomingByte;

void setup() {
 pinMode(statusLed,OUTPUT);   // declare the LED's pin as output
 pinMode(statusLed2,OUTPUT);   // declare the LED's pin as output
 pinMode(statusLed3,OUTPUT);   // declare the LED's pin as output

 Serial.begin(31250); //9600 for USB i 31250 for MIDI i 38400 for debugging
}

void loop () {
 if (Serial.available() > 0) {
   // read the incoming byte:
   incomingByte = Serial.read();
   blink(HIGH,statusLed);
   delay(temps);
   blink(LOW,statusLed);
   delay(20);
 }
}

void blink(byte valor, int nled){
 digitalWrite(nled, valor);
}


anyone can help me?

thanks a lot!

tep

#88
Sep 06, 2009, 11:42 am Last Edit: Sep 06, 2009, 11:42 am by tep Reason: 1
Hi!
Just to let you know where my problem is:

It is the resistance between RX and 5V.
It should be measured as about 1k to connect either MIDI or USB.
So I can't for now have a standalone solution where it is possible to connect the FTDI from time to time because the resistance is then too low or too high without the FTDI.

I can put a switch to enable a parallel resistor to the 3,3k one : enabled would be MIDI, disabled would be FTDI.
Or perhaps a transistor?
Or a FTDI in my enclosure... I made eveything to not have the need of it, but... And it would allow me also to have MIDI over Serial/USB connectivity.

So, for now I don't really know. I could try a transistor, but would it allow 9600 or 11250bps? I'm not sure with a 2N2222? (Their frequency is 250MHz or 300MHz)



Another thing: check out Ruin&Wesen library, could help some! ;) http://ruinwesen.com/blog?id=582

joanvallve

hi, i'm searching a circuit of a MIDI THRU for put in this MIDI IN circuit, anyone can help me?

thanks!

Go Up