AnotherJohnH / picoX7

Software simulation of the Yamaha DX7 with a MIDI interface for the Raspberry Pi Pico
MIT License
23 stars 2 forks source link

Using a well-known Pico platform to get users #3

Closed magwed closed 5 months ago

magwed commented 6 months ago

Nice project! It would be nice to have a drop-in test possibility to try out your DX7-clone at home with a MIDI-keyboard.

Maybe something like this could be a possible extra target: https://shop.pimoroni.com/products/pimoroni-pico-vga-demo-base?variant=32369520672851

I have one at home I could test.

Still missing MIDI. Is COM-MIDI still available in the latest build? In windows it used to be resonbly easy via driver to install virtual MIDI-ports by connecting them via COM-ports. Maybe this can be used to hook it up to a DAW/MIDI-player in the nearest PC. Or if possible hooking up a USB-profile for MIDI-input that would be visible in PC. Maybe the other core could handle that?

AnotherJohnH commented 5 months ago

That's a nice board my only complaint is that it is a bit "output heavy". Would have been nice to have a few more options or headers that could be used for input. A PS/2 keyboard socket would have made me purchase one immediately as a near perfect 80's home computer emulator platform.

However it has a header connected to UART1 that could be used as the physical MIDI in (with a suitable opto-isolater). [edit - but there does not appear to be a 3.3v supply on the header which makes that harder than it might be]

I expect driving the I2S on that board would require minimal changes to the existing code. (The PWM audio circuit also intrigues me, must be lower quality than the I2S DAC but would provide an exceptionally cheap alternative for a bread board build of the project.)

I've been temporarily diverted on another project but when I get back to this will see if I can quickly build an image that could receive MIDI on the UART header and drives the I2S pins on this board.

AnotherJohnH commented 5 months ago

Have speculated support for the Pimoroni VGA Demo base board in the latest release (v0.1.6) v0.1.6. To get MIDI into the board you will need to wire up a MIDI serial stream 31.25 kbaud 8-N-1 to the GPIO21 header on the base board. If you can connect and configure correctly to your host computers COM ports then you could test via PROG_SWEEP.py.

Be interested to hear if it works.

AnotherJohnH commented 5 months ago

A build from aadbbf7 will have some additional debug ...

  1. The on-board LED will be lit if any voice is ON - useful to check if MIDI-IN is working
  2. Debug console I/O should be routed out via the GPIO20 header on the Pimoroni VGA Demo build - good confidence check

NOTE: Not currently in the uf2s shared for v0.1.6

AnotherJohnH commented 5 months ago

Currently attempting to add USB device support as a precursor to adding USB host support. If successful this should provide an easy way to control the picoX7 as a MIDI slave from a DAW. (USB host support would allow direct connection to a USB-MIDI controller)

USB is complicated and MIDI-over-USB a whole other complication on top of that, so this may take a while and I might run out of enthusiasm.

However currently have the picoX7 appearing as a low level USB device, which is a good start.

mwedmark commented 5 months ago

OK Had a Pi Pico H available, so installed that into picoDemo board and wrote 0.16. Also found a FT232H external USB serial circuit that takes 31250 baud as a setting. So next is to mkae sure that the levels are good (3.3V) and try out some small app (yours) and see if there is any sound. It would be really cool to get Midi-yoke going and connect virtual MIDI-port directly from MIDI-out => serial port which I think should be doable. I'll keep you updated.

mwedmark commented 5 months ago

Thanks for your work! I got sound using the above toolchain in DAC output. I wrote my own program in C# which just sets a program and then a tone! This will be fun to fiddle with going forward. Next task is to connect virtual MIDI-out to this serial port so I can mirror any MIDI-traffic out on the COM porrt and listen to MIDI-files. I'll play the piano myself to maybe I connect it and try it out going forward.

mwedmark commented 5 months ago

Next level is fixed! It was a little bit of work to get it working in Windows. First I tried the Hair-less MIDI-Serial driver but that only supports the standard Baud rates. Then I installed loopMIDI to be able to create virtual MIDI-port and wrote my own .NET program to mirror bytes between MIDI-port and serial port. Works great! So now it is possible to just import a MIDI-piece into a DAW (I use LMMS now) and play notes using the picoX7. Really cool.

AnotherJohnH commented 5 months ago

Sounds good.

With the latest patches on this project MIDI over USB is working on MacOS. I'm now able to drive the picoX7 directly with MIDI out from a DAW (Abelton live) which is very nice. I would expect MIDI over USB would work on Windows too. With this setup the only hardware required is a USB cable, a pico and a supported I2S device.

mwedmark commented 5 months ago

Thanks! OK, that will be my next try. I like to play them directly from my MOX-8. I'm going to try and get that build pipe working so I can build my own releases.