Translating Pi to Tau

I might be wrong, but I suspect there’s no simple way to loop over a collection of things yet, other than using a live_loop or X.times do and manually incrementing your own counter variable…

1 Like

I think that’s only in the way it prints the values to the console.
(It might be non-deterministic, or at the very least not helpfully ordered, when the print commands are executed so close together).
If you insert a sleep 1 in the loop, it prints them out in the expected order.

If you’re wondering, I think comments are made by adding -- at the start of (or somewhere along) a line of code. I’m not sure that block comments are possible though, haven’t seen anything that makes them work yet.

Hi @hitsware - for x in 0..3 isn’t in the Sonic Pi tutorial so isn’t actually valid Sonic Pi code. It’s Ruby code that is there due to the Ruby heritage.

Yes, comments in Sonic Tau are -- prefixed - # is now available for play C#3 and no, there are no block comments (yet) I might add the comment block if people find that useful.

1 Like

So this is the way to make indexs ?

For the moment, probably, although I can’t speak for Sam exactly. If Tau was basically complete, then it’s highly unlikely he’d make this the standard way to do that.
As he’s mentioned recently, It is only a temporary technology preview that will be deleted and rebuilt from the ground up - though of course only he currently knows how feature-complete he’ll decide to make this preview before doing so.