Skip to content

Instantly share code, notes, and snippets.

Robin Newman rbnpi

  • Near Peterborough
View GitHub Profile
@rbnpi
rbnpi / DreamyRelentlessA.rb
Last active Feb 1, 2019
Dreamy Relentless A a piece for Sonic Pi. Hear it at https://soundcloud.com/user-195236670/dreamyrelentlessa
View DreamyRelentlessA.rb
#DreamyRelentlessA by Robin Newman, February 2019
#In this piece I started by experimenting with two streams of notes
#of varying frequencies intially almost identical. This built up with the addition
#of several similar notes varying in the opposite sense, ie decreasing in frequency
#as the first set increased. The resulting rather dreamy sound was pleasing,
#especially when it resolves to the notes being perfectly in tune.
#I then experimented with adding an insistant repetitive beat, using two
#tones played with :tb303 and :chiplead. Rhythm was added using the spread function
#and I also added some percussion, and repetitively faded between the two streams
#of dreamy notes. Finaly I slowed the whole thing down, and it sounded much better
@rbnpi
rbnpi / palladio-RF.rb
Last active Jan 16, 2019
Palladio by Karl Jenkins arranged for Sonic Pi. Play using run_file command. Hear it on https://soundcloud.com/user-195236670/palladio
View palladio-RF.rb
#palladio-rf.rb
#PALLADIO by Karl Jenkins arranged for Sonic Pi by Robin Newman Jan 2019
with_fx :reverb,amp: 2,room: 0.6,mix: 0.7 do
use_synth :blade
use_bpm 90
with_fx :level, amp: 0.7 do
a1=[:r,:r,:r,:F4,:E4,:F4,:A3,:r,:r,:F4,:G4,:F4,:G4,:r,:r,:r,:G4,:F4,:G4,:Bf3,:r,:r,:G4,:F4,:E4,:F4,:r,:r,:r,:F4,:E4,:F4,:A3,:r,:r,:F4,:G4,:F4,:G4,:r,:r,:r,:G4,:F4,:G4,:E4,:Bf4,:A4,:G4,:F4,:E4,:D4,:r,:r,:r,:F5,:E5,:F5,:A4,:r,:r,:F5,:G5,:F5,:G5,:r,:r,:r,:G5,:F5,:G5,:Bf4,:r,:r,:G5,:F5,:E5,:F5,:r,:r,:r,:F5,:E5,:F5,:A4,:r,:r,:F5,:G5,:F5,:G5,:r,:r,:r,:G5,:F5,:G5,:E5,:Bf5,:A5,:G5,:F5,:E5,:D5,:r,:r,:r,:F5,:E5,:F5,:r,:F5,:E5,:F5,:r,:E5,:D5,:E5,:r,:E5,:D5,:E5,:r,:D5,:Cs5,:D5,:r,:D5,:Cs5,:D5,:Cs5,:D5,:E5,:Cs5,:D5,:A4,:F4,:D4,:r,:F5,:E5,:F5,:A4,:F5,:E5,:F5,:G4,:E5,:D5,:E5,:G4,:E5,:D5,:E5,:F4,:D5,:Cs5,:D5,:F4,:D5,:Cs5,:D5,:F4,:D5,:Cs5,:D5,:F4,:D5,:Cs5,:D5,:Cs5,:Cs5,:B4,:Cs5,:D5,:D5,:Cs5,:D5,:E5,:E5,:D5,:E5,:F5,:F5,:E5,:D5,:Cs5,:Cs5,:A4,:B4,:Cs5,:D5,:D5,:B4,:Cs5,:D5,:E5,:E5,:Cs5,:D5,:E5,:F5,:F5,:E5,:D5,:Cs5,:Cs5,:B4,:Cs5,:D5,:D5,:Cs5,:D
@rbnpi
rbnpi / tallis40part-RF.rb
Last active Dec 20, 2018
Spem in Alium Thomas Tallis arrange for Sonic Pi Listen to it at https://soundcloud.com/user-195236670/tallis40part
View tallis40part-RF.rb
#tallis40-RF.rb
#arranged for Sonic Pi by Robin Newman, December 2018
#use run_file "path/to/tallis40part-RF.rb" to run it.
define :pl do |nt,durs,pan,vol=0.2|
in_thread do
nt.zip(durs).each do |n,d|
play n,attack: 0.1,sustain: d*0.9,release: d*0.1,pan: pan,amp: vol
sleep d
end
end
@rbnpi
rbnpi / SP-KeyboardController2.rb
Last active Dec 17, 2018
computer keyboard input to Sonic Pi (version 2) See article on https://wp.me/P3KOu1-Sx and video on youtube at https://youtu.be/XCIJu8YJTp0
View SP-KeyboardController2.rb
#SP-KeyboardController2.rb
#experimental program to control Sonic Pi from the keyboard
#developed from an orbianl program written by Robin Newman, April 2016
#you can play notes direct, or initiate any of 10 liveloops
#now updated to use OSC communiation from the key polling program
#set up hash to contain notes
notes=Hash.new
#list of notes
l=[:c4,:cs4, :d4, :ds4, :e4, :f4, :fs4, :g4, :gs4, :a4, :as4, :b4, :c5, :cs5, :d5, :ds5, :e5, :f5, :fs5, :g5]
View Spirograph.py
#Author: marktini github.com/marktini
#Spirograph curve drawing program
#Version 1.0
#modified to Python3 by Robin Newman Dec 2018
#additions to allow export of x,y coords using OSC message
#with aid of pythonosc library
import math
import turtle
import random
import time
@rbnpi
rbnpi / BerliozShepherdsFarewell.rb
Last active Nov 26, 2018
Berlioz Shepherds' Farewell arranged for Sonic Pi. 17 channel midi output, rendered by VMPK (https://sourceforge.net/projects/vmpk/)with audio fed back to Sonic Pi. Hear it on https://soundcloud.com/user-195236670/berliozshepherdsfarewell
View BerliozShepherdsFarewell.rb
#ShepherdsFarewellBerliozMIDI-RF.rb
#arranged for Sonic Pi by Robin Newman November 2018
#played by virtual midi piano, audio fed back to Sonic Pi
#as live_audio input
with_fx :reverb,amp: 3,pre_amp: 1,room: 0.8,mix: 0.6 do
live_audio :min,stereo: true
end
#function to play midi notes/duration lists with optional transpose
define :mplay do |notes,durs,channel,tr,vel=100|
@rbnpi
rbnpi / apcOSC1.rb
Created Nov 5, 2018
Sonic Pi fx parameter control using TouchOSC. index.xml is the TouchOSC template. Donwload and zip it and rename to paramControl.touchosc
View apcOSC1.rb
#apcOSC1.rb
#Sonic Pi 3 automated parameter control for fx calls controlled by TouchOSC
#developed from an idea by Martin Butz. Code developed by Robin Newman, November 2018
use_osc "192.168.1.240",9000 #address of TouchOSC and input port
#initialise some parameters
#these will be updated further by signals from TouchOSC
set :start,0
set :finish,0.5
set :dur,1
set :type,:fade
@rbnpi
rbnpi / apcPROG.rb
Created Nov 5, 2018
Controlling fx parameters in Sonic Pi: 2 live loops with 5 with_fx wrappers. See thread https://in-thread.sonic-pi.net/t/smooth-parameter-automation/1626
View apcPROG.rb
#apcPROG.rb
#Sonic Pi 3 automated parameter control for fx calls controlled by TouchOSC
#inspired by Martin Butz. Code developed by Robin Newman, November 2018
#programatically controlled fadeing of fx opt levels
use_random_seed 886543
#setup some starting values
set :kill,false
set :finishTime,120 #duration set for the piece
#start values for next input AFTER the initial fade of the 5 fx used
View fxControlDemo.rb
#fxControlDemo.rb
#This program demonstrates the control of fx parameters to give smooth fades
#in their effects. Prompted by a thread https://in-thread.sonic-pi.net/t/smooth-parameter-automation/1626
#started by Martin Butz
#Martin Butz's original fade function renamed, and simplified
#for only two fade types fade and wave
#fade up or down is selected automatically from the relation#
#between start and finish values
define :fadeSteps do |start, finish, len, type|
@rbnpi
rbnpi / broadcastOSC.py
Created Oct 26, 2018
OSC broadcast repeater for use with Sonic Pi. A video showing use is at https://youtu.be/5oIRqA6DLt4 and an article is being written (will post details here)
View broadcastOSC.py
#!/usr/bin/env python3
#broadcast received OSC message
#written by Robin Newman, October 2018
#designed for use with Sonic Pi 3
#requires python-osc
#install with sudo pip3 install python-osc
import argparse
from pythonosc import osc_message_builder
from pythonosc import udp_client
from pythonosc import dispatcher
You can’t perform that action at this time.