I’m still very new to Sonic Pi but I have a lot of experience programming. I am coding a 12 bar blues and I would like to keep a directory in which each file represents a bass line. The main loop will then choose one file from there and play the bass line in it.
I found the “run_file” function in the documentation but I was wondering if there is a good way to use relative paths with it. Because Sonic Pi doesn’t really execute a Ruby file directly, I can’t use Ruby’s __ FILE __. Besides, I’ve seen Sam Aaron’s comment saying you shouldn’t treat Sonic Pi as Ruby.
Is there any good way to do this or should I just keep a variable containing the absolute path to my bass lines directory at the top of the buffer?
Thanks in advance