Skip to content

Instantly share code, notes, and snippets.

View jarmitage's full-sized avatar

Jack Armitage jarmitage

View GitHub Profile
@jarmitage
jarmitage / multi-bela.md
Last active March 7, 2019 11:41
Using Bela build scripts across multiple Bela's simultaneously

Using Bela build scripts across multiple Bela's simultaneously

Suppose you are trying to program two Bela's at the same time (yes this was an actual need of mine).

You can achieve this using Bela's build_project.sh script [1] and some tweaking.

Basic setup

First you need to change the IP address and DHCP settings of one of your Bela's [2], so that you can connect to your two devices separately and simultaneously.

@jarmitage
jarmitage / applescript_run.py
Last active September 24, 2021 03:34
Running AppleScripts from Python
import subprocess
def applescript_to_list (file, path="/my/default/path/"):
# open an applescript and return its contents as a list
applescript = open(path + file + ".applescript", "r")
lines = applescript.readlines()
applescript.close()
return lines
def applescript_list_to_string (script_list):
@jarmitage
jarmitage / 127_zpbb_2.0.tidal
Created March 23, 2019 04:12
127_zpbb_2.0.tidal
do -- zpbb3
bps (127/120)
d1 . m . sl 2 -- zp 1
. ev 4 (# hpf' "1e3 4e3 7e3" 0.3)
$ struct "t(3,8)!2" $ n ("0 1") # s "cutzpbb3"
+ sp "1 [1 0.5? 0.25?]" # rvb "0.1:0.1"
# gco "0.3:1:0" # hpf' 5e3 0.2
d2 . i . sl 8 -- zp 2
. juxBy 0.25 (rev) . iter 4 . str 4
. ev 4 (chop 2 . (# pan rand)) . ev 2 ((|+| sp "-2"))
@jarmitage
jarmitage / cling_bela.md
Created April 11, 2019 17:42
Using the Cling C++ Interpreter on the Bela Platform
@jarmitage
jarmitage / functions.tidal
Created April 23, 2019 14:39
An idea for arranging a track in tidal
mutePatterns g = mapM (streamMute tidal) g
muteIntPatterns g = mutePatterns (map show g)
mutePatterns' s g = mutePatterns (fromJust $ lookup g s)
unmutePatterns g = mapM (streamUnmute tidal) g
unmuteIntPatterns g = unmutePatterns (map show g)
unmutePatterns' s g = unmutePatterns (fromJust $ lookup g s)
soloPatterns g = mapM (streamSolo tidal) g
soloPatterns' s g = soloPatterns (fromJust $ lookup g s)
unsoloPatterns g = mapM (streamUnsolo tidal) g
unsoloPatterns' s g = unsoloPatterns (fromJust $ lookup g s)
@jarmitage
jarmitage / default-effects-extra.tidal
Created April 25, 2019 10:43
Tidal file for playing with new SuperDirt FX
-- New SuperDirt effects in Tidal 1.0.11
-- https://github.com/musikinformatik/SuperDirt/blob/develop/library/default-effects-extra.scd
-- https://github.com/tidalcycles/Tidal/blob/master/src/Sound/Tidal/Params.hs
let p = s "arpy*4"
{-
Waveloss
Divides an audio stream into tiny segments, using the signal's
zero-crossings as segment boundaries, and discards a fraction of them.
@jarmitage
jarmitage / default-synths-extra.tidal
Created April 25, 2019 10:53
Tidal file for playing with SuperDirt synths added in Dec 2018
-- Added Dec 2018 by bgold
-- https://github.com/musikinformatik/SuperDirt/blob/develop/library/default-synths-extra.scd
let p = n (run 12)
{-
from synthdef.art
fragment: 2018-08-16
responds to accelerate (for pitch glide)
detune (in Hz, but even small values are quite noticable)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jarmitage
jarmitage / note_utils.cpp
Last active May 9, 2019 14:39
Instrument tuning utilities
std::map<std::string, int> midiNoteNames = { {"a0",21}, {"as0",22}, {"b0",23},
{"c1",24}, {"cs1",25}, {"d1",26}, {"ds1",27}, {"e1",28}, {"f1", 29}, {"fs1",30}, {"g1", 31}, {"gs1",32}, {"a1",33}, {"as1",34}, {"b1",35},
{"c2",36}, {"cs2",37}, {"d2",38}, {"ds2",39}, {"e2",40}, {"f2", 41}, {"fs2",42}, {"g2", 43}, {"gs2",44}, {"a2",45}, {"as2",46}, {"b2",47},
{"c3",48}, {"cs3",49}, {"d3",50}, {"ds3",51}, {"e3",52}, {"f3", 53}, {"fs3",54}, {"g3", 55}, {"gs3",56}, {"a3",57}, {"as3",58}, {"b3",59},
{"c4",60}, {"cs4",61}, {"d4",62}, {"ds4",63}, {"e4",64}, {"f4", 65}, {"fs4",66}, {"g4", 67}, {"gs4",68}, {"a4",69}, {"as4",70}, {"b4",71},
{"c5",72}, {"cs5",73}, {"d5",74}, {"ds5",75}, {"e5",76}, {"f5", 77}, {"fs5",78}, {"g5", 79}, {"gs5",80}, {"a5",81}, {"as5",82}, {"b5",83},
{"c6",84}, {"cs6",85}, {"d6",86}, {"ds6",87}, {"e6",88}, {"f6", 89}, {"fs6",90}, {"g6", 91}, {"gs6",92}, {"a6",93}, {"as6",94}, {"b6",95},
{"c7",96}, {"cs7",9