Go Down

Topic: What is the purpose of the Midi jack in this diagram? (Read 3624 times) previous topic - next topic

Carthaginian

I'm referring to this schematic:
http://itp.nyu.edu/physcomp/uploads/midi_out_soft_serial_bb.png

found on this page:
http://itp.nyu.edu/physcomp/Labs/MIDIOutput

I have been under the impression that the Midi data is being sent out via USB.  Though I haven't built this yet (waiting for a part to arrive), I'm curious: is the Midi being transmitted through the USB or the Midi Jack?  In other words, am I supposed to plug one end of a Midi cable into that Jack and plug the other end of the cable into some sort of synth?

If not:
What's the purpose of this dangling Midi Jack?
AND
Is there any way to re-work this so that the Midi is being sent via the Midi Jack?  That would be great because then I could have a simple plug-and-play instead of having to process the USB signal somehow.

marco_c

Midi jack is for midi output. You can tell from the sketch.
Arduino libraries http://arduinocode.codeplex.com
Parola for Arduino http://parola.codeplex.com

Carthaginian

#2
Aug 24, 2013, 04:56 am Last Edit: Aug 24, 2013, 05:02 am by Carthaginian Reason: 1
Is this meant to be used with an Android device?  I've tried connecting an Android to the Midi Jack in this schematic, but I'm not getting any sound.

To be more specific, the Android is currently running a piano application that has worked with plug-and-play Midi applications before.

EDIT: Of course, I realize there are MANY mistakes I might've made in assembling the circuit, but at least in concept, would the above sketch work with an Android app?

Carthaginian

Also,

If the Midi data is being sent by serial in the code, what's the point of having the Midi jack in the circuit?

marco_c

Midi requires the circuits to be isolated and the standard uses the jacks for connectors. The midi over USB is common these days but patchy cables between devices are still mostly the DIN jacks.
Arduino libraries http://arduinocode.codeplex.com
Parola for Arduino http://parola.codeplex.com

Carthaginian


The midi over USB is common these days but patchy cables between devices are still mostly the DIN jacks.


I beg your pardon?  I can't understand that sentence. 

So why again is there a Midi Jack in this schematic http://itp.nyu.edu/physcomp/uploads/midi_out_soft_serial_bb.png if (in the code) the data is being written by serial?

Is the Midi Jack necessary at all?

marco_c

Patch cable. Autocorrect on the iPad killed it.

How are you connecting to your MIDI device? If it has a DIN jack, then that is what you use. If it is not connecting through the DIN jack, then you need to change the serial library to use the standard serial routines. Your code is currently using SoftSerial to connect using a different port than the USB port.

This is not hard, so I am probably not understanding what you are asking properly. Just Google the MIDI standard and it is all explained there.
Arduino libraries http://arduinocode.codeplex.com
Parola for Arduino http://parola.codeplex.com

Carthaginian


How are you connecting to your MIDI device?


This is the (rather convoluted) route I've tried with the Midi jacks...

