Skip to content

Instantly share code, notes, and snippets.

Avatar

Christopher Arndt SpotlightKid

View GitHub Profile
@SpotlightKid
SpotlightKid / feedinfo.py
Created June 2, 2023 18:53
Examine an RSS feed retrieved from given URL
View feedinfo.py
#!/usr/bin/env python
"""Examine an RSS feed retrieved from given URL."""
import sys
from xml.dom.minidom import parseString as parse_xml
import feedparser
import requests
@SpotlightKid
SpotlightKid / waveformqt.py
Created April 24, 2023 19:02
Display waveform of an audio file using PyQt/QPainter
View waveformqt.py
#!/usr/bin/env python
"""Display waveform of an audio file."""
import argparse
import logging
import sys
from statistics import fmean
from PyQt6 import QtCore, QtGui, QtWidgets
from PyQt6.QtCore import Qt
@SpotlightKid
SpotlightKid / cchorus.dsp
Last active February 26, 2023 23:31
FAUST versatile stereo chorus effect
View cchorus.dsp
declare name "CChorus";
declare version "0.5";
declare author "Christopher Arndt";
declare license "MIT License";
declare description "Versatile stereo chorus effect";
import("stdfaust.lib");
PI = ma.PI;
TWOPI = 2.0 * ma.PI;
@SpotlightKid
SpotlightKid / CHANGES
Created February 10, 2023 13:58
Improved AUR PKGBUILD for Pianoteq 8
View CHANGES
- Updated description
- Updated URL
- Uppercase name in desktop file
- Install binary as "Pianoteq 8" and make a link to "pianoteq8"
- Link VST2 plugin shared lib to LV2 one, they are the same
- Support arm 32/64 bit
- Cleaned up unnecessary complicated install commands
- Use SHA256 hash sums (shorter and sufficiently secure)
- Removed obsolete makedepends
- Added soname depends
@SpotlightKid
SpotlightKid / pthreads_cython.pyx
Last active December 4, 2022 18:59 — forked from jerryvig/pthreads_cython.pyx
Basic demonstration of how to use pthreads (POSIX threads) in Cython.
View pthreads_cython.pyx
# cython: language_level=3, boundscheck=False
from cython.operator cimport dereference
from libc.stdio cimport printf
from posix.unistd cimport usleep
cdef extern from "pthread.h" nogil:
ctypedef int pthread_t
ctypedef struct pthread_attr_t:
pass
@SpotlightKid
SpotlightKid / pico_setup.sh
Created December 2, 2022 21:40
pico_setup.sh - Set up a development environment for the Raspberry Pi Pico
View pico_setup.sh
#!/bin/bash
#
# pico_setup.sh - Set up a development environment for the Raspberry Pi Pico
#
# See the "Getting started with Raspberry Pi Pico" guide for reference:
#
# https://www.raspberrypi.com/documentation/microcontrollers/c_sdk.html
#
# The script will:
#
@SpotlightKid
SpotlightKid / PKGBUILD-uhhyou.lv2-git.sh
Created November 24, 2022 07:32
Updated PKGBUILD for uhhyou.lv2-git
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 (git version)'
pkgver=r508.e5eee4c
pkgrel=1
arch=(x86_64)
url='https://github.com/ryukau/LV2Plugins'
View .gitignore
gcm-linux_*.tar.gz
pkg/
src/
*.pkg.tar.*
*.src.tar.*
View midi_send_all.py
import argparse
import logging
import sys
import time
from rtmidi.midiutil import open_midioutput
from rtmidi.midiconstants import *
log = logging.getLogger("midi-send-all")
@SpotlightKid
SpotlightKid / parse_srcinfo.py
Last active April 1, 2022 22:09
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",