really noob question on usbMidi/MIDI and Serial Port

Status
Not open for further replies.

AdmiralCrunch

Well-known member
Hi

It is now my first try to output the signals with midi.. but somehow I don't get it :/

I have set the Serial Port to "Serial" and run this sketch:
Code:
#include <MIDI.h>
MIDI_CREATE_DEFAULT_INSTANCE();

void setup(){ 
    MIDI.begin();                      
}

void loop(){   
    MIDI.sendNoteOn(50, 90, 1);    
    delay(1000);                
    MIDI.sendNoteOff(50, 0, 1);   

    delay(500);
    MIDI.sendControlChange(16,23,1);
    delay(500);
}

now in hairless-midiseria I can select Teensy USB-Serial (and route it to some Midi-IN/OUTs of my midi-interface)
.. I can see the MIDI-messages coming in..

when I now start Ableton, .. nothing happens.. in the midi-menu the ports I have selected to route usb-Serial in hairless-midi are orange, which seems not to mean someting good.

after a while hairless-midi crashes and wehen I restart it, it crahes immediately again.
when I close Ableton, I can start hairless-midi again and see the teensy is still sending ..

also when I start Ableton without hairless-midi running, nothing happens.. the ports of the midi-interface aren't orange anymore, but nothing is coming in(?)

... so I thought I try this usbMIDI-thing :D .. I set the serial-Port to "MIDI" and run this sketch:
Code:
void setup() {

}

void loop() { 
  usbMIDI.sendNoteOn(32, 127, 1);
  delay(400);

  usbMIDI.read();
}

now in hairless-midi the teensy-serial-port is gone.. but I can select "Teensy MIDI" from the ports to route to.. after a while I see signals here, too.

In Ableton I can see data incomind from "Teensy MIDI"-Device, too.


so far, so good..

but how would I get the data beeing send through MIDI-Out simultanously? .. I want to have
USB-MIDI, MIDI IN / OUT / THRU

does this MIDI/Usb thing conflict somehow? What USB-Type would I have to select then?
 
In the usb midi examples that come with Teensyduino the Interface_3x3 is basically what you are looking for as far as the USB-MIDI, MIDI IN / OUT. For MIDI THRU it is typically all hardware and no software such as this 62FFF16B-8F5E-4B90-B5C8-5AFD8C3DB408.gif

However you can also do it in software but this just takes time away from the rest of the program.
 
cool thank you :))

maybe one more question.. what is this usbMIDI.getCable() "Virtual Cable" thing?

USB-MIDI can have up to 16 separate midi 'cables' or ports. They show up in the MIDI configuration of your computer as separate in/outs of a midi device. This way you can have up to 256 separate midi channels. Typical use cases would be controlling several multi timbral synths (where each synth uses several midi channels) on separate virtual cables, creating a USB midi interface with multiple ports or Mackie control emulations for more than 8 channels.
 
I believe it’s the symbol for an inverting buffer, although I can’t remember if it’s strictly necessary or just best practice to use them for any midi transmitters such as MIDI THRU or OUT.

you are right.. i found out, in german it's called "schmitt trigger" .. oO

..but it seems to be the pont @ where I can pick up the readings .. I got it wokring now :)) many thanks @all.
 
In the usb midi examples that come with Teensyduino the Interface_3x3 is basically what you are looking for as far as the USB-MIDI, MIDI IN / OUT. For MIDI THRU it is typically all hardware and no software such as this View attachment 14239

However you can also do it in software but this just takes time away from the rest of the program.

Hi guys.. I just found out, I took 22Ohm resisors instead 220Ohm. .. I mean, it works.. should that bother me? should I change that?
 
Hi guys.. I just found out, I took 22Ohm resisors instead 220Ohm. .. I mean, it works.. should that bother me? should I change that?

I think you will want to change it to the proper resistor so that it interfaces properly with other midi devices.
 
I took 22Ohm resisors instead 220Ohm. .. I mean, it works.. should that bother me? should I change that?

Yes, you should correct this.

The LED current is supposed to be due to 3 series resistors, 2 in the transmitting MIDI devices and 1 in the receiver. The reason for 2 in the transmitter is protection (limited current) in case the cable shorts.

If you use wrong resistors in the transmitter, the current will be higher than it should, which can stress the receiver's optocoupler even when it seems to work fine. If a fault happens, the high current could stress or damage your board.
 
Status
Not open for further replies.
Back
Top