Skip to content

Instantly share code, notes, and snippets.

View greydoubt's full-sized avatar
💭
in the studio or the datacenter

-- greydoubt

💭
in the studio or the datacenter
View GitHub Profile
@greydoubt
greydoubt / lego_tit01_at3
Created February 11, 2025 05:09 — forked from elsonLee/lego_tit01_at3
audio file
This file has been truncated, but you can view the full file.
0000000: 5249 4646 0ce0 0d00 5741 5645 666d 7420 RIFF....WAVEfmt
0000010: 3400 0000 feff 0200 44ac 0000 953e 0000 4.......D....>..
0000020: e802 0000 2200 0008 0300 0000 bfaa 23e9 ....".........#.
0000030: 58cb 7144 a119 fffa 01e4 ce62 0100 285c X.qD.......b..(\
0000040: 0000 0000 0000 0000 6661 6374 0800 0000 ........fact....
0000050: 0025 2600 9009 0000 736d 706c 3c00 0000 .%&.....smpl<...
0000060: 0000 0000 0000 0000 9458 0000 3c00 0000 .........X..<...
0000070: 0000 0000 0000 0000 0000 0000 0100 0000 ................
0000080: 1800 0000 0000 0000 0000 0000 9009 0000 ................
0000090: 8f2e 2600 0000 0000 0000 0000 6461 7461 ..&.........data
@greydoubt
greydoubt / nif.pl
Created October 9, 2024 06:01 — forked from jgrahamc/nif.pl
Calculate the check digit in a Portuguese NIF
use strict;
use warnings;
sub nif_check {
my ($nif) = @_;
my $check = 0;
foreach my $i (reverse 0..7) {
$check += substr($nif, $i, 1) * (9-$i);
}
$check %= 11;
@greydoubt
greydoubt / synthio_midi_synth.py
Created May 12, 2023 23:24 — forked from todbot/synthio_midi_synth.py
pretty usable MIDI-controlled synth using synthio in CircuitPython
# synthio_midi_synth.py - pretty usable MIDI-controlled synth using synthio in CircuitPython
# 11 May 2023 - @todbot / Tod Kurt
# Uses cheapie PCM5102 DAC on QTPY RP2040
# Features:
# - midi velocity controls attack rate (gentle press = slow, hard press = fast)
# - notes have small random detune on all oscillators to reduce phase stacking
# - adjustable number of detuned oscillators per note 1-5 (midi controller 83)
# - five selectable waveforms: saw, squ, sin, noisy sin, noise (midi controller 82)
# - vibrato depth on mod wheel (midi controller 1)
#
@greydoubt
greydoubt / ad-manifesto.md
Created October 22, 2018 08:21 — forked from rxwei/ad-manifesto.md
First-Class Automatic Differentiation in Swift: A Manifesto

First-Class Automatic Differentiation in Swift: A Manifesto

This document is written for both the machine learning community and the Swift programming language design community, with a strong focus on language design.

Table of Contents