Hi, I'm trying to write a patch that randomly plays notes from a scale. Now, I know how to create a patch that plays random pitched between an upper and lower number, but I don't know how to make it play frequencies that only corrospond to notes of the chromatic scale.Any help would be appreciated. Thanks.
random pitch generator
The easiest place to start is with the [mtof] and [mtof~] objects. They can convert midi pitches-- which are note numbers (integers) that correspond to the chromatic scale-- to frequency values. Similarly, there are [ftom] and [ftom~] to convert in the other direction.
Edit: midi pitches don't have to be integers. I just mean that if you use integers they correspond to the chromatic scale-- adding one to a midi pitch increases the pitch by a half-step, subtracting one decreases by a half-step, and so forth.