Pages: 1 ... 5 6 [7] 8 9 ... 11   Go Down
Author Topic: works: MIDI-IN: code + schematics  (Read 47438 times)
0 Members and 1 Guest are viewing this topic.
France
Offline Offline
Sr. Member
****
Karma: 0
Posts: 262
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I believe it's the same you can find eveywhere, not very minimalist...
Look at this one :
« Last Edit: September 16, 2009, 11:35:36 am by tep » Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 20
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

thanks for the fast answer!

but, what's p23? is it the out of octocoupler?
I understand the M151250 is the octocoupler isn't true?

the 3k9 resistor is the 3k3 and the 100k resistor isn't painted.

Any example for a IC17 and IC18?

thanks
Logged

France
Offline Offline
Sr. Member
****
Karma: 0
Posts: 262
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Sorry, this seems not the best schematic since it comes from a book and the guy didn't scan everything...
For what I can answer:
- The M151250 is the 6-pin optocoupler, it seems very similar to ours.
- The 3k9 resistor depends on the circuit. As I mentioned previously, with a standard Arduino it is 3k3 and a standalone Atmega chip without FTDI it is 1k.
- Don't worry about the 100k! It works without and often better! (see other pages of the topic)

IC17 and IC18... hum, we'll have to find another schematic I guess!
[edit]http://whitefiles.org/b1_s/1_free_guides/fg1mt/pgs/h10d.htm ?[/edit]

« Last Edit: September 17, 2009, 05:36:55 am by tep » Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 20
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

this schematic is enouth?

http://www.instructables.com/files/deriv/FXY/7LDR/F6S8S2BV/FXY7LDRF6S8S2BV.MEDIUM.jpg



thanks!
Logged

France
Offline Offline
Sr. Member
****
Karma: 0
Posts: 262
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The best would be to try it out! smiley-wink

If you could also post a link to this instructable?
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 20
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

it is a part of a Pod Guitar project:

http://www.instructables.com/id/SJZFF32F6S8S2BY/

i'll try this circuit, i'll post if it's ok if you want
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 2
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Seem to have got the MIDI in code working. I'm hoping to send DMX outputs controlled by MIDI inputs. For this will I need:

2 arduinos?

A Processing - Arduino link?

I think I've spent too much time looking at a computer screen today - forgive any vastly stupid ideas smiley-wink
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 18
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have finally gotten the midi in schematic to work with a casio keyboard using the following code.
Code:
char incomingByte;
byte note;
byte velocity;


int statusLed = 13;   // select the pin for the LED

int action=2; //0 =note off ; 1=note on ; 2= nada


//setup: declaring iputs and outputs and begin serial
void setup() {
  //start serial with midi baudrate 31250 or 38400 for debugging
  Serial.begin(31250);        
  digitalWrite(statusLed,HIGH);  
}

//loop: wait for serial data, and interpret the message
void loop () {
  if (Serial.available() > 0) {
    // read the incoming byte:
    incomingByte = Serial.read();
Serial.print(incomingByte,HEX);
}

}

However, by checking the signals through USB in S2MIDI, it doesn't seem that the computer is receiving actual MIDI commands. Hexadecimal values appear when I press and release keys, but they don't represent actual midi values. Any ideas? (Here is S2MIDI's output for playing c through c (one octave))


2D 33 33 2D 33 37
2D 33 33 2D 34 39
2D 36 39 2D 37 33
2D 36 39 2D 31 2D 31
2D 33 35
2D 35 2D 33 2D 31
2D 33 33
2D 33 37 32 39
2D 33 35
2D 33 2D 31
31 32 33 2D 33 35
2D 31 37
2D 35 2D 33 33
2D 35 2D 31 2D 31
2D 32 31 2D 31
2D 35 2D 33 2D 31
Logged

France
Offline Offline
Sr. Member
****
Karma: 0
Posts: 262
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

How is your setup ? Can you draw a quick schematic ?
(0x2D=45 and that's what you get if you send 144 (note on) at 9600bps and receive at 31250.)
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 18
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset



*The question mark device represents the midi connector from the keyboard.  Also, the optocoupler is a 4N28, not what it says in the photo.

**SO does that mean that I should be receiving in 9600 to get MIDI data correctly??? That doesn't make sense...
« Last Edit: October 27, 2009, 05:40:09 pm by Iteo » Logged

France
Offline Offline
Sr. Member
****
Karma: 0
Posts: 262
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

How is your computer connected ?
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 18
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Via USB with S2MIDI.
Logged

France
Offline Offline
Sr. Member
****
Karma: 0
Posts: 262
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

But what are you doing like this? Are you using the Arduino as interface?  :-?
I guess you wanted to monitor what the Arduino gets using the USB connection, but your baudrate in S2MIDI is not set correctly.
Anyway if you're using pure MIDI>Arduino I think something like a low-cost lcd (ebay, a few $ including shipping) is the best solution for monitoring the input. That's what I do!
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 18
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Pretty much the story is that I bought a midi interface because I wanted to connect my keyboard to the computer to be able to play with sound and record the notes etc. Unfortunately, that interface was cheap and didnt work, so I set out to build one on the arduino.  So I guess I am essentially using S2MIDI to 'forward' the signals to a midi input for a program such as midiox or fruity loops.  RIght now however, I dont receive any sound.  
Logged

France
Offline Offline
Sr. Member
****
Karma: 0
Posts: 262
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

So let's be clear : you're only using the FTDI (USB>Serial) chip of the Arduino.
You're not using the microcontroller.
So you could also only use a FTDI and the circuit with optocoupler, for example this compact 14$ one http://www.sparkfun.com/commerce/product_info.php?products_id=9115 . (I can recommend it.)


Since your FTDI chip receives MIDI at 31250bps, it sends Serial over USB at the same speed. Try to configure S2MIDI for that speed (sorry I never used it).

I'm sure there is a better/cleaner/faster solution using your interface...  smiley-wink
Logged

Pages: 1 ... 5 6 [7] 8 9 ... 11   Go Up
Jump to: