Hello everyone, how are you doing?
I just started with Sonic Pi about a week ago, and the first thing I did was to start coding the classic Herbie Hancock’s Chameleon song to play around with it. So I wrote the bassline, the first part of the melody and structured them in live_loops and learned how to get it all synced.
But before I continued with the song, I wanted to try to get as close as possible do that delicious synth bass sound from the original song. With zero knowledge in sound synthesis practice and new to SP, I did a lot of grinding through the tutorial, some videos showing how to create the sound on physical synths and videos explaining how synths actually work to try to understand and put it all together.
So this is where I got, I think I’m in the right direction here, but kinda hit a wall and have no further idea how to get closer to the original sound. Also, the log is giving warnings about running behind time, although I can’t really hear any timing problem.
But the biggest problem is that once the code is running, if I hit run again, I loose part of the effect and only get the heavy filter effect, so I can’t do any live coding with it, only let it run…
I hope you enjoy the sound and if anyone can give me some tips on how to improve it further and also to solve these problems I mentioned, I will highly appreciate.
# Herie Hancock Chameleon bass synth experiment # Pedro Cambier use_bpm 95 # main bass line bassline = [:r, :g1, :ab1, :a1, :bb1, :ab2, :bb2, :c2, :db2, :d2, :eb2, :bb2, :db3].ring # bass sleep time between notes basstimes = [0.5, 0.5,0.5,0.5,0.75,0.75,1,0.5,0.5,0.5,0.75,0.75,0.5].ring # bass notes durations bassdurs = [0.5, 0.5, 0.5, 0.5, 0.3, 0.3, 0.3, 0.5, 0.5, 0.5, 0.3,0.3, 0.3].ring # min frequency hpf min_cutoff = 35 # release time rel = 0.1 # attack lpf value attack_lpf = 95 # lpf value after filter slides in (initial value, updated with notes values) base_lpf = 40 # main synth amp value synth_amp = 0.125 # short attack value attack = 0.05 with_fx :distortion, distort:0.7 do # Trying to add some dirt with distorion with_fx :hpf ,cutoff:min_cutoff do # hpf to cut out the really low freqs to try to dry it out a little with_fx :rlpf, res:0.3 do |fx| # Start with low res value, will rise when filter slides in live_loop :herbiebass do tick sleeptime = basstimes.look # Check if its a rest note if !rest? bassline.look # lpf frequency is the current note base_lpf = bassline.look # Update sleep time sleeptime = sleeptime - attack # Get filter back down before calling synth control fx, cutoff: base_lpf+ rrand(0,5) synth :saw, note:bassline.look, detune:0.05, attack:attack, release:rel, decay:bassdurs.look-rel, sustain:0, amp: synth_amp, cutoff:attack_lpf # Slide filter up with ressonance in short attack time control fx, cutoff: attack_lpf, cutoff_slide:attack, res: 0.7, res_slide:attack # After attack time, slide filter back down within note duration time sleep attack control fx, cutoff: base_lpf + rrand(0,5), cutoff_slide:bassdurs.look, res:0.3, res_slide:bassdurs.look end sleep sleeptime end end end end