| Like Dave, I usually prefer other tunings, but if 12-equal is your goal, there’s no need for a lookup table:
ibase = cpspch(0.00)
koct = int(kPch)
kpc = frac(kPch)*100
kfreq = ibase*2^(koct+kpc/12)
Bill
> On Dec 31, 2021, at 11:07 AM, Jeanette C. wrote:
>
> Hey hey,
> I was looking for a k-rate cps to pch converter. The only two opcodes that I could find were cps2pch and cpsxpch and they apparently only work at i-time.
>
> oct fractions can easily be scaled to pch fractional range, but it is interesting. Is there a good reason for it?
>
> Best wishes and thanks,
>
> Jeanette
>
> --
> * Website: http://juliencoder.de - for summer is a state of sound
> * Youtube: https://www.youtube.com/channel/UCMS4rfGrTwz8W7jhC1Jnv7g
> * Audiobombs: https://www.audiobombs.com/users/jeanette_c
> * GitHub: https://github.com/jeanette-c
>
> Baby, take the time to realize
> I'm not the kind to sacrifice <3
> (Britney Spears)
>
> Csound mailing list
> Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
> https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here
Bill Alves
Professor of Music, The Claremont Colleges
Harvey Mudd College
301 Platt Blvd. Claremont CA 91711
http://pages.hmc.edu/alves/
http://www.billalves.com/
Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here |