Skip to content

Instantly share code, notes, and snippets.

These are instructions for building a stand alone, headless, music computer based on the Pisound audio card and a RaspberryPi 3.

I use this set up in my live performance rig where it does all of the following without breaking a sweat:

  • Audio effects
  • stutter gate (beat sync'd)
@mzero
mzero / ddp-to-kunaki.py
Created April 9, 2019 00:14
Convert DDP mastered CDs to Kunaki's CUE format
"""Convert DDP mastered CDs to Kunaki's CUE format.
tl;dr:
python ddp-to-kunaki.py my-cool-cd-ddp-dir my-cool-cd-kunaki
This will produce two files:
my-cool-cd-kunaki.CUE <-- the markers
my-cool-cd-kunaki.iso <-- the audio (*not* an ISO format file!)
@mzero
mzero / dmastall.ino
Created December 26, 2021 05:20
Sketch for Curcuit Playground Express board demonstrating bug in FreeTouch library
/* DMA Stall
This sketch will demonstrate how the FreeTrouch library code makes reads to
PTC peripheral registers without the required Read-Synchronization. While
such reads succeed, they stall the AHB-APB Bridge C.
This is normally not an issue - but if there are other accesses going through
that bridge, then they will be stalled as well. A common example is to use the
DMAC to transfer data to the DAC or from the ADC. These peripherals are on
the same bridge (C). Stalls caused by non-scyhcronized reading seem to be on
@mzero
mzero / ghc-clang-wrapper
Created October 31, 2013 06:53
This wrapper script *should* enable GHC 7.* to work on systems with Xcode 5. To use it, drop this script somewhere, make it executable, and run.... Then follow the instructions it prints out. What it will do is, instruction you to put a copy in /usr/bin, then re-run it sudo. It will then find all your GHC 7 settings files, and patch them to make…
#!/bin/sh
inPreprocessorMode () {
hasE=0
hasU=0
hasT=0
for arg in "$@"
do
if [ 'x-E' = "x$arg" ]; then hasE=1; fi
if [ 'x-undef' = "x$arg" ]; then hasU=1; fi
@mzero
mzero / snd-digitakt.md
Created October 29, 2019 17:08
digitakt usb audio driver on RaspberryPi

building the linux digitakt usb driver

needed to install

sudo apt install flex bison libssl-dev libncurses5-dev bc

clone kernel sources

cd
mkdir kernel

cd kernel/

#include <Arduino.h>
class DebouncedSwitch {
public:
DebouncedSwitch(int p, int mode=INPUT_PULLDOWN) : pin(p), nextValidAt(0) {
pinMode(pin, mode);
state = nextState = digitalRead(pin);
}
bool update() {
@mzero
mzero / probeDisplay.ino
Created August 27, 2020 15:48
Example of reading four probes via Adafruit IO, and displaying in rotation on a display.
/**
*** Probes & Data storage
**/
AdafruitIO_Feed *probe1 = io.feed("probe_one");
AdafruitIO_Feed *probe2 = io.feed("probe_two");
AdafruitIO_Feed *probe3 = io.feed("probe_three");
AdafruitIO_Feed *probe4 = io.feed("probe_four");
const int numberOfProbes = 4;
#include "RTClib.h"
#include <Adafruit_MCP23017.h>
#define NUM_ONES_LEDS 4
RTC_DS3231 rtc;
Adafruit_MCP23017 mcpMinutes;
Adafruit_MCP23017 mcpHours;
Adafruit_MCP23017 mcpMonths;
Adafruit_MCP23017 mcpDayLow;
Adafruit_MCP23017 mcpDayHigh;
#include "RTClib.h"
#include <Adafruit_MCP23017.h>
#define NUM_ONES_LEDS 4
enum {
pinFirst = 0,
pinLast = 15,
pinJanuary = 0,
pinFebruary,
@mzero
mzero / flash-test.ino
Created July 7, 2020 21:27
Feather Express flash tester
#include <Adafruit_SPIFlash.h>
namespace {
// ===
// === Test Data Generation and Checking
// ===
const size_t BLOCKSIZE = 512;