Skip to content

Instantly share code, notes, and snippets.

Mark Lentczner mzero

Block or report user

Report or block mzero

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@mzero
mzero / snd-digitakt.md
Created Oct 29, 2019
digitakt usb audio driver on RaspberryPi
View snd-digitakt.md

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/
@mzero
mzero / ddp-to-kunaki.py
Created Apr 9, 2019
Convert DDP mastered CDs to Kunaki's CUE format
View ddp-to-kunaki.py
"""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 / start_pbj_sc.sh
Created Aug 18, 2018
Start SuperCollider script from the Pisound button
View start_pbj_sc.sh
#!/bin/sh
. /usr/local/pisound/scripts/common/common.sh
log "starting pbj"
flash_leds 1
killall scsynth
killall sclang
rm -f /tmp/sclang-*.log 2>/dev/null || true
View RasberryPi & Pisound minimal build.md

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 / ghc-hp-docker-build.md
Last active Aug 29, 2015
Building GHC & HP hermetically using Docker
View ghc-hp-docker-build.md

Building on the NUC under Docker

[hs-base] - a Debian 7 (Wheezy) base environment

[debian:7] + build dev-docker/hs-base/Dockerfile --> [hs-base]

[ghc-boot] - an environment with a bootstrap GHC

@mzero
mzero / info.md
Created Jul 20, 2014
Root cause of haddock / clang failure
View info.md

Root cause of haddock / clang failure

Consider this simple .hs file:

module MinHaddockFail where

yo :: String
yo = "yo"
@mzero
mzero / ghc-clang-wrapper
Created Oct 31, 2013
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…
View ghc-clang-wrapper
#!/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 / SequsHorribilis.hs
Created May 11, 2013
Implementation of 4Clojure problem #112 in Haskell See: http://www.4clojure.com/problem/112
View SequsHorribilis.hs
module SequsHorribilis
where
import Test.HUnit
type Sequs = [Horribilis]
data Horribilis = Atom Int | List Sequs
deriving (Eq, Show)
upThru :: Int -> Sequs -> Sequs
@mzero
mzero / Posix.IO.hs
Created Feb 15, 2013
This is what the files look like split, but with the instance still with the typeclass
View Posix.IO.hs
{-
Copyright 2012-2013 Google Inc. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
View set.hs
module SetPrime where
-- import qualified Data. as List
-- no need to import List, as the function all is in the Prelude
import Control.Applicative ((<$>), (<*>))
-- prefer explicit imports most of the time
data Shape = Oval | Squiggle | Diamond deriving (Show, Eq, Bounded, Enum, Ord)
data Color = Red | Purple | Green deriving (Show, Eq, Bounded, Enum, Ord)
You can’t perform that action at this time.