Couldn’t find anything about it in the documentation. The code is:
# input a440hz = 440 octave_division = 12 semitone_offset = [0,0,0,0,0,0,0,0,0,0,0,0] tuning_stretch = 0 random_offset = 0 def tuning_generator i = 0; while i < 128 puts frequency(i+1) i += 1 end end tuning_generator def frequency(note) a440hz * (2 + tuning_stretch ** ((note - 57) / octave_division)) end
The frequency method is using the variables on top of the file. How to make them global variables so I can access them everywhere?
ps. don’t know for sure if this is the right formula for frequency