Skip to content

Instantly share code, notes, and snippets.

View jarmitage's full-sized avatar

Jack Armitage jarmitage

View GitHub Profile
@jarmitage
jarmitage / latex_to_speech.py
Created June 5, 2021 19:51
Latex to audiobook via Google Cloud TTS (tex to HTML to SSML to batches to gcloud)
# super rough code!
# only supports simple tex + ssml
# requires sox for audio concatenation
# %autoawait - if in .ipynb, this is needed for async to work
import pypandoc
import html
import re
import os
@jarmitage
jarmitage / biccs21.bib
Created May 14, 2021 08:47
Proceedings of BICCS 2021 - Biennial International Conference for the Craft Sciences
@article{aktasYouHaveOne2021,
title = {You {{Have One New Message}}: {{Knitting}} Intimacy for Connecting Opinions, People and the World},
shorttitle = {You {{Have One New Message}}},
author = {Aktas, Bilge Merve},
year = {2021},
month = may,
volume = {14},
issn = {1890-9515},
doi = {10.7577/formakademisk.4174},
@jarmitage
jarmitage / blonde.tidal
Last active May 1, 2021 17:15
Roger & Brian Eno - Blonde - Mixing Colours - TidalCycles
p1 $ slow (277/4)
$ stack [
n "d4 ~ ~ ~ ~ ~ ~ ~ d5 ~ ~ ~ a4 ~ ~ ~ ~ ~ ~ ~ g5 ~ ~ ~ d4 ~ ~ ~ ~ ~ ~ ~ fs5 ~ ~ ~ a4 ~ ~ ~ ~ ~ ~ ~ b5 ~ ~ ~ a5 ~ ~ ~ b5 ~ ~ ~ a5 ~ ~ ~ g5 ~ ~ ~ e5 ~ ~ ~ b5 ~ ~ ~ d6 ~ ~ ~ d5 ~ ~ ~ fs5 ~ ~ ~ b5 ~ ~ ~ ~ ~ cs6 ~ d6 ~ e6 ~ fs6 ~ ~ ~ g6 ~ ~ ~ fs6 ~ ~ ~ g5 ~ ~ ~ e5 ~ ~ ~ b5 ~ ~ ~ cs6 ~ ~ ~ d5 ~ ~ ~ fs5 ~ ~ ~ b5 ~ ~ ~ ~ ~ ~ ~ e6 ~ ~ ~ fs6 ~ ~ ~ g6 ~ ~ ~ fs6 ~ ~ ~ e6 ~ ~ ~ g4 ~ ~ ~ ~ ~ ~ ~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Examples" information material
@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)