This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#BachFugues2-RF.rb | |
#Two small bach Fugues arranged for String Trio by Alexandre Evstyugov-Babaev | |
#from https://musescore.com/user/27897310/scores/14176597 copyright Attribution, Share Alike | |
#converted for Sonic Pi by Robin Newman, Feb 2024 | |
use_synth :blade | |
use_synth_defaults amp: 0.6 | |
s=0.95;r=0.05 | |
with_fx :reverb, room: 0.6,mix: 0.6 do | |
a1=[] | |
b1=[] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Blue_Danube-RF.rb | |
#coded for sonic pi by Robin Newman, January 2024 | |
#from https://musescore.com/user/29230024/scores/5161782 by andreamotas4 | |
#Creative Commons Copyright Waiver | |
use_synth :blade | |
use_synth_defaults amp: 0.3 | |
s=0.9;r=0.15 | |
with_fx :reverb, room: 0.8,mix: 0.6 do | |
with_fx :level,amp: 1.2 do | |
a1=[] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#sonification generated by the number E with steadily increasing precision | |
#from 1 to 60, written by Robin Newman, Dec 2023 | |
#The number is generated by BigMath.E(precision) | |
#I use each digit as a lookup index into a minor pentatonic scale | |
#I read the digits from each end of the current number, and play | |
#one of the two resulting notes, selected by a density funtion and a spread function | |
#which gives a bit of rhythm. | |
#These notes are underpinned by a base drone, which is layered as it has a longer | |
#release time and is generated increasingly as the base E string gets longer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#functions to aid connecting and disconnectiog SuperCollider under pipewire | |
define :getCurrentData do | |
#first input ports | |
inputs = `pw-link -iI`.lines | |
set :hdmiL,inputs.grep(/hdmi.*playback_FL$/).first.to_i | |
set :hdmiR,inputs.grep(/hdmi.*playback_FR$/).first.to_i | |
set :usbL,inputs.grep(/usb.*playback_FL$/).first.to_i | |
set :usbR,inputs.grep(/usb.*playback_FR$/).first.to_i | |
set :bluezL,inputs.grep(/bluez.*playback_FL$/).first.to_i |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#bach-allabreve2-bwv589-RF.rb | |
#coded for Sonic Pi by Robin Newman, July 2023 | |
use_debug false | |
use_synth_defaults amp: 0.5 | |
s=0.96;r=0.04;st=0 #s,r,st = sustain factor,release factor, start tempo section | |
Last = 4 #pause on last note | |
with_fx :reverb , room: 0.9,mix: 0.7 do | |
use_synth :pulse | |
with_fx :compressor,amp: 0.7 do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Sonic Pi HiHats by Robin Newman May 2023 | |
#demo of new hi-hat samples in action | |
#program prints sample names, then fades in | |
#and runs for about 1 minute before fading out and stopping | |
use_debug false | |
sample_names(:hat).each do |name| | |
puts name | |
end | |
set :kill,false | |
at 65 do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Sonic Pi 4.4dev with built in Hydra | |
#Hydra sketch shows Frere Jaques 2 part round notes in real time | |
#coded by Robin enwman February 2023 | |
use_debug false | |
define :clearPanes do | |
hydra " | |
solid(0,0,0).out(o0) | |
solid(0,0,0).out(o1) | |
solid(0,0,0).out(o2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Reich like drumming, by Robin Newman, January 2023 | |
#I use hi and mid tomtoms for the two parts | |
#or you can set them both the same eg to hard snare | |
use_debug false | |
use_midi_logging false | |
use_midi_defaults channel: 1,port: "iac_driver_bus" | |
link #lets you adjust tempo as program is running | |
#set master pattern option with uniform amp or accented amp | |
#uncomment either the 12 beat or 16 beat patterns |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Sonic Pi controlled code using midi and audio input by Robin Newman | |
// register WebMIDI | |
navigator.requestMIDIAccess() | |
.then(onMIDISuccess, onMIDIFailure); | |
function onMIDISuccess(midiAccess) { | |
console.log(midiAccess); | |
var inputs = midiAccess.inputs; | |
var outputs = midiAccess.outputs; | |
for (var input of midiAccess.inputs.values()){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#This piece is developed from a chord progression tool written by theibbster on sonic-pi.net | |
#Robin Newman, December 2022 | |
define :chrd do |deg, tonic, sca| | |
n = 3 | |
if deg.match?('7') | |
n = 4 | |
deg = deg.slice(0,deg.length-1).to_sym | |
end | |
NewerOlder