Desktop with Windows 7 <=>
USB <=>
Arduino UNO <=>
Breadboard Wiring <=>
Midi Jack <=>
MIDI to USB cable (maybe it doesn't support Windows 7?) http://www.amazon.com/gp/product/B001HPL8B2/ref=oh_details_o01_s00_i00?ie=UTF8&psc=1 <=>
Micro USB otg cable http://www.amazon.com/gp/product/B005GGBYJ4/ref=oh_details_o02_s00_i00?ie=UTF8&psc=1 <=>
Nexus 7 <=>
Grand Piano pro version (supports Midi via USB) https://play.google.com/store/apps/details?id=com.als.grandpiano.free&hl=en

Leaving aside bugs I might have caused, does this seem like a route that should work?  For the record, I've plugged a Midi keyboard into my Android before using a USB + otg cable and it worked just fine.

marco_c

Quote
Desktop with Windows 7 <=>
USB <=>
Arduino UNO

This I assume is just the standard programming/download cable for the Arduino, so not actually a MIDI connection.

Quote
Arduino UNO <=>
Breadboard Wiring <=>
Midi Jack

This is the circuit, so the MIDI message generation component and circuitry for the interface

Quote

Midi Jack <=>
MIDI to USB cable <=>
Micro USB otg cable  <=>
Nexus 7 <=>
Grand Piano pro version (supports Midi via USB)

This is the component that sends the MIDI messages.

The MIDI/USB cable has two ends - you should be connecting the 'OUT' side (labelled on the plug, usually) and LEDs - do they light up when you are sending messages? If you can't see lights, your circuitry/software is not working as expected. The USB converter cable should have no effect and seems to work given your comment previously.

If you are seeing the LEDs on the cable, then it is probably in the configuration of the software receiving the message.
Arduino libraries http://arduinocode.codeplex.com
Parola for Arduino http://parola.codeplex.com

Grumpy_Mike

Quote
So why again is there a Midi Jack in this schematic

To send MIDI data to other devices.
Some modern MIDI interfaces present the host with a USB HID MIDI device. This circuit does not. This is because it is a very hard thing to do on an arduino. It requires re burning the boot loader and then programming the arduino with a programmer.
On the other hand it is something you can do with a teensy.

Carthaginian

It's working!

I made another go at the circuit, and I discovered that my Grand Piano Pro Version (with MIDI USB support) had mysteriously downgraded to the free version (without MIDI USB support).  I re-upgraded and it now works.

The sound of nonstop chromatic scales on a cheap tablet app == music to my ears!  Haha!

Thank you for everyone's help.

Carthaginian

So after my success yesterday, I come to the same setup today and it doesn't work.  The Midi-USB cable's green light is no longer blinking as it did yesterday.  Also, I've found some strange behavior going on with the wires coming from GND and 5V:

...If I connect GND wire to ground (blue) on my breadboard and 5V wire to the power (red) on my breadboard (as shown in the schematic http://itp.nyu.edu/physcomp/uploads/midi_out_soft_serial_bb.png), the Midi-USB cable's red light is OFF.

...If I connect GND wire to power and 5V to ground, the red cable light turns ON.

...If I connect GND wire to either ground OR power...BUT LEAVE 5V WIRE DISCONNECTED...the red cable light is ON.

I have no formal EE training, and so I have no intuition about what's going on.  To my knowledge, I haven't changed anything since yesterday.  I've double checked my circuit at least 5 times now.

marco_c

Unless you have a proper circuit your digital input will 'float' and switch between high and low randomly. This is your third situation.  The others produce a circuit that is the inverse of the other as far as the sensor is concerned, hence e the difference in whether you see a midi message or not.
Arduino libraries http://arduinocode.codeplex.com
Parola for Arduino http://parola.codeplex.com

Carthaginian

#13
Aug 31, 2013, 01:30 am Last Edit: Aug 31, 2013, 01:31 am by Carthaginian Reason: 1

Unless you have a proper circuit your digital input will 'float' and switch between high and low randomly. This is your third situation.  The others produce a circuit that is the inverse of the other as far as the sensor is concerned, hence e the difference in whether you see a midi message or not.


But in none of these cases is a Midi signal actually being sent.  At most the red light turns on, but the green transmission light does not turn on or flicker.

If something is malfunctioning, is it most likely the chip, the breadboard, or the cable (the code is straight from the website and it worked before).

marco_c

Breadboards are a reasonable way to prototype a circuit but not always reliable as there are a lot of mechanical contacts that can go wrong (get bumped, oxidised, changes in humidity, phases of the moon, etc). If you are sure that the circuit worked, then I would try and move all the connections (eg, remove and insert) and see if that does the trick. Better still is to build a more permanent soldered circuit based on the prototype.
Arduino libraries http://arduinocode.codeplex.com
Parola for Arduino http://parola.codeplex.com

Go Up