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
from os import walk
from os.path import join, basename
from pydub import AudioSegment
from json import dump, dumps
import pydub.scipy_effects
import numpy
import csv
import time
@RemyPorter
RemyPorter / sample.py
Last active January 4, 2023 18:25
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)
@alexanderlerch
alexanderlerch / data-sets.md
Last active June 12, 2024 18:03
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 over 2000000 songs no

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

@HarryUPf
HarryUPf / README.md
Last active September 28, 2023 01:37
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

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)
@devxpy
devxpy / midi_numbers.py
Last active May 22, 2024 06:29
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',
@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
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):
@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',