TRANSfert Usb to Midi - TRANSUM

More
2 days 17 hours ago - 2 days 15 hours ago #270 by garrettx
Hello 

Here the first test to transfert file from a pc to micro-8 with a "midi-usb" adapter : 
www.amazon.com.be/Entatial-convertisseur...avier/dp/B09SFTRVDD/
Work with the "old" protocol ( 100b/sec )  send_midi.py
not working good with new one ( 500b/sec ) send_midi_fast.py 

This attachment is hidden for guests.
Please log in or register to see it.


edit/complite TRANSUM2.SRC on micro-8
on pc : run command tools : python send_midi.py -f filetosend.txt -d filetowriteonmicro8.txt -p MIDIOUT2

Free to correct/adapt/bug ! 




 
Last edit: 2 days 15 hours ago by garrettx.

Please Log in or Create an account to join the conversation.

More
2 days 15 hours ago - 2 days 15 hours ago #271 by garrettx
send from micro-8 to pc with midi port
This attachment is hidden for guests.
Please log in or register to see it.


python received.py -f filename.bin
Last edit: 2 days 15 hours ago by garrettx.
The following user(s) said Thank You: ludojoey

Please Log in or Create an account to join the conversation.

More
2 days 13 hours ago #272 by ludojoey
Thanks for the source code!

I had a quick look at it, but a few points are unclear to me.

Unfortunately, I don’t currently have the hardware available to test all this (hence all my questions!).

I don't quite understand what you mean when you mention a speed of 500 b/sec between the PC and the Micro-8.

To send one "useful" byte, it apparently requires transmitting 3 bytes corresponding to the MIDI event.

Given that MIDI transmission runs at 31250 b/sec, shouldn't the effective speed be around 10000 useful bytes/sec (31250/3), rather than 500?

I also have a question regarding the Micro-8 > PC direction, using the midiSend() function: are we limited to sending data that conforms to the MIDI event format?

If, on the receiving side, the Micro-8 only retains MIDI events and therefore requires the data to be "encapsulated" in MIDI events, I had understood that, in the other direction, it was possible to send any kind of raw data through the MIDI OUT port.

Have you tried sending data through the MIDI OUT port that does not conform to the MIDI format, to see how the PC receives it?

Please Log in or Create an account to join the conversation.

More
2 days 11 hours ago #273 by garrettx
(for computer to micro-8)
Yes your calculation are correct
Theoretically, I should be getting up to 10 kbps.

I think, i have a trouble with the "midi buffer" on micro and "time to work this buffer"
i lose some data :/
I have to tune some variable ( msg_delay , block_delay , buffer size ... refresh time )

@franck can help to understand the limitation
The following user(s) said Thank You: ludojoey

Please Log in or Create an account to join the conversation.

More
2 days 11 hours ago #274 by garrettx
for "micro-8" to pc with "raw data"

we can use "SysEx" midi ( have to try )
not sure that the "usb midi" support this
i found some solution with "USB TTL" at 31250 bauds to read byte stream with pyserial ( have to try too )

some few "possible" solutions
The following user(s) said Thank You: ludojoey

Please Log in or Create an account to join the conversation.

More
1 day 21 hours ago - 1 day 21 hours ago #275 by Franck
Upstream (from Micro-8 to external device), you can currently send raw bytes without complying to the MIDI format as long as the receiving side knows what to do with it. This is just serial using MIDI as a transport layer.
Downstream (from external to Micro-8 ), currently packets must comply to the MIDI protocol and are decoded automatically by a small state machine. I have recently implemented a raw mode that bypass the MIDI packet decoding and just stores each incoming byte as is, in the queue. When a byte is available it can be red through the first register (0xffd0). This will be available in the next 0.8.1 release. I've also added a small example in example/io/midi_raw.src
Last edit: 1 day 21 hours ago by Franck.
The following user(s) said Thank You: ludojoey, garrettx

Please Log in or Create an account to join the conversation.

Time to create page: 0.226 seconds
Powered by Kunena Forum