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

std::vector< double > csound::Voicelead::pitchClassSetToPandT ( const std::vector< double > &  pcs,
size_t  divisionsPerOctave = 12 
) [static]

Convert a pitch-class set to a prime chord number and a transposition. Note that the prime chord numbers, and transpositions, each form an additive cyclic group.

Definition at line 131 of file Voicelead.cpp.

References cToP(), mToC(), normalChord(), pitchClassSetToM(), and toOrigin().

Referenced by csound::VoiceleadingNode::apply(), chordToPTV(), and csound::Score::getPT().

  {
    std::vector<double> normalChord_ = normalChord(pcs_);
    std::vector<double> zeroChord_ = toOrigin(normalChord_);
    double M = pitchClassSetToM(zeroChord_, divisionsPerOctave);
    double C = mToC(M, divisionsPerOctave);
    double P = cToP(C, divisionsPerOctave);
    std::vector<double> result(2);
    result[0] = P;
    result[1] = normalChord_[0];
    return result;
  }


Generated by  Doxygen 1.6.0   Back to index