Skip to content

Instantly share code, notes, and snippets.

View eamonnbell's full-sized avatar

Eamonn Bell (Personal) eamonnbell

View GitHub Profile
@eamonnbell
eamonnbell / spotify_implict_grant.html
Created September 5, 2017 15:51
Example of Implicit Grant flow authorization with Spotify API.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Spotify API - Implicit Grant Flow</title>
</head>
@eamonnbell
eamonnbell / in-c.py
Last active June 15, 2021 15:59
Generate a performance of Terry Riley's In C
import music21
import itertools
from random import randint
MIN_REPETITIONS = 4
MAX_REPETITIONS = 10
NUMBER_OF_PARTS = 10
motives = ['e4 e e', 'e8 f8 e4', 'r8 e f e', 'r8 e f g', 'e8 f g r',
@eamonnbell
eamonnbell / process.py
Last active May 29, 2020 15:46
Segments an audiofile in to chunks according to the result of some MIR algos
import itertools
import os
import sys
SPLITFILE = 'splits.txt'
binaries = [ 'DBNBeatTracker',
'SpectralOnsetDetection',
'CNNOnsetDetector',
'DBNDownBeatTracker',
@eamonnbell
eamonnbell / config.py
Created May 31, 2018 00:49
qTile config base (laptop)
# Copyright (c) 2010 Aldo Cortesi
# Copyright (c) 2010, 2014 dequis
# Copyright (c) 2012 Randall Ma
# Copyright (c) 2012-2014 Tycho Andersen
# Copyright (c) 2012 Craig Barnes
# Copyright (c) 2013 horsik
# Copyright (c) 2013 Tao Sauvage
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@eamonnbell
eamonnbell / tool.sh
Created April 20, 2018 13:57
Hack for getting to the VLM editor menu in the JagCD emu
for pid in $(xdotool search "")
do
echo "Doing $pid..."
xdotool key --window $pid KP_1+KP_0+KP_3+KP_Multiply
done
@eamonnbell
eamonnbell / tool.sh
Created April 20, 2018 13:57
Hack for getting to the VLM editor menu in the JagCD emu
do
echo "Doing $pid..."
xdotool key --window $pid KP_1+KP_0+KP_3+KP_Multiply
done
@eamonnbell
eamonnbell / optionset_generator.py
Last active June 20, 2017 14:50
Optionset generator
import collections
import itertools
def optionset_generator(optionset_schema):
iterables = {}
for key, value in optionset_schema.items():
if isinstance(value, collections.Iterable):
iterables[key] = value
else:
@eamonnbell
eamonnbell / dft_for_music.ipynb
Last active March 29, 2017 18:29
Introduction to DFT and Fourier phase space for music analysis
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@eamonnbell
eamonnbell / matrix.ijs
Last active January 22, 2017 23:26
Serial matrix in J
mod12 =: 12 & |
matrix =. monad : 0
m =. mod12 y -/ (y - (0 { y))
)
pcs =: i. 12
shuf =: {~ ?~@#
newrow =: shuf pcs
@eamonnbell
eamonnbell / gibbs.ipynb
Created October 19, 2016 20:45
Explaining 'Explaining the Gibbs Sampler'
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.