@joakim just posted the referenced message last week, which should work for what you want.
However I use o/pitch-shift to transpose down all the time.
In the docs, the third parameter is pitchRatio : https://doc.sccode.org/Classes/PitchShift.html.
So every number under 1 is a lower pitch. For example 1/2 is one octave down, 1/4 is two octaves down. 2/3 a fifth down, and so on.
I like just intonation so I mostly use ratios for my pitches, but you may want to convert from ratios to midi so you can use o/midiratio for that (0 is a unison, e.g. ratio 1; -12 is 0.5, etc.)
thanks very much @diego.vid.eco I will try both your suggestion with pitchshift, and also loading the ugen
I think I find pitchshift confusing, because I tried this code and it never piches down: (definst pitcher [] (pitch-shift:ar (sound-in:ar [0 1]) 0.1 (mouse-x:kr -2 2) 0 0.004) )
originally the -2 in the mouse-x was from 0, not -2
Right now I don’t have a mic available, but this works for me:
(o/definst pitcher []
(o/pitch-shift:ar (o/sin-osc [100 200])
0.1
(o/mouse-x:kr 0 2)
0
0.004))
thanks, but this pitches only up for me not down
same as with my other tries
wow, that’s weird. Have you tried it directly on the SC IDE?
The above is sort of a escape hatch that let’s you define your synthdefs in SuperCollider and use them in Overtone, not ideal, but better than nothing and can allow you to use SynthDefs from other people or code examples that you see around. But you can also modify Overtone directly, this is an example, although this case Overtone is not compiling as expected. Has similar issues with the DX7 UGen from the SCPlugins. But sometimes it does work, the procedure is very much what’s done on the trig.clj file, but you’ll just need to find a more appropriate file: https://github.com/overtone/overtone/commit/5db278b82984ca44d78ffd1b3c7c02c193166e37 (edited)
no, I'm not familiar with how to use it, I guess I can learn of course
ok, I tried removing the mouse-x altogehter and replacing with a constant, like 0.5, as you suggested. Now the pitch goes down!
So, I guess for some reason in my case mouse-x doesnt go below 1 then? anyway, thats no big deal, since I was going to modulate the samples with a sequence anyway.
tnx for all the help!
welcome