Skip to content

Instantly share code, notes, and snippets.

@jarmitage
jarmitage / bw.hs
Created May 14, 2020
[WIP] Tidal to Bitwig OSC API v2
View bw.hs
-- 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
How to install LuaJIT on Bela (BeagleBone Black)
View luajit_bela.md

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:

View avril.tidal
-- 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 Jun 4, 2020
Convert Calibre Library to Roam Research bullets
View calibre_to_roam.md

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 Jan 8, 2020
Svelte store pattern
View store.js
import { writable } from "svelte/store"
const createStore = () => {
let state = {
}
const { subscribe, set, update } = writable(state)
@jarmitage
jarmitage / bw_osc_api.hs
Last active Jun 15, 2020
TidalCycles Bitwig OSC API (WIP)
View bw_osc_api.hs
:{
let bwAddress = "127.0.0.1"
bwPort = 8000
bwLatency = 0.02
bwPreamble = []
bwTimestamp = BundleStamp
:}
-- TEMPO
:{
@jarmitage
jarmitage / tidal-multi-stream.hs
Created Oct 5, 2019
Multiple Tidal streams to multiple OSCTargets
View tidal-multi-stream.hs
-- 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 Jul 31, 2019
2019-06-06_220304_plate_ring.svg
View 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 Jul 25, 2019
Svelte p5 dynamic import example
View index.svelte
<script>
import { onMount } from 'svelte';
let p5
let sketch
onMount(async () => {
const module = await import('p5')
p5 = module.default
sketch = new p5 (function (sketch) {
@jarmitage
jarmitage / bela_startup.scd
Created Jul 11, 2019
Bela SuperCollider Printing Sensors
View bela_startup.scd
( // connect to the already-running remote belaserver
Server.default = s = Server("belaServer", NetAddr("192.168.7.2", 57110));
s.options.maxLogins = 4; // should match the settings on the Bela
s.initTree;
s.startAliveThread;
);
(
// msgArray = [button, fsr, knob] // every three SendTrig's
You can’t perform that action at this time.