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
THESE FILES WERE WRITTEN FOR SONIC PI VERSION 1 | |
THEY WILL REQUIRE REVISION TO WORK ON VERSION 2 | |
I HAVE OTHER FILES FOR VERSION 2 POSTED ON MY BLOG | |
SOME OF THESE FILES ARE POSTED THERE IN REVISED VERSIONS | |
http://rbnrpi.wordpress.com | |
Posted here will be music files for use with Sonic-Pi on the Raspberry Pi. | |
If you have the Sonic-Pi music program isntalled (it is on the latest distribution for Raspian) you can start it up from the Graphic Desktop (there is a link under Education on the Start Menu). You can then copy and past the contents of one of the play files into one of the 8 workspace windows and click play to play it. |
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
#playing with code loops and c-minor scales. Robin Newman Nov 2014 | |
#this piece controls 7 loops with a metronome loops generating cues | |
#which also selects a synth name from a given list and stores it in a global variable | |
#a loop (vset) controls the overall volume of the piece, fading it up and down | |
use_debug false | |
set_volume! 0 #set initial volume | |
with_fx :reverb,room: 0.8 do | |
live_loop :metro do | |
$S = [:tri,:prophet,:fm,:zawa,:saw].choose |
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
The programs were created using a near release beta of Sonic-Pi 2.1 | |
Because of the processing required these programs will not work effectively on a | |
Raspberry Pi, but require the more powerful resources available on the Mac version of | |
Sonic Pi, although they should also work on a more powerful Linux box under say Ubuntu. | |
and probably on the Windows version of Sonic Pi too, although I haven't tested this. | |
The first program createsamples uses 6 live_coding loops to generate a pattern of notes | |
related to a c minor scale, together with a background ambi_lunar_land sound. The timing | |
is controlled by cue and sync commands using the metronome thread metro. |
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
#Puppet on a String transcribed by Robin Newman | |
set_sched_ahead_time! 4 | |
v = :tri | |
bv = :saw | |
ba = 0.3 #b vol | |
s = 1.0 / 15.5 #tempo 116 c/min | |
dsq = 1 * s #note length definitions | |
sq = 2 * s |
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
#study in g minor for Sonic Pi 2,1 by Robin Newman November 2014 | |
live_loop :voice do | |
sync :foo | |
$s = [:prophet,:beep,:tri,:fm,:zawa].choose #set the synth each time loop foo3 finishes | |
sync :change | |
end | |
set_volume! 1 | |
k=0 | |
with_fx :reverb,room: 0.8,mix: 0.8 do #add overall reverb | |
live_loop :foo 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
#a Glass Armonica "voice" for Sonic Pi by Robin Newman November 2014 | |
# revised to use rpitch 2018; corrected 2022 for missing tr function | |
#This simulates the Glass Armonica invented by Benjamin Franklin and for which Mozart | |
#composed the piece played here | |
#This version uses rpitch: parameter added to Sonic Pi after the original was written in 2014 | |
##| sample :ambi_glass_rub | |
##| play :fs5 | |
##| puts note(:fs5) | |
##| stop | |
use_debug false |
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
#defining chord inversions, and using them to harmonise an ascending and descending scale | |
#by Robin Newman, November 2014 | |
#the pattern is repeated at semitone intervals 12 times | |
#written by Robin Newman Nov 2014 using Sonic Pi 2.1 | |
use_debug false | |
set_sched_ahead_time! 2 #set to about 55 to run on Pi!!!!!! | |
q=0.12 #note length used | |
use_synth :tri | |
with_fx :reverb,room: 0.8 do #add some reverb for interest |
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
#Percussion track generator by Robin Newman, 1st December 2014 for Sonic-Pi 2.1 | |
#Inspired by an article http://www.soundonsound.com/sos/feb98/articles/rythm.html | |
#This program generates a percussion programme defined over two bars quantised to 32 pulses per bar | |
#up to 10 instruments can be incorporated | |
#any instrument can sound on any pulse | |
#one of three volumes can be chosen for each instrument for each pulse | |
#a variable p sets the pulse tempo for each programme | |
#a variable n sets the number of bars the track will play for in 2 bar increments | |
#In this example three drum programmes are defined num = 1 to num = 3. num=0 plays silence | |
#These can be chosen in a live_loop by changing the variable num |
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
#sample based voices for any bass_xxx_c samples over 4 octave range from :c2 to :c5 by Robin Newman December 2014 | |
#use pl(inst,n,d=0.2,pan=0,v=0.8) to play a note where n is note symbol,d duration,v volume | |
#or plarray(inst,nt,dur,sh=0,vol=0.8,pan=0) to play lists of note symbols and durations | |
#where inst is samplename,nt and dur are note symbol and duration arrays,sh transpose shift | |
use_debug false | |
rm = 2**(1.0/12) #rate multiplier between adjacent semitones (twelth root of 2) | |
inst = :bass_hard_c #to define scope of inst variable set up here. Used as a parameter later | |
s=1.0/16 #speed multiplier give 2 crotchet/sec or 120 bpm | |
shift=0 |
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
#bass sample voices for Sonic Pi version 2. With Frere Jaques and chords examples | |
#sample based voices for any bass_xxx_c samples over 4 octave range from :c2 to :c5 by Robin Newman December 2014 | |
#use pl(inst,n,d=0.2,pan=0,v=0.8) to play a note where n is note,d duration,v volume | |
#or plarray(inst,nt,dur,sh=0,vol=0.8,pan=0) to play lists of notes and durations | |
#where inst is samplename,nt and dur are note and duration arrays,sh transpose shift | |
#tidied up tr, pl, plarray definitions and added plchord to play chords. | |
#all of them now accept symbolic or numeric note entry | |
use_debug false |
OlderNewer