Dear community,
I’ve studied the code of the “random-walk” of joachim that I’ve found on https://flossmanual.csound.com/basics/random
I would like to know if the global variables giLowestPitch,giHighestPitch,giStartPitch,gkPitchDev and gkPitchDir in EXAMPLE 01D09_random_walk.csd could
also be local variables?
Thanks for Your help,
Stefan
after a quick look at the code, i see two reasons for making the variables global:
1. better overview
2. they are used in both instruments (see line 93)
but for sure the varibles could be made local, if you prefer. you need to send the lowest and highest pitch as p-fields to instr play then.