You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1.4 KiB
1.4 KiB
midi_to_cv
parse midi messages with ALSA sequencer API, and output SPI message to
MCP4921 DAC for controlling an analog synthesizer
tested hardware:
raspberry pi Model B or libre computer AML-S905X-CC
(other linux boards with spidev drivers should also work, but the GPIO
pins may be different)
MCP4921 12-bit DAC
NOTE: you'll need to use aconnect or similar to send MIDI messages from a
device to this program. eg)
$ aconnect -l
$ aconnect 128:0 64:0
useful resources:
MIDI:
http://fundamental-code.com/midi/
https://www.alsa-project.org/alsa-doc/alsa-lib/group___sequencer.html
https://soundprogramming.net/file-formats/midi-note-frequencies/
SPI:
https://forums.raspberrypi.com/viewtopic.php?t=304828#p1856388
https://www.kernel.org/doc/html/latest/spi/spidev.html
https://hub.libre.computer/t/how-to-enable-spi-on-aml-s905x-cc-le-potato/285
GPIO:
https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/tree/README
https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/tree/include/gpiod.h
https://github.com/starnight/libgpiod-example/blob/master/libgpiod-led/main.c
https://libgpiod.readthedocs.io/en/latest/index.html
MCP4921 datasheet:
https://ww1.microchip.com/downloads/aemDocuments/documents/OTH/ProductDocuments/DataSheets/22248a.pdf
AML-S905X-CC:
https://hub.libre.computer/t/libre-computer-wiring-tool/40
https://hub.libre.computer/t/aml-s905x-cc-wiring-tool-overlays-description/62