Logo Search packages:      
Sourcecode: csound version File versions

double csound::Voicelead::cToM ( double  C,
size_t  divisionsPerOctaven = 12 
) [static]

Return M = sum over pitch-classes of (2 ^ pitch-class) (multiplicative monoid for pitch-class sets) for C = (sum over pitch-classes of (pitch-class ^ 2)) - 1 (additive cyclic group for non-empty pitch-class sets).

Definition at line 538 of file Voicelead.cpp.

Referenced by csound::VoiceleadingNode::apply(), and cToP().

  {
    int M = int(std::fabs(C + 0.5)) + 1;
    int modulus = int(std::pow(2.0, double(divisionsPerOctave))) - 1;
    M = M % modulus;
    return double(M);
  }


Generated by  Doxygen 1.6.0   Back to index