I’m a beginner with Sonic Pi. I read the tutorial included with the software but I still have some questions.
I found a code on the internet which contains that part:
notes.each do |n| 2.times do amps.each do |a| play n, amp: a s = sleeps.shift sleep sleeps.push(s).last end end
In fact I don’t understand elements like “.shift”, “.push” or “.last”. What these elements are supposed to do ? i don’t find them in the “Langage part” of the software. Nothing is explained about them. Also, I do not clearly understand what is the aim of “.” (the point) between elements/characters.
I got another question too: what means “+=”. I saw that in codes of some users but I have no idea about what it is used for.
Thanks by advance for your answers.