As I said, i hadn’t actually tried this and I don’t have a ready script for it. But I just started up Teletype to confirm this works:
In live mode, enter
Y / N 12 31
This divides the value for one octave (N 12) by 31 to find out what value you’d need to send to get one step higher in your scale. Now Y holds the value of one step in your scale of 31 semitones. In live mode, enter
Y
to see that this value is 68. Still in live mode, enter
L 1 64: PN 0 I * Y I
This loops over all numbers from 1 to 64 and for each writes Y * that number at the corresponding position of the pattern. Switch via TAB to your patterns. You should now see that the first pattern is filled with values (each one 68 higher than the last).
As a quick test, you could also put this into your M script (note the first is a zero, the second one the letter O):
CV 1 PN 0 O
Which sets CV 1 to the value at the Oth position in the first pattern. O increments each time you read from it, so now your metro script will cycle through the pitches in your scale. Now if you don’t want to just cycle through, but rather want to send specific notes from your scale, let’s say the 20th note in your scale, you can write that as:
CV 1 PN 0 20
which will set CV 1 to the value at position 20 in the first pattern.