Pachabel's Canon and Gigue on Sonic Pi

Been bedding in my new Pi3 B+ and built Sonic Pi 3.1 on it (with some tweaks to allow for older SuperCollider). Tried it out with several pieces, including this rendition of Pachabel’s Canon and Gigue which I created this morning. I tried using fx :normaliser to smooth out the parts (played with the :blade synth) and quite like the end effect. You can download the code (which should be played using a run_file command) from

and listen to it on SoundCloud, although they put extra compression on the file.


What a shame, too long for my Raspi

Have you tried saving the file and then using run_file “/path/to/filename” to execute it? That should work. (To get the file open the pink link in a browser to go to the gist site, select raw text and then save it as a text file).

Thank you. Now I have listened to the whole piece.
What does this construction mean:
with_fx :reverb, room: 0.8, mix: 0.7 do
with_fx :level, amp: 1.5 do
with_fx :level, amp: 0.6 do

end # level
with_fx :level, amp: 0.4 do

end # level
end # outer level

This construction is just declaring a few effects to be used between the with_fx :reverb do and the end that follows. Read the section 6 of the built-in tutorial.

Yes Bubo is correct. I have one overriding fx_level which applies to everything, but in that I wanted to control the relative levels of two different groups of playing synths. One of these had a level amp: setting of 1.5, the other 0.6 This was to balance the audio outputs of the different synths playing. Around everything I then put an fx reverb wrapper, which applied to ALL the contents. I have used this technique quite a bit when trying to balance up the outputs of a range of notes playing with different synths.
You can put individual amp: settings for each synth, but I find it more convenient to alter levels for different grouped parts together using the fx_level command.
You can also save a reference to the fx_level command and control it which is a nice way to get fades etc.

Thanks for your help.
But I made a mistake:
The construction belongs to the piece of music “SchubertSerenade-RF.rb”
For the inner level, the thing is clear, one synth 0.4 and the other 0.6.
But maybe you can use the normal volume control on Raspi instead of the outer level (1.5)

Yes you could, but I prefer to set a suitable listening level for the user without them having recourse to altering the level for each specific piece they play ( if you play several one after the other for example).

All right and thank you for the quick response