Hi, I am Agus and I am new to Sonic Pi.
Is there anybody here who can tell me the meaning of
- line x, y, steps: z
- (line 0.25, 1, steps: 100).reflect
- (line -0.85, 0.85, steps: 100).tick
Where can I get a documentation of this line command?
Thank you.
Hi, I am Agus and I am new to Sonic Pi.
Is there anybody here who can tell me the meaning of
Where can I get a documentation of this line command?
Thank you.
Hello @Aguscao
Welcome to in_thread!
Where can I get a documentation of this line command?
These and all of the other built in functions are described in a language reference (titled ‘Lang’) in the app itself, in the Help panel. You can find this in several ways:
So, you could move your cursor over the line command and hit Control-I, and the documentation for it will be shown. Have a read of that - and if you still have further questions, I’m sure someone would be able to help explain it ![]()
Oh, OK, I’ve found it, thank you.
I am sure I have read this documentation several times, but never found this one.
Thanks again
hi
live_loop :differenceBetweenRangeAndLine do
withRange = (range 0, 10, step: 1, inclusive: true).tick
puts withRange
# step : the value added each tick
withLine = (line 0, 10, steps: 3, inclusive: true).tick("line")
# steps describes the number of step to reach the end value
puts withLine
sleep 1
end
no entry for reflect in the langage section ?.
an example to use reflect
live_loop :up_down_amp do
use_synth :piano
r3 = (line 0, 1, steps: 20, inclusive: true).reflect
foo = r3.length-1
with_fx :echo, mix: 0.15 do
play (scale :c4, :ahirbhairav, num_octaves: 2).reflect.tick("n"), amp: r3[0..foo].tick, sustain: 0.2
sleep 0.1
end
end
Thanks everyone, I have actually found the information I need in the help section of the program. Maybe I missed them somehow when I read it before, but now I have found it.
Thanks a lot.