Skip to content

Instantly share code, notes, and snippets.

@jarmitage
jarmitage / TemplateTarget.hs
Created October 27, 2020 18:50
TidalCycles Template OSC Target (1.0.0 ≤ 1.6.2)
-- Target
:{
tmpTarget = Target {oName = "Template",
oAddress = "127.0.0.1",
oPort = 8000,
oLatency = 0.2,
oWindow = Nothing,
oSchedule = Pre BundleStamp
}
:}
@jarmitage
jarmitage / bw.hs
Created May 14, 2020 20:46
[WIP] Tidal to Bitwig OSC API v2
-- Target
:{
bwTarget = Target {oName = "bitwig",
oAddress = "127.0.0.1",
oPort = 8000,
oLatency = 0.2,
oWindow = Nothing,
oSchedule = Pre BundleStamp
}
:}
@jarmitage
jarmitage / luajit_bela.md
Created May 10, 2020 17:05
How to install LuaJIT on Bela (BeagleBone Black)

How to install LuaJIT on Bela

Preface: you will need a http://bela.io preferably connected to WiFI.

sudo apt install luajit is necessary but not sufficient if you want to compile projects which #include <lua.hpp>. Why? Because the default package does not provide a luajit.pc file for pkg-config to read and it can't find the headers.

So you need an install of LuaJIT which both targets armhf and comes with a luajit.pc. According to Debian package search the only one that does is libluajit-5.1-dev (2.1.0~beta3+dfsg-5.1). So what we actually need is:

@jarmitage
jarmitage / avril.tidal
Created April 14, 2020 20:37
Avril 14th
-- happy avril 14th :)))))))))))))))))))))))))))))))))))))))
do
let bars = 4
key = "8"
righthand = "[[4 -3] [0 _ _ _ _ _ 0]] [[-3, -8] [7 5 4 0]]"
lefthand = "[0 9 12 16] [4 12 16 19] [5 12 17 19] [2 12 17 16]"
d1 $ slow bars
$ stack [
n (righthand + key + "<24 36>/2"),
@jarmitage
jarmitage / calibre_to_roam.md
Last active June 14, 2021 03:21
Convert Calibre Library to Roam Research bullets

Convert Calibre Library to Roam Research bullets

Calibre>Convert books>Create a catalogue of the books in your library

Output examples:

  • [[Structure and Interpretation of Classical Mechanics]] by [[Gerald Jay Sussman]], [[Jack Wisdom]] is about #[[Mechanical Engineering]], #Science, and was published by [[MIT Press]] in #2015.
  • [[Mindstorms: Children, Computers, and Powerful Ideas]] by [[Seymour A. Papert]] is about #Education, and was published by [[Basic Books]] in #1993.
  • [[You and Your Research]] by [[Richard W. Hamming]] is about #Learning, #Research, and was published by [[Bell Communications Research]] in #1986.
  • [[Rhythm and Transforms]] by [[William Arthur Sethares]] is about #Music, and was published by [[Springer]] in #2007.
@jarmitage
jarmitage / store.js
Created January 8, 2020 21:46
Svelte store pattern
import { writable } from "svelte/store"
const createStore = () => {
let state = {
}
const { subscribe, set, update } = writable(state)
@jarmitage
jarmitage / bw_osc_api.hs
Last active February 5, 2024 05:16
TidalCycles Bitwig OSC API (WIP)
:{
let bwAddress = "127.0.0.1"
bwPort = 8000
bwLatency = 0.02
bwPreamble = []
bwTimestamp = BundleStamp
:}
-- TEMPO
:{
@jarmitage
jarmitage / tidal-multi-stream.hs
Created October 5, 2019 23:31
Multiple Tidal streams to multiple OSCTargets
-- https://tidalcycles.org/index.php/Custom_OSC
:set -XOverloadedStrings
:set prompt ""
:set prompt-cont ""
import Sound.Tidal.Context
superDirt <- startTidal (superdirtTarget {oLatency = 0.1, oAddress = "127.0.0.1", oPort = 57120}) (defaultConfig {cFrameTimespan = 1/20})
@jarmitage
jarmitage / 2019-06-06_220304_plate_ring.svg
Created July 31, 2019 21:06
2019-06-06_220304_plate_ring.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jarmitage
jarmitage / index.svelte
Created July 25, 2019 13:01
Svelte p5 dynamic import example
<script>
import { onMount } from 'svelte';
let p5
let sketch
onMount(async () => {
const module = await import('p5')
p5 = module.default
sketch = new p5 (function (sketch) {