Skip to content

Instantly share code, notes, and snippets.

@jarmitage
jarmitage / progress.sty
Created Apr 2, 2021
progress.sty (by Kasper Graverson) but exports .csv of progress % as well
View progress.sty
%%
%% This is file `progress.sty',
%%
%% version 1.10
%%
%% Copyright (C) 2002-2003 Kasper B. Graversen - this is freeware
%%
%% Thanks to Robin Fairbairns for helping me sorting things out ;-)
%% Thanks to Dan Luecking for some definitions
%% Also thanks to David Bausum for his free 'trept' "TeX: Reference and Examples" information material
@jarmitage
jarmitage / TemplateTarget.hs
Created Oct 27, 2020
TidalCycles Template OSC Target (1.0.0 ≤ 1.6.2)
View TemplateTarget.hs
-- 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
[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.