Doodling lissajous

Using the new feature for generating lissajous figures in SP5 here is a doodle pattern. You can have fun by altering timings, frequencies. phase offsets, even sliding them.


#lissajous doodles on Sonic-Pi 5 by Robin Nwman
use_synth :sine
use_random_seed Time.now.to_i#resets seed hence choices each time run.
live_loop :start_new do
  #start two sines panned +/- 1
  p1=play :a3, pan: -1, sustain: 1.8 #you can play with sustain times.
  p2=play :e4, pan: 1, sustain: 3.6 #they are regenerated each time start_new repeats
  live_loop :c1 do
    control p1,note: [:a2,:a3,:a4,:a5].choose #change frequency of p1 every second
    sleep 1
  end
  live_loop :c2 do
    control p2,note: [:a5,:d4,:e4,:a3,:d5,:e5].choose,phase_offset: [0.25,0.5,0.75].choose,phase_offset_slide: [0,0.25,0.5].choose
    sleep 0.25 #this loop runs at 4 times the speed of :c1 loop
  end
  sleep 2 #time before p1,p2 regenerate
end

Perhaps I should say select lissajous from the scope options and adjust the size of the scope window to give a reoughoy square shape. Also, you can turn the exteranlal sound volume down (not the built in volume control in prefs) if you find the sound output too loud.

1 Like

Great sound. Reminds me of the Monome era :slight_smile:

Very interesting sound, but in my case, with V5 I get a

Timing Exception: thread got too far behind time error

in the sleep of live_loop :c2 (although it still plays correctly). This doesn’t happen with V4 (although the resulting sound isn’t exactly the same).

Not sure why that should be. What hardware are you using to run SP5.0?

I have it running on a mac-mini, but it also runs perfectly on my raspberry pi5

you are using the final release version of version 5.0.0?

Yes, I’m using the final release (the AppImage) on Ubuntu 22.04 with an i7-1260P processor. I’m not experiencing any CPU performance issues. I also don’t know what the problem could be, but despite the error, the sound is still being generated correctly.