Forum Rule: Always post complete source code & details to reproduce any issue!
-
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 03:00 PM.
-
Senior Member
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 03:27 PM.
Reason: mixed the pullup and pin values
-
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!
-
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?
-
Senior Member
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
-

Originally Posted by
Phil Sznyck
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
-
Forum Rules