No public Spad-specific repo found. Lineage traced:
github.com/electricityforprogress/MIDIsprout) — base sensing/MIDI code, MIT licensed, no scale/menu selection.github.com/electricityforprogress/BiodataSonificationBreadboardKit) — adds button+knob menu system for live Threshold, Scale, Channel, LED Brightness selection.https://github.com/leetronics/midi-biodata) — ports v026's menu features onto the classic MIDI Sprout board layout.Two leaf/skin probe electrodes wired in series with a fixed 100K resistor (R2), into a 555 timer in astable configuration, with a fixed .0042µF timing capacitor (C1).
attachInterrupt(..., RISING)) — one timestamp per oscillation period.Once the array fills, computed over the sample window:
averg — mean of the samplesdelta — max minus min (spread across the window)stdevi — standard deviation of the samplesTrigger condition (does a note fire at all):
''delta > stdevi * threshold'' (threshold default 2.3)
| Output | Driven by | Logic |
|---|---|---|
| Pitch | averg (average resistance level) | map(averg % 127, 1, 127, noteMin=36, noteMax=96), then snapped to nearest note in selected scale |
| Duration | delta (magnitude of swing) | 150 + map(delta % 127, 1, 127, 100, 2500) ms |
| Velocity | fixed | always 100, not sensor-derived |
| CV ramp rate | delta % 127 | sets analog control-voltage slide rate |
%127 folds unbounded microsecond values into MIDI's 7-bit range — a modulo wrap, not a calibrated scale. Monotonic only within each 127µs wrap-band, not globally across the full sensor range.Identical (line-for-line, confirmed by direct diff):
sample() — byte-for-byte identicalanalyzeSample() — identical except one substitution (below)setNote(), setControl(), checkControl(), checkNote(), MIDIpanic(), midiSerial()readVcc(), checkBattery(), bootLightshow(), mapfloat(), freeRAM(), rampUp(), rampDown(), checkLED()scaleNote(), scaleSearch()noteMin=36, noteMax=96, samplesize=10, threshMin/Max = 1.61/3.71, batteryLimit=3000Added in v026 (UI/config layer only, sensing math untouched):
scaleSelect (one fixed array, compile-time only). v026 uses scale[currScale] (5 arrays: Chromatic/Major/DiaMinor/Indian/Minor), runtime-selectable via menu.checkMenu(), thresholdMode(), scaleMode(), channelMode(), brightnessMode()) — v0.21 has only empty stubs (checkButton(), knobMode()).EEPROMex.h included in v026 but no read/write calls found — likely unused/vestigial.Conclusion: v026 (and by extension Leetronics/Spad) = v0.21's sensing/analysis core, unmodified, with a menu/config layer bolted on top.