Cheap controller device experiments. The Zynthian seems like a good voice for experimental controllers.
A couple of projects I have seen out there.
A Flintstones style Pitch-Modulation control, using an Arduino Computer and and external ADC. (A modern 32 bit microcomputer board for $6 can match this with their built in ADC converters. In fact the SAMD21 I have been using (also used in the Raspberry Pi Pico) has a 12 bit ADC that can be
oversampled for up to 16 bit resolution, at the cost of speed.
Someone put together this demo of the Accelerometer built into cell phones, being used as a Wah Wah Pedal by strapping the phone to one’s foot. I believe the demo web page accesses an iPhone’s accelerometer with javascript.
The Demo Page - - - - - The Github Sorce
You could make this work as an input device for your Ztnthian (Don’t stomp too hard)
Another pedal form I considered.
Providing you have some sort of motion sensor like a BLE fitness monitor, M5StickC or conference badges I have seen strapped to your foot, you would have a sort of parlor trick. (It’s guranteed that a gadget wired to your foot will end up yanking wires or pulling down equipment racks sooner or later, a more complicated and slower bluetooth interface is the way to go)
I tested a USB wired foot angle detector using $8 in parts.
Testing it with the standalone version of the Vital synthesizer plugin.
Here’s a botched video demo.
I learned that while the Vital mod wheel input accepts 14 bit MIDI control signals, the macro dials only handle 7 but res. input.
While I am mostly interested in making expression controls.
I previously posted a cheap
USB breath control sensor and the Wii Numchuck with a simple to use I2C inteface, I got a couple of these in a Walmart clearance for $3, is there a problem with candy apple pink?
With 2 pushbuttons, a joystick and accelerometer, it might be useful to select patches, etc. A pro might no want to look like they are playing Guitar Hero in a paid gig…
I did make this test using an IMU attitude sensor for note selection, Along the lines of the Altura-MIDI-Theremin’a arpeggiator, I adapted a Harmonica Diatonic scale to globe shaped input device, hoping the shape would provide a stronger position reference.
- Rotating the ball parces through the note table horizontally.
- Tilting forward-back selects a Blow-Draw row of notes.
- Tilting right opens the embouchure, so more adjacent notes play at once.
The musical merits are questionable, trying to keep track of 3 axis of rotation while operating it is is tricky.
I will have a recorded demo shortly…
This is using the same $6 computer and $2 IMU sensor as the pedal experiment. I just ran across a nicely packaged driver for the MPU-6050 that includes code for the internal DMP (Digital Motion Processor) that applies sensor fusion to provide a more steady output. This special code typically had to be requested from the chip maker (not using your gmail address) this library makes it simpler to use. This code can output QUATERNIONs a complex system that can represent angles. (Normal XYZ Euler angles are subject to “Gimbal Lock” a singularity condition that drops data.
Quaternions used in science and video game design uses 4 units of measure to avoid gimbal lock, (the math is incomprehensible to me, thankfully there are friendly conversion routines)
The simplest motion sensor, like cell phones and the Wii Numchuck uses is the Accelerometer, which despite the name are best for measuring static orientation. The name sounds like it would be used in inertial navigation like ships and planes use. But these micro machines are not accurate enough, error quickly accumulate in the double integration calculations, they are OK for sensing quick gestures.
MPU-6050 Teapot Example Video rendered by the Processing app.
The “Teapot” demo using a simple 3D plan is included with the MPU-6050 driver, I tried to go through the 3 Axis Roll-Pitch and Yaw, most noteworthy, the sensor fusion processor provides a stable Yaw (heading) despite having no stable reference, it’s just counting up gyro changes. The demo is using Quaternions so one should not be able to induce gimbal lock.
Accelerometer compute orientation by referencing earth’s gravity, which makes a static sensor appear to be moving away from the surface at 1 G. This is good for Pan and Tilt angles (in aeronautic terms) but the Yaw (heading) doesn’t have a stable reference, 9 degree of freedom (9-dof) sensors include a magnetometer, which allows magnetic compass headings to be read. The vintage MPU-9250 is an example 9 DOF IMU that includes a 3D magnetometer. They can be bought from China for about $3.50, a newer example, the TDK-InvenSense ICM-20948 who’s internal motion processor can do sensor fusion at 200 samples a sec. is available from Sparkfun for $16.95, it includes the new emerging 5mm Qwiic I2C connector standard for those who hate to solder. This tiny JST-SH connector format might be useful in compact Pi Compute Module 4 Zynthian host board designs.
The tiny Seedstudio XIAO shown in some experiments above “the world’s smallest microcomputer” that lists for $4.90 has a better competitor (both selling for $5.99 at a local dealer) > The Adafruit QT Py, it’s a pin for pin compatible design with some advantages:
- Reset button
- Qwiic compatible I2C connector
- And a Flash expansion solder pad on the bottom allowing one to add 2Mb of flash, this promotes it to the Adafruit “Express” class allowing the whole compiled circuitpython device driver lib. to be stored on board.
. (Adafruit has been remaking some old 8 bit processor boards with the 32 bit SAMD21 processor, (Cortex®-M0+ 32bit 48MHz , 256KB Flash, 32KB SRAM) allowing old C++ applications to run in Python with similar speed, the board mounts like a drive volume, allowing code to be edited with a standard PC text editor)
There’s a passing mention of the I2S interface on the QT Py, allowing a single audio data stream input or output. (This might suffice for adding note detection to a breath controller, picking up a Kazoo hum with a digital mic.)