Logo Search packages:      
Sourcecode: csound version File versions  Download package

double csound::Voicelead::pc ( double  pitch,
size_t  divisionsPerOctave = 12 
) [static]

Return the pitch-class of the pitch. The octave is always defined as 12 semitones. If the number of divisions per octave is also 12, then the pitch-class of a pitch is an integer. If the number of divisions per octave is not 12, then the pitch-class is not necessarily an integer; but this method rounds off the pitch to its exact pitch-class.

Definition at line 97 of file Voicelead.cpp.

Referenced by conformToPitchClassSet(), csound::Score::getVoicing(), orderedPcs(), pAndTtoPitchClassSet(), pcs(), pitchClassSetToM(), csound::Score::setVoicing(), and uniquePcs().

    p = std::fabs(round(p));
    return double(int(round(p)) % divisionsPerOctave);

Generated by  Doxygen 1.6.0   Back to index