Skip to content

Instantly share code, notes, and snippets.

@interstar
interstar / Sonic Pi Chords with inversions
Created April 6, 2021 15:13
Sonic Pi chord progression generator (now with modal interchange, secondary dominants AND INVERSIONS)
# MIDI Chord generation
# Now with modal interchange, secondary dominants & inversions
# See https://www.youtube.com/watch?v=3yryQbRgsGo
define :oneChord do | tonic, mode, deg |
majorKeyTriads = [:M,:m,:m,:M,:M,:m,:dim]
minorKeyTriads = [:m,:dim,:M,:m,:m,:M,:M]
majorKey7s = [:M7,:m7,:m7,:M7,:dom7,:m7,:halfdiminished]
minorKey7s = [:m7,:halfdiminished,:M7,:m7,:m7,:M7,:dom7]
@interstar
interstar / bytebeats.pyscript
Created November 26, 2023 17:43
ByteBeats in Edison, Pyscript Edition
from enveditor import *
"""
Create bytebeats in FL Studio's Edison editor. Change the formula in generator(t) to change the actual bytebeat
This script should be called something like bytebeats.pyscript and placed in
"C:\Users\<USERNAME>\Documents\Image-Line\FL Studio\Settings\Audio scripts"
@interstar
interstar / longdelay.lua
Last active August 16, 2023 02:30
Long Delay for Lua Protoplug
--[[
name: Delay Line
description: Simple delay line effect with DC removal
author: osar.fr (adapted by Phil Jones )
See : https://www.youtube.com/watch?v=PEUZZCpzkWo
--]]
require "include/protoplug"
@interstar
interstar / Sonic Pi Chords (no MIDI)
Created March 29, 2021 13:27
Sonic Pi Chords. The same as the Cheat Sheet, but not using MIDI. Plays them directly in Sonic Pi
# Chord Sequence only in Sonic Pi
# (no MIDI or need for external DAW)
define :chordSeq do | tonic, mode, degs |
majorKeyTriads = [:M,:m,:m,:M,:M,:m,:dim]
minorKeyTriads = [:m,:dim,:M,:m,:m,:M,:M]
majorKey7s = [:M7,:m7,:m7,:M7,:dom7,:m7,:halfdiminished]
minorKey7s = [:m7,:halfdiminished,:M7,:m7,:m7,:M7,:dom7]
@interstar
interstar / protoplug_arpeggiator.lua
Last active December 13, 2022 10:01
A simple arpeggiator that turns one note into an arpeggio in Lua Protoplug
--[[
name: One Key Arp
description: Takes in a single Midi Note, generates a "chord"
(ie. collection of notes) but then play the chord as an arpeggio
author: synaesmedia
See : https://www.youtube.com/watch?v=MHo1FXyRvrA for tutorial
--]]
require "include/protoplug"
@interstar
interstar / jchords.rb
Last active December 13, 2022 09:52
Modern Japanese Chord Progression
## Japanese chord progression
## Based on https://www.youtube.com/watch?v=yKV58VVGV9k
## See https://www.youtube.com/watch?v=ADr8hrjpKbo
define :oneChord do | tonic, mode, deg |
majorKeyTriads = [:M,:m,:m,:M,:M,:m,:dim]
minorKeyTriads = [:m,:dim,:M,:m,:m,:M,:M]
majorKey7s = [:M7,:m7,:m7,:M7,:dom7,:m7,:halfdiminished]
minorKey7s = [:m7,:halfdiminished,:M7,:m7,:m7,:M7,:dom7]
# Create Chords in Sonic Pi, to send via MIDI to your other DAW or synth
# See https://www.youtube.com/watch?v=qd8SEL_rTNw
define :chordSeq do | tonic, mode, degs |
majorKeyTriads = [:M,:m,:m,:M,:M,:m,:dim]
minorKeyTriads = [:m,:dim,:M,:m,:m,:M,:M]
majorKey7s = [:M7,:m7,:m7,:M7,:dom7,:m7,:halfdiminished]
minorKey7s = [:m7,:halfdiminished,:M7,:m7,:m7,:M7,:dom7]
cs = []
@interstar
interstar / chords2.rb
Last active July 9, 2022 00:07
Sonic Pi Chord Generation 2 (now with secondary dominants and modal interchange)
# MIDI Chord generation
# Now with modal interchange and secondary dominants
# See https://www.youtube.com/watch?v=3yryQbRgsGo
define :oneChord do | tonic, mode, deg |
majorKeyTriads = [:M,:m,:m,:M,:M,:m,:dim]
minorKeyTriads = [:m,:dim,:M,:m,:m,:M,:M]
majorKey7s = [:M7,:m7,:m7,:M7,:dom7,:m7,:halfdiminished]
minorKey7s = [:m7,:halfdiminished,:M7,:m7,:m7,:M7,:dom7]
@interstar
interstar / microbit_module.py
Last active July 5, 2022 01:46
3 Sound Modes for the BBC Microbit
import speech
import random
import music
import time
import math
from microbit import pin1, pin2, display, button_a, button_b, sleep
# See https://www.youtube.com/watch?v=DOlMiNbmLWg
def scale(x, lo1, hi1, lo2, hi2) :
@interstar
interstar / squarewavesynth5.lua
Created January 13, 2022 11:52
Noisy Square Wave Synth #5 : Now with low-pass filter
--[[
name: square demo 5
description: > generate a squarewave with pulse width control and filter
author: synaesmedia
--]]
require "include/protoplug"
local makeFilter = require "include/dsp/cookbook filters"