Extra midi io via UART not working in standalone mode


#21

If you are going from a Teensy or Due to Axo, you don't need to use a 5 pin din at all, just link the TX/RX with Axo RX/TX, as they are both 3.3v, you just need to join the grounds so the reference remains level. If you are using a Uno, if this is 5v you will need a logic converter.
I have some ideas for a new object that might work, but I am far from having the time to implament.
If you want to have a go, the idea is, I would start with just reading CC messages first, use the factory RX object, recieve three packages after reading and confirming the first one is a control change status byte then read data byte 1 and 2. Then split the status byte into 2 parts, one half to read the status, the second half to read the channel. So now you have 4 parts, status, chanel, cc, value. Then send the three messages chanel, cc, value out into a "internal midi send" object, and that should be sufficient to get the data into the Axo. Test it, test it with standalone patch change etc...
:grin:


#22

Hey,

4 Years later and I got to try this in my setup: 2 axolotis interconnected with pin PA2-PA3 sending midi to eachother via uart. I tried changing patches on one in standalone while the other is connected to patcher to send midi and monitor incoming midi and it works flawlessly.

I used self made objects based on @Hugo's scripts.

patch4.axp (6.7 KB)


#23

OH! going to try this


#24

If you wanna send midi via uart you have to make your own objects. its quite simple:
you put this in local data

int32_t lsend;
int timer;
// this is for the cc thin object

void SendMidi3(uint8_t b0,uint8_t b1,uint8_t b2){
sdPut(&SD2,b0);
sdPut(&SD2,b1);
sdPut(&SD2,b2);
}
// this defines your midi string

and then you just modify the normal midi objects and replace MidiSend3 with SendMidi3 (what you defined in local data)

Another more lazy way is to route all midi you wanna send via UART out to the internal bus, and then just hack a midi thru object to take all that data and route it the Uart.
But If you use the script that takes incoming midi from UART to internal you might have feedback issues, thats why I went for modifying the midi out objects.