Extra midi io via UART not working in standalone mode


#1

For days now, I have been trying to understand why my midi control doesn't work in standalone mode. Everything works perfectly in GUI mode.
I am using hug\midi_io\extra_midi_io.axp between the Axo and Arduino due, but it appears in standalone mode nothing is being recieved into the Axo. Patch loads and starts up fine, but no midi messages are getting through.
The Arduino is not the issue, because it operates in exactly the same way wether Axo is in standalone or gui mode, the only thing I can think left to try to understand is wether or not the objects for recieving midi in over the uart line functions correctly in standalone mode. Has anyone experienced anything similar ?
:persevere:


Alternate usb or midi inputs?
Axoloti w/Teensy
#2

Adding to the above.. the "start.bin" file on axo startup starts fine and works with midi because the patch file I then load is initiated with a midi CC. So then I expect from the time the start.bin file unloads and or the selected patch.bin file loads, either uart connection is lost somehow, or the related objects in the patch fail.


#3

After more extensive testing last night, I tried having the "start" file and the "patch" file in the same root directory on the SD Card, this did not work. I tried having the Serial UART initializing objects in a controller subpatch auto imbedded into all patches, this did not work.
I guess the question I need to answer is what is happening to the serial signal when it arrives at the RX pin between changing from the "start" file to the "patch" file.
At this stage, the only other work around I can think of is to connect the serial line directly to the Axo midi in din port, this should be too hard, there are simple circuits to do this with, but it will use up the input din which is what I wanted to avoid for future changes.
:persevere:


#4

Have found that the following connections are required to connect the Arduino Due serial uart to Axoloti midi input din.

Arduino Due TX pin ------------------- Axoloti Midi in din pin 5
Arduino Due 3.3v ----220ohm-R---- Axoloti Midi in din pin 4
Arduino Due GND --------------------- Axoloti Midi in din pin 2

Will be tested tonight.

:pensive:


Axoloti w/Teensy
#5

Hmm, Here's my pinout for connecting a Teensy to Axo UART

UART (Midircv) Teensy pin 0, Axo PA2 Rx
UART (Midisnd) Teensy pin 1, Axo PA3 Tx

Pretty sure I don't use a resistor in there since it's UART circuit, not a proper Midi one. I burn my patches to firmware and don't use SDCards. I'll post it later if I remember.


#6

I have the same setup from Arduino Due to Axo, all works fine until changing patches on SD Card.
Maybe connecting TX directly to midi in din, will show whether or not the TX from Arduino is doing its job.


#7

I have now completed testing direct connection of Arduino Due TX to Axoloti Midi in din, and this works perfectly.
So this then gives two possible scenarios for Axoloti uart extra midi io failure when changing patches in standalone mode.
1 - The uart serial connection is lost.
2 - The code for reading the RX data and sending the midi data into the midi system fails.

Tommmorrow I will test the recieving of UART data directly without the midi interpretation object. The midi data sent from the arduino is always strictly control change data type with data1 and data2, so I should be able to read this consistantly as 3 bytes and interpret it into my object, of course if all works out.

But of course for now, I have a work around option that also confirms that all data is being sent correctly from the Arduino.

:stuck_out_tongue_winking_eye:


#8

Hi Gavin I remember using @Hugo's extra midi io objects to send midi between 2 axo boards and it worked well, also in standalone mode. Did you text it with two axos? If that would work it could mean the problem is on the arduino side.


#9

Thanks @Blindsmyth, I only have one Axo, so can't test that one.
The Arduino side works perfectly, my last testing in the post above, I went from the Arduino TX pin to the Axo Midi In Din, and it all works perfectly.
As for the extra midi io setup, it only fails when changing patches in standalone mode, the first startup patch works perfectly, but the opening another patch from the startup patch, the patch opens and starts fine, there is just no control.
Do you know if your setup worked when changing patches in standalone mode ?

Tonight I plan on testing instead of the Midi data from the UART being sent into the midi environment, I am going to see if it works send the midi data out of object outlets instead, if this works, then it means there is something wrong in the object that sends the UART data into the midi environment.
When I refer to midi environment, I mean where you can nominate a CC value to parameter etc with the inbuilt midi setup. There is the object that sends the UART data into the inbuilt midi environment, this is where I may be experiencing the failure, but want to test for it to be sure.
:grin:


#10

