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:
through the top menu bar under View > Show Help
through the keyboard shortcut, Meta-I (Meta being Alt on Windows or Linux, Cmd on Mac)
toggling the button in Sonic Pi’s button toolbar below the main menu.
(Furthermore, if you are typing/navigating around the text in the editor and the cursor is on one of the Sonic Pi function names, (or synths, fx etc) you can hit Control-I and it will show help about that particular keyword directly).
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
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
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.