Skip to content

Instantly share code, notes, and snippets.

Avatar

Christopher Arndt SpotlightKid

View GitHub Profile
@SpotlightKid
SpotlightKid / pitchdetect.py
Last active Sep 4, 2020
Detect pitch of audio files
View pitchdetect.py
"""Detect pitch of audio files.
Requires:
* [aubio](https://pypi.org/project/aubio/)
* [NumPy](https://pypi.org/project/numpy/)
"""
import statistics
@SpotlightKid
SpotlightKid / bash_aliases.sh
Created Aug 21, 2020
Some handy bash aliases / functions I don't see elsewhere often
View bash_aliases.sh
# configure come commands via env variables
# (usually located in another file)
# export EDITOR=micro
# export VISUAL=$EDITOR
# export XEDITOR="geany"
# export BROWSER=xdg-open
# To open any file type via app registered in desktop system
alias xo='xdg-open'
@SpotlightKid
SpotlightKid / lv2_list_class_relations.py
Created Aug 14, 2020
List parent and children of an LV2 plugin class
View lv2_list_class_relations.py
#!/usr/bin/env python
import sys
import lilv
if len(sys.argv) > 1:
pclass = sys.argv[1]
else:
pclass = "SimulatorPlugin"
@SpotlightKid
SpotlightKid / PKGBUILD.sh
Created Aug 9, 2020
Improved PKGBUILD for B.Schaffl
View PKGBUILD.sh
# Maintainer: Milkii Brewster <milkii on Freenode IRC>
# Contributor: Christopher Arndt <aur -at- chrisarndt -dot- de>
_name="BSchaffl"
_pkgname="${_name,,}.lv2"
_plugin_uri="https://www.jahnichen.de/plugins/lv2/${_name}"
pkgname="${_pkgname}-git"
pkgdesc="Pattern-controlled MIDI amp & time stretch plugin to produce shuffle / swing effects (git version)"
pkgver=0.3.r0.g2ca653c
pkgrel=1
@SpotlightKid
SpotlightKid / PKGBUILD.sh
Last active Jul 7, 2020
PKGBUILD for feature/cython-extension branch of jack_mixer git version
View PKGBUILD.sh
# Maintainer: Christopher Arndt <aur -at- chrisarndt -dot- de>
_pkgname=jack_mixer
pkgname="${_pkgname}-git"
pkgver=13rc1.r360.e2f0c95
pkgrel=1
pkgdesc="A GTK based Jack audio mixer (git version)"
arch=('x86_64')
url="https://rdio.space/jackmixer/"
license=('GPL2')
@SpotlightKid
SpotlightKid / wavefile.py
Created Jun 25, 2020
Python WAV file decoder
View wavefile.py
# -*- coding: utf-8 -*-
__all_ = [
'Error',
'FmtChunk',
'ParsingError',
'SmplChunk',
'UnsupportedCompressionError',
'WavChunk',
'WavFile'
View .gitignore
pkg/
src/
*.lv2/
gxplugins-lv2/
gxplugins-lv2-git-*.pkg.tar.xz
gxplugins-lv2-git-*.pkg.tar.zst
@SpotlightKid
SpotlightKid / slplugins-build.sh.diff
Last active May 8, 2020
Fix for slPlugins build script for non-Debian/Ubuntu Linux systems
View slplugins-build.sh.diff
diff --git a/ci/build.sh b/ci/build.sh
index b66d55c..2251fac 100755
--- a/ci/build.sh
+++ b/ci/build.sh
@@ -1,12 +1,19 @@
#!/bin/bash -e
# linux specific stiff
-if [ $OS = "linux" ]; then
+if [ "$(uname -s)" = "Linux" ]; then
@SpotlightKid
SpotlightKid / .gitignore
Created Dec 14, 2019
Updated PKGBUILD and patch for klick-git AUR package
View .gitignore
klick/
pkg/
src/
klick-git-*.pkg.tar.xz
klick-git-*.src.tar.gz
@SpotlightKid
SpotlightKid / xdg_get_data.py
Last active Nov 24, 2019
Get application data files according to XDG basedir spec
View xdg_get_data.py
#!/usr/bin/env python
import os
from os.path import expanduser, isdir, isfile, join, sep as pathsep
XDG_DATA_HOME = os.environ.get('XDG_DATA_HOME')
if not XDG_DATA_HOME:
XDG_DATA_HOME = join(expanduser('~'), '.local', 'share')
You can’t perform that action at this time.