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

std::vector< double > csound::Score::getVoicing ( size_t  begin,
size_t  end,
size_t  divisionsPerOctave = 12 
) const [virtual]

Iterate over each note from the beginning to end of the segment; sort the unique pitches; return those unique pitches which also have unique pitch-class sets, in order from lowest to highest in pitch; this has the effect of returning the "inversion" or "voicing", in the musician's informal sense, of the pitches in that segment of the score.

Definition at line 663 of file Score.cpp.

References getPitches(), csound::System::inform(), csound::Voicelead::pc(), and csound::Voicelead::uniquePcs().

Referenced by voicelead().

    System::inform("BEGAN Score::getVoicing(%d, %d, %d)...\n", begin_, end_, divisionsPerOctave_);
    std::vector<double> pitches = getPitches(begin_, end_, divisionsPerOctave_);
    std::set<double> pcs;
    std::vector<double> voicing;
    for (size_t i = 0, n = pitches.size(); i < n; i++) {
      double pitch = pitches[i];
      double pc = Voicelead::pc(pitch, divisionsPerOctave_);
      if (pcs.find(pc) == pcs.end()) {
    std::sort(voicing.begin(), voicing.end());
    printChord("  voicing:             ", voicing);
    std::vector<double> resultTones = Voicelead::uniquePcs(voicing, divisionsPerOctave_);
    printChord("  as pitch-class set:  ", resultTones);  
    System::inform("ENDED Score::getVoicing.\n");
    return voicing;

Generated by  Doxygen 1.6.0   Back to index