Skip to content

Instantly share code, notes, and snippets.

Avatar

Christopher Arndt SpotlightKid

View GitHub Profile
@SpotlightKid
SpotlightKid / parse_srcinfo.py
Last active Apr 1, 2022
Get info from a PKGBUILD file by calling makepkg --printsrcinfo and parsing the output
View parse_srcinfo.py
#!/usr/bin/env python3
import json
import sys
from subprocess import CalledProcessError, run
ARRAY_FIELDS = (
"arch",
"arch",
"b2sums",
@SpotlightKid
SpotlightKid / smfinfo.py
Created Jul 9, 2021
Show basic tempo and time/key signature information of a standard MIDI file using miditk-smf
View smfinfo.py
import sys
from miditk.smf.reader import MidiFileReader
from miditk.smf.sequence import MidiSequence, ObjectMidiEventHandler
# This defines callbacks called while parsing the MIDI sequence
# We only need to overwrite the event handlers we want to handle specially
class MySequenceHandler(ObjectMidiEventHandler):
def __init__(self, instance=None, debug=False):
@SpotlightKid
SpotlightKid / PKGBUILD-uhhyou.lv2-git.sh
Created Feb 28, 2021
Improve PKGBUILD for uhhyou.lv2-git AUR package
View PKGBUILD-uhhyou.lv2-git.sh
# Maintainer: Milkii Brewster <milkii on Freenode IRC>
# Contributor: Christopher Arndt <aur -at- chrisarndt -dot- de>
_pkgname='uhhyou.lv2'
pkgname="${_pkgname}-git"
pkgdesc="Various synth, effect and CV LV2 plugins."
pkgver=r511.df67460
pkgrel=1
arch=('x86_64')
url="https://github.com/ryukau/LV2Plugins"
@SpotlightKid
SpotlightKid / .gitignore
Created Feb 19, 2021
Improvements for samplecat-git AUR PKGBUILD
View .gitignore
pkg/
src/
samplecat/
libwaveform/
samplecat-*.pkg.tar.xz
samplecat-*.pkg.tar.zst
@SpotlightKid
SpotlightKid / notes.md
Created Feb 17, 2021
Kurztipp: SF2 Soundfonts mit Polyphone nach SFZ konvertieren und in sfizz laden
View notes.md
@SpotlightKid
SpotlightKid / .gitignore
Last active Feb 5, 2021
Improved PKGBUILD for loopauditioneer-svn
View .gitignore
pkg/
src/
loopauditioneer/
loopauditioneer-svn-*.pkg.tar.xz
loopauditioneer-svn-*.pkg.tar.zst
@SpotlightKid
SpotlightKid / prequests.py
Created Jan 18, 2021
urequests.py from pfalcon/pycopy-lib fixed for current upstream micropython
View prequests.py
import usocket
class Response:
def __init__(self, f):
self.raw = f
self.encoding = "utf-8"
self._cached = None
def close(self):
@SpotlightKid
SpotlightKid / PKGBUILD-die-plugins.lv2-git.sh
Last active Apr 17, 2021
Improved PKGBUILD for die-plugins.lv2-git AUR package
View PKGBUILD-die-plugins.lv2-git.sh
# Maintainer: Milkii Brewster <milkii on Freenode IRC>
# Contributor: Christopher Arndt <aur -at- chrisarndt -dot- de>
_name=DIE-Plugins
_pkgname="${_name,,}.lv2"
pkgname="${_pkgname}-git"
pkgdesc="DISTRHO Imported Effect Plugins, Ardour's plugins without Ardour (git version)"
pkgver=1.1.r4.gf8a31d5
pkgrel=1
arch=(x86_64)
@SpotlightKid
SpotlightKid / joystick2midi.py
Last active Dec 15, 2020
Convert joystick axis position into MIDI Control Change value in-/decrements using pygame.joystick and python-rtmidi
View joystick2midi.py
#!/usr/bin/env python
"""Convert joystick axis position into MIDI Control Change value in-/decrements."""
import os
import sys
import pygame
from rtmidi.midiutil import open_midioutput
@SpotlightKid
SpotlightKid / lua.env
Last active Oct 27, 2020
Lua environment variables for multiple version support
View lua.env
# Lua dev
LUA_DIR="$HOME/share/lua"
LUA_CDIR="$HOME/lib/lua"
if which lua5.1 >/dev/null 2>&1; then
if which luarocks >/dev/null 2>&1; then
LUA_PATH_5_1="$(luarocks --lua-version 5.1 --local path --lr-path)"
LUA_CPATH_5_1="$(luarocks --lua-version 5.1 --local path --lr-cpath)"
fi