Hello, I worked on one of my abstractions today so that I can feed it a spectrum of specific pitches from which it randomly chooses one at each bang. This abstraction is a sample reader, so the base pitch is different depending on the file. I then transpose it by changing the reading speed of the array. So if 1 is the untransposed base pitch (normal playback) and 2 is an octave higher, what's the simplest way to calculate semi-tones (I'll worry about quarter- or other microtones later on) in between 1 and 2? I would like to be able to feed the abstraction something like "0 4 8 12" and have it play back c, e, g# and c (if the base pitch is a c), but if I just divide those values by 12 and add them to 1, it doesn't work because of how frequency ratios work. Any ideas? I'd also like to be able to transpose downward in the same way...
I'm aware of the existence of [mtof] and [ftom], but I'm not sure they're of any use here...