🎹 Witness Andres Blanco's mastery as he weaves sonic miracles with the AX73 synthesizer's 'Arp Bass & Lead' Factory preset, using his Kurzweil as a MIDI keyboard. 🎶✨
@tantacrul And worse: #Musitude doesn't even make sense in regards to how a #PC - #Keyboard is layouted and where buttons are, because every #DAW that allows one to abuse a keyboard in lieu of a set of #MIDI keys doesn't do that...
They'd rather go QAZ WSX EDC RFV ... in terms of playing notes because that makes more sense, with naybe shift in some cases...
This chap has effectively hacked together a reversed-engineered pseudo-MIDI IN link for a Pico as part of a Uni course, but has ended up with no proper MIDI circuitry, and the MIDI decoding code is... interesting...
... but all that is easily googlable?
I'm all in for someone having a go - that's great!
But suggesting "you might find his guide very helpful for the way it steps through the basics" ... seems a bit of a leap to me?
@Workshopshed btw, just checked and the MIDI IN is on page 25 (in my copy) and uses a CNY17 optoisolator. It's not too dissimilar to today's circuits if you switch things round. No protection diode mind...
It's from a time of exposed expansion buses of course, so each circuit essentially has to include the UART (a 6402) and clocks too... it's a lot simpler these days with a MCU with built-in UART! :)
Trying to get back into creative coding. The one thing that I've always wanted to do and never figured out is synchronizing music with something like p5.js or p5.py or something similar. What I'd like to do is drive the sketch with MIDI data, which is also being used to play music.
@audiodude I always fall short of figuring out how to do something with MIDI viz... Maybe, just maybe, if we can find a proper #Python#MIDI library we could hook it up with #py5 (https://py5coding.org) which is my favourite #Processing flavour nowadays.
It lists all my MIDI and audio related PCBs so far that I've made for Raspberry Pi (V3/V4, V1, Zero, 400); Raspberry Pi Pico; Arduino Uno; Arduino Nano; Seeed XIAO; and a few other odds and ends.
It also provides the context for the use of the designs and links to all the relevant design and build notes.
DuckDuckFedi, can you recommend me an 88-key velocity sensitive (weighted) MIDI keyboard that doesn't have any weird configuration features that won't work under linux?
I’ve finally gotten myself a Raspberry Pi 400 computer. I’ve wanted one for a while to use as a MIDI player for my Lo-Fi Orchestra. The idea is that eventually I might be able to run it without a large display, but instead use something like the Adafruit Cyberdeck and a PiTFT display (or similar) to give a nice, portable solution.
Warning! I strongly recommend using old or second hand equipment for your experiments. I am not responsible for any damage to expensive instruments!
These are the key Arduino tutorials for the main concepts used in this project:
If you are new to microcontrollers and single board computers, see the Getting Started pages.
Parts list
Raspberry Pi 400 and power.
Adafruit Cyberdeck for Raspberry Pi 400.
Adafruit 2.8″ PiTFT Plus capacitive touch LCD display (for use with a Pi 2/B+ onwards, not the original PiTFT which was just for the Pi 1).
Mouse, HDMI display, etc to set up the Raspberry Pi 400.
Raspberry Pi 400 Setup
I bought a kit so I had an SD card all ready to go with Raspberry Pi OS, so I booted that up and went through the “first run” configuration to get the basic computer up and running.
I used the command line raspi-config utility to set the hostname to something other than the default “raspberrypi”.
Then I used the add/remove software to install some interesting looking apps. There are a lot of sound and music apps including a range of soft-synths, digital audio workstations, sonic programming environments, sound and MIDI utilities, and a lot more.
For my initial purposes I wanted a command-line MIDI player, so I installed pmidi.
Then I used the Raspberry Pi configuration tool to set instruct the system to boot into the command line.
I ignored the talk of a virtual environment, and went ahead and run the suggested commands, although I cloned the Adafruit repository into a newly created tmp directory:
The suggested command uses a rotation of 90 degrees, but when I first booted everything up the display was upside down on the Cyberdeck. I had to re-run with the value rotation=270.
On first running, I was informed I was running a 64-bit kernel but a 32-bit userspace, so was asked to reboot to enable a 32-bit kernel. For what I’m planning on using this for, a 32-bit kernel should be fine so I let it reboot and run the command again.
It takes a few minutes on boot for the display to become active. If a HDMI monitor is still connected then the progress of the startup can be seen there and you can see the point where the display flickers and it switches over to the PiTFT.
Note: This just enables a text console on the PiTFT. There are separate commands to be used to enable the graphical framebuffer which will allow the desktop environment to run on the PiTFT. Full details are available in the Adafruit learning guide.
I’m also not doing anything with the touchscreen at the moment.
One nice thing about having the PiTFT in console mode is that using the ‘startx’ command will start up the desktop on any attached HDMI monitor. This gives a “best of both worlds” option, at least for me.
PiTFT GPIO Usage
The PiTFT display and touch screen use both the I2C and SPI buses, plus two additional GPIO pins. The four buttons are connected to a GPIO pin each.
The most interesting point for me here being that both RX/TX are free, so could be used for MIDI, and GPIO 18,19,20,21 are free so an I2S audio device could be added too.
Additional RPi Configuration
I’ve also enabled SSH access and the serial port using the RPi configuration tool. I’ve disabled the serial console however. As mentioned above, eventually I’d like to be able to use the serial port for a MIDI interface.
I’ve created a directory on the Pi that can be shared out. To do this requires the Samba client so using the add/remove software I’ve installed the following:
samba-2.4.13.13+… SMB/CIFS file, print and login server for Unix.
samba-common-2.4.13.13+… Common files used by both the Samba server and client.
samba-common-bin-2.4.13.13+… Samba common files used by both the Samba server and the client.
The standard install includes many CIFS utilities for mounting Windows shares already.
To configure an area for dropping files, I’ve created a directory in my home area and shared it out using samba.
pi@raspberrypi:~ $ mkdir midi
To configure samba, edit (via sudo) the /etc/samba/smb.conf file:
# Add the following at the end<br></br>[Midi]<br></br>path=/home/(user)/midi<br></br>browseable=no<br></br>writeable=yes<br></br>read only=no<br></br>create mask=0777<br></br>directory mask=0777<br></br>public=no<br></br>guest ok=no<br></br>write list=(user)
Samba also needs to be told about the user too:
pi@raspberrypi:~ $ sudo smbpasswd -a (user)
Note: I’ve disabled the sharing of the home directories by default by commenting out the [homes] line and all following commands in that section.
At this point, browsing to the share \raspberrypi will not show any visible shares (as browseable and public are set to “no”), but browsing to \raspberrypi\midi should connect to the directory on the Pi 400.
Now I can drop over MIDI files and they will be available on the Pi.
Playing MIDI files
The first thing is to find the “port number” of the MIDI interface being used.
I’ve plugged in my Roland UM-ONE and use the command “pmidi -l” to list the playable output ports as shown below.
Then pmidi can be given that port number and a MIDI file to plau and it will just get on with it.
pi@raspberrypi:~/midi $ pmidi -l<br></br> Port Client name Port name<br></br> 14:0 Midi Through Midi Through Port-0<br></br> 20:0 UM-ONE UM-ONE MIDI 1<br></br><br></br>pi@raspberrypi:~/midi $ pmidi -p 20:0 LoFi Orchestra - Carol of the Bells.mid
Here is the output of dmesg showing the UM-ONE detected displayed on the cyberdeck.
This is a great start with many of the building blocks in place. There are some issues though – sometimes it seems to “forget” to use the cyberdeck and I have to re-run the install script with a monitor attached. I don’t know what is causing that so naturally that isn’t any good for a proper solution.
But as can be seen in the video at the start of this post, in general, this seems to work!
Next steps:
Fix the issue naturally!
It would be nice to find a way to automatically select any plugged in MIDI interface when it comes to playing a file.
It would be nice to have some kind of application running to list files and play them.
I’d like to have a RPI400 MIDI interface that I can use directly too. Perhaps some variant of my Raspberry Pi Zero MIDI PCB.
It is 3V3 compatible for use with the Raspberry Pi but the 74HCT14 acts as both a buffer and level shifter so that the MIDI OUT and THRU portions of the circuit present a 5V MIDI design to the outside world. This means that the HCT variant of the 74HCT14 is required, not the HC version. It also means that the H11L1 is powered from 3V3 and the 74HCT14 from 5V.
The schematic itself allows for the use of either TRS (Type A) or DIN MIDI sockets.
I did consider the idea of detachable MIDI DIN sockets too (the schematic includes both) but in the end opted for simplicity and went just with TRS. That option is reserved for a future edition should I wish.
It can’t be seen in the PCB view above, but there is actually a missing link that I’ve missed off when routing the board (the perils of have silkscreen overlaps and elements in your schematic unused in the PCB is not probably paying attention to the DRC…). The 74HCT14 should have pins 2 and 3 tied together, but no link was included. A simple solder bridge should suffice.