Skip to content

Instantly share code, notes, and snippets.

View matthewryanscott's full-sized avatar

Matthew R. Scott matthewryanscott

View GitHub Profile
@matthewryanscott
matthewryanscott / _PROMPT.md
Last active January 11, 2026 21:08
SunVox pattern expander

Written using Claude Code and z.ai's GLM-4.7 model using this prompt:

Write a script called "pattern_expander.py" that takes two arguments: a sunvox project filename, and a factor (positive int).

The script will use radiant-voices (rv) to open the sunvox file, and for all patterns it will do this:

  • expand the length of the pattern by the factor
  • rewrite the pattern data so that the pattern data is expanded to fill the new pattern length (e.g. for factor of 2, 1 new blank line between each existing line... for factor of 3, 2 new blank lines, etc.)
  • multiply the "x" position of the pattern by the factor
@matthewryanscott
matthewryanscott / wav2sunvox.py
Last active September 25, 2025 06:06
A tool for importing stems into SunVox.
# wav2sunvox
# by Queries
#
# A tool for importing stems into SunVox.
#
# License: MIT
#
# Proper repo: some day maybe...
# For now I'll keep the gist up-to-date with my local copy:
# https://gist.github.com/matthewryanscott/d648a6462d555b0ebdbf83fd352f3008
@matthewryanscott
matthewryanscott / serumchunk.py
Created December 16, 2024 17:39
Function to append a Serum-compatible comment to a WAV file so you don't have to enter 2048 every time you load a wavetable
from pathlib import Path
from struct import pack
def add_serum_chunk(wav_path: Path):
# Existing WAV file must be in a 2048-samples-per-frame format.
# See https://www.kvraudio.com/forum/viewtopic.php?t=517146
comment = "<!>2048 00000000 wavetable (www.xferrecords.com)"
encoded = comment.encode("utf8")
chunk_id = b"clm "
@matthewryanscott
matthewryanscott / simple_arp_metamodule.py
Last active November 30, 2024 02:38
Using Radiant Voices to create a simple arpeggiator MetaModule for SunVox
from pathlib import Path
from rv.api import m, Note, NOTE, Pattern, Project, Synth
if __name__ == "__main__":
# Metamodules contain a project.
project = Project()
# Simple routing of a multisynth to a generator to output.

Keybase proof

I hereby claim:

  • I am matthewryanscott on github.
  • I am gldnspud (https://keybase.io/gldnspud) on keybase.
  • I have a public key ASAjLD3nW-ZT_9eEDNVKzoP0F2jbn3_dOjUgIO-Z5ks1wAo

To claim this, I am signing this object:

from collections import deque
import sys
import time
import threading
import mido
import numpy as np
from orbitant import backend as midi
from orbitant.transport import START, STOP, CLOCK
import sounddevice as sd
0 1 2 3 4 5 6 7 8 9 a b c d e f
CHNM: 00000000
CHDT: 00000000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
------------------------------------------------ ?
00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
------------------------------------ ?
----------- max sample index + 1
(0 for no samples)
00000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
----------- ?
@matthewryanscott
matthewryanscott / sampler.ipynb
Created September 27, 2016 01:13
sampler creation with radiant voices
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.