Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 6 of 6

Thread: Midi controller questions

  1. #1
    Junior Member
    Join Date
    Apr 2020
    Posts
    4

    Midi controller questions

    Hi, I'm a musician and I spent over a year programming a midi pedal for me. I like to constantly improve things, and every new idea leads to a Learning process, that leads to another idea. In the end my pedal got complex to the point my arduino nano ran out of ram. This and the midi USB thing at teensy made me buy the teensy lc. After everything installed and buttons and leds soldered to the board, I uploaded my code to the board. But it won't communicate with my hardware. I think the problem is the pin voltage. Is there a way to amplify the 3,6v to have the tx pin sending 5v?
    Last edited by Phil Sznyck; 04-16-2020 at 02:00 PM.

  2. #2
    Senior Member oddson's Avatar
    Join Date
    Feb 2013
    Location
    Isle in the Salish Sea
    Posts
    1,347
    You need smaller value resistors -- 47 Ohm by Paul's schematic (see https://www.pjrc.com/teensy/td_libs_MIDI.html).

    MIDI spec says 10 Ohm on pin and 33 Ohm to the pullup but Paul's value work too. (https://mitxela.com/other/ca33.pdf)
    Last edited by oddson; 04-16-2020 at 02:27 PM. Reason: mixed the pullup and pin values

  3. #3
    Junior Member
    Join Date
    Apr 2020
    Posts
    4
    Ok, I read the midi documents for teensy and noticed that there is a midi library. I've been sending all data via Serial.write on my arduino...
    If now I change my code to use the library and declare the midi ports at "MIDI_CREATE_INSTANCE", and type in "usb, serial1, serial2", every time I MIDI.send something it will send thru this three ports?
    And if that's it, two din midi outputs and midi over usb, do I need to mention HardwareSerial at the midi create instance line?

    By the way, thanks Oddson, really helped!

  4. #4
    Junior Member
    Join Date
    Apr 2020
    Posts
    4
    Aaand while programming the Arduino I've often used the "hairless midi serial bridge", a little program I used to show me the midi output from my controller. It doesn't work with teensy, also it's not as simple as opening the serial monitor. What tool can I use now to not always have to connect my pedal to hardware while developing new stuff?

  5. #5
    Senior Member oddson's Avatar
    Join Date
    Feb 2013
    Location
    Isle in the Salish Sea
    Posts
    1,347
    Hairless is not needed because Teensy supports USB MIDI directly when you compile as a MIDI device (or MIDI device combined with another USB protocol).

    I don't think you can declare multiple ports on the same instance of MIDI.

    (I also don't know why you would want to so perhaps I misunderstand.)

    I use USB MIDI almost exclusively so I'm not all that experienced with hardware serial MIDI but I believe you should be able to send explicit serial data to Serial1 (and Serial2 etc. if needed) with little change to your existing code. But if you want to convert to the MIDI library and the functionally similar USB MIDI support you might want to start with the USB MIDI side and a simple controller as a learning project.



    https://www.pjrc.com/teensy/td_serial.html
    https://www.pjrc.com/teensy/td_uart.html
    https://www.pjrc.com/teensy/td_midi.html

  6. #6
    Senior Member
    Join Date
    Oct 2015
    Location
    Roma (IT, EU)
    Posts
    336
    Quote Originally Posted by Phil Sznyck View Post
    Ok, I read the midi documents for teensy and noticed that there is a midi library. I've been sending all data via Serial.write on my arduino...
    If now I change my code to use the library and declare the midi ports at "MIDI_CREATE_INSTANCE", and type in "usb, serial1, serial2", every time I MIDI.send something it will send thru this three ports?
    And if that's it, two din midi outputs and midi over usb, do I need to mention HardwareSerial at the midi create instance line?
    I've just published the code for my USBMIDIhost -> SerialMIDI converter. You may find something useful there, maybe:

    https://forum.pjrc.com/threads/60610...-Din-converter

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •