Skip to content

Instantly share code, notes, and snippets.

View Tsarpf's full-sized avatar

Teemu Sarapisto Tsarpf

View GitHub Profile
@Tsarpf
Tsarpf / granulator_readme.md
Last active April 16, 2025 16:12
Disting NT Granulator usage

UI script making most parameters of the Granulator algorithm accessible directly via the pots, encoders, and buttons - or combinations thereof.

Before running the script, make sure the granulator algorithm has already been added, and is named "Granulator"!

Pots and Encoders

  • Pot1: Grain delay (=position) mean/spread
  • Pot2: Grain size mean/spread
  • Pot3: Pitch mean/spread
  • Encoder1: Click to record, turn to change buffer size
  • Encoder2: LFO speed/depth
@Tsarpf
Tsarpf / gist:26d3e360e1852edabe58f37a387a5b33
Created March 25, 2025 17:50
Download all slack custom emojis.
#!/bin/bash
# This script retrieves the full list of custom Slack emoji and downloads them locally.
# Prerequisites: curl and jq
# --- Configuration: update these variables ---
WORKSPACE="something.slack.com"
# Replace with your token, look at the request headers from your browser
TOKEN="xoxc-something-something-etc"
# Replace YOUR_SLACK_COOKIE_HERE with your actual cookie string from your browser session.
@Tsarpf
Tsarpf / numpy-wavetable-synth-spectral-time-skew.py
Last active March 20, 2023 03:14
Numpy wavetable "synthesizer", with a basic shapes wavetable + spectral time skew effect
# Based on https://www.youtube.com/watch?v=oVi9WfoA0QI and the code https://github.com/mtytel/vital/blob/c0694a193777fc97853a598f86378bea625a6d81/src/synthesis/producers/spectral_morph.h#L132-L178
#%%
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.widgets import Slider
from scipy.fft import rfft, irfft
from IPython.display import display, Audio
import sounddevice as sd
@Tsarpf
Tsarpf / loop.sh
Created May 16, 2021 21:02
Loop gif and add audio
perl -e 'print "file gif_or.mp4\n" x 10000' > animgif.txt
ffmpeg -f concat -i animgif.txt -i song_name.mp3 -map 0 -map 1 -c copy -shortest tikka_hommat_industrial.mp4
@Tsarpf
Tsarpf / tf_obj_tutorial.rst
Created January 8, 2019 12:01 — forked from douglasrizzo/tf_obj_tutorial.md
TensorFlow Object Detection Model Training
@Tsarpf
Tsarpf / gif_example.pde
Created January 15, 2017 06:41 — forked from jordanorelli/gif_example.pde
make an animated gif with Processing
import gifAnimation.*;
GifMaker gifExport;
int frames = 0;
int totalFrames = 120;
public void setup() {
smooth();
size(400, 400);
void FrequencyFinder::Start()
{
m_listenerThread = std::thread(&AudioListener::RecordAudioStream, m_listener, &m_sink, std::ref(m_finished));
}
@Tsarpf
Tsarpf / TriplanarWorld.shader
Created November 11, 2016 14:04 — forked from radiatoryang/TriplanarWorld.shader
a triplanar / procedural UV / world space UV shader for Unity, cobbled together bits from @quickfingerz and @Farfarer
Shader "Tri-Planar World" {
Properties {
_Side("Side", 2D) = "white" {}
_Top("Top", 2D) = "white" {}
_Bottom("Bottom", 2D) = "white" {}
_SideScale("Side Scale", Float) = 2
_TopScale("Top Scale", Float) = 2
_BottomScale ("Bottom Scale", Float) = 2
}
import urllib2
import threading
from Queue import Queue
import sys, os, re
class ThreadedDownload(object):
REGEX = {
'hostname_strip':re.compile('.*\..*?/', re.I)
}