Skip to content

Instantly share code, notes, and snippets.

@jarmitage
jarmitage / pattern_cognition.bib
Last active December 16, 2022 18:56
Pattern cognition literature review for algorithmicpattern.org
@incollection{andersonImagerySpatialRepresentation2017,
title = {Imagery and {{Spatial Representation}}},
booktitle = {A {{Companion}} to {{Cognitive Science}}},
author = {Anderson, Rita E.},
year = {2017},
pages = {204--211},
publisher = {{John Wiley \& Sons, Ltd}},
doi = {10.1002/9781405164535.ch12},
abstract = {Take a moment to use mental imagery to perform the following tasks: (1) decide whether an apple is more similar in shape to a banana or an orange, (2) determine how to rearrange the furniture in your bedroom to make room for a new dresser, and (3) drive home during rush hour. Although we take our ability to perform tasks such as these for granted, they raise a host of interesting questions about imagery. For instance, what is the relationship between imagery and perception? What types of processes are needed to account for our ability to generate, maintain, transform, and inspect images? How do we characterize individual differences in imagery ability? What is the relation between im
@jarmitage
jarmitage / abstract.tex
Created November 26, 2022 14:25
Latex abstract template
\begin{abstract}
% General idea / area / issue
% More specific
% What we did
% Specifically what we did
% What happened
@jarmitage
jarmitage / utter.js
Created June 22, 2022 17:27
Web Speech API utter()
let utter = u => speechSynthesis.speak(new SpeechSynthesisUtterance(u))
@jarmitage
jarmitage / track.tidal
Created May 18, 2022 11:16
Tidal track template
do -- 'do blocks' run all the code below at the same time
setcps (120/60/4) -- 120 cycles per second with 4 beats per bar
let mx = [0,0,0,0] -- mixer (gain control) for each pattern
d1 $ stack [
s "bd*4",
s "[~ sn]*2",
s "[~ hc]*4"
] # gain (mx!!0) -- 1st item in mx list
d2
$ struct "t(3,8) t(5,8" -- structure
@jarmitage
jarmitage / readme.md
Last active March 15, 2023 14:45
Test running ONNX models on Bela via ROOT@CERN's SOFIE inference code generator

SOFIE

Code generation for fast inference of Deep Learning models ROOT/TMVA SOFIE (“System for Optimized Fast Inference code Emit”) is a new package introduced in this release that generates C++ functions easily invokable for the fast inference of trained neural network models. It takes ONNX model files as inputs and produces C++ header files that can be included and utilized in a “plug-and-go” style. This is a new development and it is currently still in experimental stage. SOFIE can take your trained ONNX model and generate blazingly fast C++ code from it, depending only on BLAS.

@jarmitage
jarmitage / example.svelte
Last active July 20, 2021 21:08
Svelte example...
<script>
import { onMount } from 'svelte'
import { SomethingStore as Something } from '../../stores/somethingStore'
import Component from './Component.svelte'
$: stuff = $Something.stuff
let didMount = false
onMount(async () => {
@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 ~ ~ ~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