Series: alt.ctrl activities; builds on Kalimba; Spatial arrangement
A controller built on the physical affordance of stiff strips that can be plucked and bent. It borrows the kalimba's construction, not its sound: the metal tines are replaced by bamboo ones covered in copper tape, and under each tine a piece of piezoresistive fabric measures how hard it presses on its pivot, so each tine measures its own displacement.
The tines' lengths are chosen to place their free ends within reach of the thumbs, not to set pitches: a controller's tines need no tuning. The kalimba's construction suits rapid assembly: a single bar held down by two screws traps all the tines between two pivots. The first version, in 2010, had wooden tines, faster to shape than metal. A tine can be plucked, the pressure setting the size of the pluck, and then bent as a continuous control.

| Item | Amazon | Adafruit | SparkFun | Seeed Studio | Mouser |
|---|---|---|---|---|---|
| Bamboo strips, for the tines (the 2010 prototype had ten, of different lengths) | |||||
| A base for the tines and their pivots: wood, a single 3D-printed structure, or laser-cut acrylic like the prototype's clear disc | |||||
| For the pivots and the clamp: a half-round rod for the pressure pivot, a strip for the rear pivot, and a bar with two screws | |||||
| Copper foil tape with conductive adhesive, for the tines, the base strips and the ground bus | 1128 | PRT-13827 | |||
| Piezoresistive fabric, such as Eeonyx's EeonTex, a small piece for each tine; contact the manufacturer, Eeonyx | |||||
| Pull-up resistors, one for each tine | |||||
| A microcontroller board with at least one analog input per tine (the 2010 board used a PIC18F2550, which has ten). For example the Seeed Studio XIAO SAMD21: all eleven of its I/O pins are analog inputs | 102010328 | 713-102010328 | |||
| Hookup wire | |||||
| A computer with software that receives OSC, such as Max or Pd |

A prompt to give a coding assistant, to start the code for this activity. Copy the box, answer its questions about your board and pins, and test what comes back on the bench before you rely on it.
I am building "E-Textile Pressure-Sensing Kalimba", the activity at https://adrianfreed.com/etextile-pressure-sensing-kalimba.html.
Write a program for a microcontroller that reads a controller of stiff bamboo tines, each pressing on piezoresistive fabric, on one analog input per tine (the prototype had ten). Each tine is a voltage divider with an external pull-up resistor (most microcontrollers cannot enable a built-in pull-up on an analog input); the reading falls as the tine presses harder.
Calibrate each tine at rest and pressed fully, and scale its reading to a displacement from 0 to 1. Report both a pluck, with its size, and the continuous bend that follows. Send the readings as OSC messages, as the 2010 prototype did, over USB serial or, on a board with Wi-Fi, over the network; on an ESP32, read the tines on ADC1 pins, because ADC2 is also used by Wi-Fi.
Libraries to explore:
Before writing anything, ask me what I am using: the board and its pins, or the software (such as Max, Pd or Python), and check its documentation for what this needs. Put the pin numbers, ranges and other settings in one block at the top, each with a comment. Say which of the libraries above you use, and why. Start with a test that shows the raw readings, so that I can check the wiring and the ranges before the rest.
This activity by Adrian Freed is licensed under Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0): you may share and adapt it with attribution, for non-commercial purposes such as personal projects and teaching, and you must share adaptations under the same licence. Product names and links belong to their suppliers.