Shop OBEX P1 Docs P2 Docs Learn Events
Serial to USB to MIDI to Confusion — Parallax Forums

Serial to USB to MIDI to Confusion

RubrChickenRubrChicken Posts: 39
edited 2010-10-14 06:51 in Propeller 1
I am attempting to make a crossfader that will interface with software DJ programs. I have a slide potentiometer and an ADC, but I am having trouble with getting MIDI data to the computer. I am running Ubuntu 10.10 (released this past Sunday) and the program I am using is Mixxx. I can receive data just fine over serial, but I need to convert this data to MIDI. Do I need to set FullDuplexSerial to (31,30,0,31250), because MIDI runs at 31250 baud? Or can I just set this to anything higher than 31250 to avoid latency issues? To clarify again, I do not want the propeller to have a MIDI port, I want it to have a virtual one over the FTDI connection.

Thanks for any help!

If I look like I am bumbling around, that is probably because I am.

(I did ask a similar question a while ago, but this time I cannot use a midi port, it has to be over USB)

Comments

  • JonnyMacJonnyMac Posts: 9,208
    edited 2010-10-12 05:29
    Midi is a serial protocol. What you need to do is find out what part of the Midi protocol the program is expecting.
  • AntoineDoinelAntoineDoinel Posts: 312
    edited 2010-10-12 05:54
    Look for "roland serial MIDI driver", I succesfully used it with Demo Board USB and the MIDI synth object.

    It's running at 38400 instead of 31250, but it appears as MIDI device on PC side.

    I guess it was used back at the time with some external device converting from 38400 to 31250, because MIDI rate was problematic on PC serial ports.

    I don't recall the exact details right now, but IIRC you only need to set Prop to 38400, install the driver on PC side and configure it for the USB serial.

    Alessandro
  • RubrChickenRubrChicken Posts: 39
    edited 2010-10-12 07:06
    I've seen that driver, but is there a Linux version? I need this to run on Linux.
  • AntoineDoinelAntoineDoinel Posts: 312
    edited 2010-10-12 09:04
    I've seen that driver, but is there a Linux version? I need this to run on Linux.

    there is a "snd-serial" driver in ALSA doing approx the same thing, but I've tried modinfo on it, unfortunately it seems to be tied to the 16550 chip (it only allows port selection by ISA I/O+IRQ) so it's not useful with ttyUSBx :-(
  • RubrChickenRubrChicken Posts: 39
    edited 2010-10-13 09:55
    Yeah, I saw that too, it looked a bit cumbersome. I also saw NOTEMIDI, which the developer doesn't want anyone to use in favor of snd-serial... Still looking for a good solution.
  • AntoineDoinelAntoineDoinel Posts: 312
    edited 2010-10-14 06:51
    One solution should have been "socat" to route between raw MIDI (virtual) device and USB serial device, but for some reason it fails to open the snd-virmidi end of the route.

    However it works serial<=>pipe : if your midi app allows specifying full MIDI device name, you could try throwing a pipe at it instead.

    But in the end the best thing would be a small C program, (properly) opening snd-virmidi, then USB serial, then cross-copying between the two when a select() call reports input data available.
Sign In or Register to comment.