sgDevice is a MIDI interface that can send and receive MIDI messages to/from a computer via USB. It has a knobs, switches and triggers. The state of these controls is reported to the connected computer. It may therefore be used as an input device to control any kind of software that receives MIDI messages - there is no intrinsic audio related functionality. sgDevice (ver. 2) uses the Arduino Mega microprocessor board.
This repository contains:
-
Basic information about sgDevice, a homemade MIDI device
-
A software library for the puredata music software that enables puredata patches to react to messages from the sgDevice. This allows a pd patch to e.g. play notes when a trigger is pressed or updating an effect parameter based on a knob position
-
Tools and utility scripts to compile and upload the firmware to the sgDevice
-
Initialise project (download dependencies, ...):
$ ./scripts/init.fish
This will download and git dependencies into
./dependencies/
-
Clean project
$ ./scripts/exit.fish
- arduino-cli
- ( legacy)
arduino
: only for sgDevice1
-
Turn the Arduino into a native MIDI device:
The case has to be open in order to set a jumper. This (hopefully) has only to be done once!
plug the device in the PC via USB, then run:
$ ./scripts/arduino_upload_usb_firmware.fish
The script will guide you
-
Set midi device name:
plug the device in the PC via USB, then run:
$ ./scripts/midi_set_device_name.fish
Plug the device in the PC via USB, then run:
$ ./scripts/arduino_upload.fish
The script will guide you
- puredata: the famous computer music software
-
Install library to a local dir
$ ./scripts/local_init.fish
-
Run Example
$ ./scripts/local_run.fish
This opens an example patch documenting the major parts of this library.
-
Uninstall library from the local dir
$ ./scripts/local_exit.fish
-
Build and install:
$ ./scripts/build.fish install
(for options append
--help
) -
Configure pd to load the library
start pd and add
structuredDataC
underFile -> Settings -> Start -> New
-
Configure pd to find abstractions
start pd and add
<install_location>/structuredDataC
underFile -> Settings -> Path -> New
-
Make sure the dependencies are installed. Please refer to the corresponding documentation of these libraries.
- structuredData: Utiliy library for puredata
- zexy
The Documentation is provided as puredata example patches accessible in pd under Help -> Patch Browser -> structuredDataC
.
Alternatively, for help with a specific object, right click on it and select "help".
$ ./scripts/local_init.fish
$ ./scripts/local_run.fish --debug
Check ./logs/
directory afterwards
$ ./scripts/arduino_usbdump.fish
-
MIDI Specification:
-
Turn the Arduino into a native MIDI Device.