| I think I see what's happening here. Recall that cpspch(oct.pch) returns a
pitch in cycles per second, given an argument of the form .
Normally, the pitch is a 2-digit number (including leading zero) between 0 and
11, to specify one of the twelve pitches in an octave. (I realize there are
tuning systems that don't have twelve pitches, but I'm trying to stick to the
normal case (normal for most of the music I listen to, at least :-).) E.g.,
cpspch(8.09) == 440 (A above middle C), and cpspch(8.00) == 261.626 (middle
C). Thus, middle C is the first (0th) note of octave 8. Notice that a pitch
8 octaves below that would be the 0th note of octave 0, which happens to be a
frequency of 261.626 / (2^8) == 1.021975 cps. That's why cpspch(0) == 1.021975.
David Kirsh
Arne Hanna wrote:
>
> Hi Folks. This statement: i7 = (p5<0? 1.021975/cpspch(abs(p5)) :
> cpspch(p5)/1.021975)
> is from Jim Dashow's "In Winter Shine" orc, specifically from instr 15.
>
> The first value for p5 in the score is 0.
> Usually, dividing 0 by x = 0, but for some reason, in csound, cpspch(0) =
> 1.022 and the "if not" part of the conditional, returns 1.
> What's going on here?
>
> Cheers
> Arne
> |