Skip to content

Instantly share code, notes, and snippets.

View usworked's full-sized avatar
🤒
Out working

Ubaid Seth usworked

🤒
Out working
  • Tejas
View GitHub Profile
@alinradut
alinradut / rotoscope.sh
Created May 3, 2017 08:45
A script that will convert a regular video to a rotoscoped video. Requires autotrace, ffmpeg, imagemagick.
#!/bin/bash
# rotoscope - auto rotoscope a video file with openSource Software on Linux
# needs ffmpeg, autotrace and ImageMagick
# usage: rotoscope videofile //will create videofile.rotoscoped.avi
# created by Honza Svasek : HonzaSvasek.nl
# edited by Joseph Riopelle finitelife[at]hotmail.com
set -x
export TMPDIR=/tmp/rotoscope$$
export FILM=$1
@hiwonjoon
hiwonjoon / python-ffmpeg.py
Last active November 26, 2023 16:11
ffmpeg and ffprobe subprocess call in python; extract specific frame at some timepoint, extract duration of a video
import subprocess
import datetime
import numpy as np
THREAD_NUM=4
def get_video_info(fileloc) :
command = ['ffprobe',
'-v', 'fatal',
'-show_entries', 'stream=width,height,r_frame_rate,duration',
from pydub import AudioSegment
from pydub.utils import db_to_float
# note: see usage example at the bottom of the gist :)
class Mixer(object):
def __init__(self):
self.parts = []
def overlay(self, sound, position=0):
@matthewberryman
matthewberryman / requirements.txt
Created October 20, 2017 00:53
requirements.txt for librosa on RPi3 with llvm-3.8
audioread==2.1.5
cryptography==1.7.1
decorator==4.0.11
idna==2.2
joblib==0.11
keyring==10.1
keyrings.alt==1.3
librosa==0.5.1
llvmlite==0.15.0
numba==0.30.1
@devxpy
devxpy / midi_numbers.py
Last active June 17, 2025 17:59
A python script that converts MIDI message numbers to notes and instruments (and vice-versa)
INSTRUMENTS = [
'Acoustic Grand Piano',
'Bright Acoustic Piano',
'Electric Grand Piano',
'Honky-tonk Piano',
'Electric Piano 1',
'Electric Piano 2',
'Harpsichord',
'Clavi',
'Celesta',

These are instructions for building a stand alone, headless, music computer based on the Pisound audio card and a RaspberryPi 3.

I use this set up in my live performance rig where it does all of the following without breaking a sweat:

  • Audio effects
  • stutter gate (beat sync'd)
@HarryUPf
HarryUPf / README.md
Last active March 8, 2025 03:22
Raspberry Pi SunVox Headless Synth (in 10 easy steps)

Raspberry Pi SunVox Headless Synth Setup (in 10-easy-steps)

INSTRUCTIONS

STEP_01

STEP_02

  • write the extracted .img to sdcard with Etcher

STEP_03

Audio

Make some noise and record your voice! Deep Learning models will analyze and build a drum kit, then start generating drum patterns infinitely with your sound.

Convolutional Neural Network is used to analyze and classify audio segments based on spectrograms (demo codepen) and Recurrent Neural Network(LSTM) for generating drum sequences. Shout-out to Tero Parviainen! Rhythm generation part of this codepen is based on his amazing Neural Drum Machine

Built with magenta.js, tensorflow.js and p5.js by @naotokui_en

@alexanderlerch
alexanderlerch / data-sets.md
Last active July 11, 2025 07:27
list of MIR datasets
dataset meta data contents with audio
200DrumMachines 7371 one-shots yes
AAM onsets, pitches, instruments, melody instrument, keys, chords, tempo, beats 3000 (artificial) tracks yes
ACM_MIRUM tempo 1410 excerpts (60s) yes
ACPAS aligned audio and scores 2189 performances of 497 scores downloadable
AcousticBrainz-Genre 15-31 genres with 265-745 subgenres audio features for ove
@RemyPorter
RemyPorter / sample.py
Last active December 23, 2024 20:05
This is a simple synthesizer based on NumPy, which allows you to create surprisingly complex sounds with surprisingly simple code. Uses the Python library `sounddevice` for playback, so you'll need to `pip install sounddevice`
import time
import spatial as sp
import sounddevice as sd
def play(sound, sample_rate=sp.SAMPLE_RATE):
"""Helper to play serially"""
sd.play(sound)
time.sleep(len(sound) / sample_rate)
space = sp.space(3)