Skip to content

Instantly share code, notes, and snippets.

View OdysseasKr's full-sized avatar
⌨️

Odysseas (Ody) Krystalakos OdysseasKr

⌨️
View GitHub Profile
@CGrassin
CGrassin / note_to_freq.py
Created April 14, 2020 17:45
Convert a note + octave to its frequency.
# MIT License
# Python to convert a string note (eg. "A4") to a frequency (eg. 440).
# Inspired by https://gist.github.com/stuartmemo/3766449
def getFrequency(note, A4=440):
notes = ['A', 'A#', 'B', 'C', 'C#', 'D', 'D#', 'E', 'F', 'F#', 'G', 'G#']
octave = int(note[2]) if len(note) == 3 else int(note[1])
keyNumber = notes.index(note[0:-1]);
@jindrichmynarz
jindrichmynarz / dub_techno_in_sonic_pi.rb
Created December 8, 2015 19:11
Dub techno in Sonic Pi
use_debug false
use_bpm 130
# Our mixer!
master = (ramp *range(0, 1, 0.01))
kick_volume = 1
bass_volume = 1
revbass_volume = 1
snare_volume = 0.5
hats_volume = 0.5