I am exploring at the moment sonic pi and tidal.
Tidal is kind of magical to me, very condensed and different from other programming languages I had contact with. But in its strangeness so beautiful.
What I want to achieve is a simple thing:
First question: How can I add/insert between some values (e.g. in a speed pattern) a random value?
Basically something like this (value, value, random value, value).
d1 $ s "slx slx slx slx"
# speed ("0.2 0.8" + rand)
# begin "0.3 0.1 0.6"
# gain "0.8"
#release "1"
I already tried many things, and sometimes I do not get an error but I do not understand what happens. Second question: is there a kind of debugging thing like a āprintā or āpollā that is good to use?
yaxu, thank you for the reply.
this looks also like a very nice solution. It seems to be helpful to know a little bit haskell.
So the false, true pattern tells at which point the random interger will be integrated ā¦ hm, very flexible!
NB: Iād be good to have these synchronized. E.g., I donāt see while in the first reference, but it`s in the second one. Of course, all functions must be there but in this case it also has explanatory text. [Edit] Iām not suggesting someone copies texts around. Of course these things are only feasible with automation (automatically create different forms of documentation from one source).
May I also recommend to use the API docs (second ref. above) as a starting point for ālearning Haskell by reading codeā exercises. Use the āsourceā links (right end of each line). Then follow hyperlinks in the source. Sure, one point of documenting the API is precisely that users donāt have to read the code that implements it - but they can.
And for the case at hand, youāll find while b f pat = sew b (f pat) pat, so these functions are closely related.