Ah, I've just remembered something. If I upload a patch on the Axo I have to power cycle the Teensy to reinstate the UART. It drops out every time.


#11

Just finished more testing.
Firstly I though maybe doing a serial.end() to serial.begin() might do a reset enough to re-connect the uart, it failed.
Then I have tried reading the data directly off the uart pin as I mentioned above, this did not work either.

@mongrol, your experience with the teensy dropping out could be very well related, but I cannot power cycle the arduino because all my menu's are programmed into it, Restarting it would take me back to the beggining of my menu, so this is not an option.

But one thing is for sure, The Arduino Due TX pin can be wired directly into the "Axoloti Midi In 5 pin Din" (try saying that 5 times realy fast.. :stuck_out_tongue_winking_eye:) works perfectly at al times.

So this is my solution for now, yes it takes up a midi input, but at least it still leaves with the USB midi input if needed.

And believe it or not, this issue is my last final major core hurdle to get over in my setup, everything else is just building some more hardware with switches and tidying up some of my messy coding. Will add it all to my project page when i get it all cleaned up.

I hope this documentation is useful to anyone else experiencing similar issues.

No more testing from me on this one for quite a while.
:zipper_mouth_face:


#12

Axoloti MIDI IN 5-pin DIN
Axoloti MIDI IN 5-pin DIN
Axoloti MIDI IN 5-pin DIN
Axoloti MIDI IN 5-pin DIN
Axoloti MIDI IN 5-pin DIN
Make the connection and
WIN WIN WIN


#13

You can actually still use the 5 PIN MIDI IN while connecting to the back of it. I done some tests throwing a ton of MIDI from my Midibox to it while changing parameters from my Teensy plugged into the back. Didn't drop a beat.

EDIT: Actually, I lied. After looking back at my history to remind my aging brain I realise I've said teh exact opposite of reality.

I DID have trouble mixing signals from the back of teh MIDI.

I DID put a 220ohm resister in play.

Might be useful reading through my synth progress. here


#14

I thought something similar, but I thought what might be better is to have the midi go to the Arduino (in your case the teensy) before sent to the Axo, that way the midi packages can be forwarded as they arrive and then any other messages can be surely kept separated.


#15

yeah that is VERY likely to fail. midi at that point (the connector) is only an electrical signal, so merging electrical signals to afterwards interpret into messages will fail as soon as two messages overlap. :slight_smile:


#16

@Gavin
I didnt change patches in my setup, so I can't say anything about that.

I'm going midi pin to pin with my axolotis as well works really well.
You could still use something like a midi merge box or even collect more midi input with the arduino somehow?

Or use a usb midi interface if you don't need the usb port for other purposes.


#17

swwwwweeeeeet.
I'm relieved to hear that this worked. It definitely makes things a lot easier to wire having this as an option. I'm using a Teensy to send midi to my board and having the ability to wire directly to it and then only have to make a couple connections from the Teensy to the Axoloti board seems like a safe option....I'm super curious as to what the header pins on the Axoloti board are for though....havn't been able to find documentation on them yet and if they turn out to to be some sort of alternate input ill kick myself lol


#18

I'm planning to add a midi DIN i/o to the Axo and think these are the pins... PA2, PA3 (confirmation needed). I'll use 220R resistors on both send/rcv and a 6N137 optocoupler on the DIN in (RX) line... this I hope will work and be class compliant midi in out. I also use arduinos and teensys so this thread found me.. :wink:


#19

This will verify the pins for you so you always have something to refer too..

What devices do you intend to connect ?
What Axo object will you use to translate ?

Remember, I raised this thread because PA2 and PA3 loose connection when changing patches in standalone mode..
:stuck_out_tongue_winking_eye:


#20

@Gavin having read this thread again, I'm not sure I can use your 'fix' since I am already using the factory midi DIN? :frowning: (Edit: I am such a newbie... I thought I could just wire into the TX/RX pins and go. Obviously not thinking clearly at all and now realize without using the @Hugo extra_midi_io object, the serial port won't be setup and I won't have anything. Apologies for my lack of insight)
I certainly don't like the idea of adding another DIN only to have it drop out every patch change. I'm currently sending midi from a keyboard and a DIY controller(s) that use arduino boards (due, uno, teensy) to both USB and DIN. I use the midi/in/keybd and midi/in/cc objects.

I'll try connecting like this... (Edit: ...and use the extra_midi_io patch)