First time here? Check out the FAQ!
x

Using !Tonic to switch a tuning system on the fly?

0 votes
175 views
I'm using the Design Alternate Tunings tool to make a scale based on the 4th octave of the harmonic series:

(!KeyNumber - 60 // 12) twoExp * ((!KeyNumber - 60 mod: 12) of: #( 1 {(135 / 128)} {(9 / 8)} {(6 / 5)} {(5 / 4)} {(4 / 3)} {(11 / 8)} {(3 / 2)} {(13 / 8)} {(5 / 3)} {(7 / 4)} {(15 / 8)} )) * 261.626 hz

I'm playing it with Glass Deep Reverb KBD-5, it sounds great.

But I would like to be able to have a !Tonic dial in the VCS to switch the transposition of this scale so it doesn't have to start on C (midi note 60). I've tried replacing "60" with !Tonic, which results in weirdness; and replacing "261.626 Hz" with !Tonic nn, which results in silence. I've also tried adding it on to the end, like this:

(((!KeyNumber - 60 // 12) twoExp * ((!KeyNumber - 60 mod: 12) of: #( 1 {(135 / 128)} {(9 / 8)} {(6 / 5)} {(5 / 4)} {(4 / 3)} {(11 / 8)} {(3 / 2)} {(13 / 8)} {(5 / 3)} {(7 / 4)} {(15 / 8)} )) * 261.626 hz) + !Tonic nn)

And that seems to move it a tiny bit - but I'd like to be able to easily transpose the whole thing up or down by, say, a perfect fourth. If I hack around awhile longer I might be able to figure it out, but in the meantime I thought I'd post here. Thanks for any advice!
asked Mar 26 in Capytalk & Smalltalk by stephen-taylor (Adept) (1,620 points)

1 Answer

+1 vote
 
Best answer

Have you tried changing both the notenumber and the frequency in the expression? Something like this:

(!KeyNumber - !Tonic // 12) twoExp * ((!KeyNumber - !Tonic mod: 12) of: #( 1 {(135 / 128)} {(9 / 8)} {(6 / 5)} {(5 / 4)} {(4 / 3)} {(11 / 8)} {(3 / 2)} {(13 / 8)} {(5 / 3)} {(7 / 4)} {(15 / 8)} )) * !Tonic nn hz

answered Mar 26 by ssc (Savant) (128,000 points)
selected Mar 28 by stephen-taylor
That did the trick, thanks a million!
...