Logo Search packages:      
Sourcecode: csound version File versions

void csound::Score::setPT ( size_t  begin,
size_t  end,
double  prime,
double  transposition,
double  lowest,
double  range,
size_t  divisionsPerOctave = 12 
) [virtual]

For the specified segment of the score, adjust the pitches to match the specified indexes for the prime chord and its transposition within the specified range.

See: http://ruccas.org/pub/Gogins/music_atoms.pdf

Definition at line 633 of file Score.cpp.

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

Referenced by csound::VoiceleadingNode::apply().

  {
    if (begin_ < 0) {
      begin_ = 0;
    }
    if (end_ > size()) {
      end_ = size();
    }
    if (begin_ == end_) {
      return;
    }
    System::inform("BEGAN Score::setPT(%d, %d, %f, %f, %f, %f, %d)...\n", begin_, end_, P, T, lowest, range, divisionsPerOctave_);
    std::vector<double> pitchClassSet = Voicelead::pAndTtoPitchClassSet(P, T, divisionsPerOctave_);
    printChord("  pitch-class set:     ", pitchClassSet);
    setPitchClassSet(begin_, end_, pitchClassSet, divisionsPerOctave_);
    std::vector<double> result = getPitches(begin_, end_, divisionsPerOctave_);
    printChord("  result:              ", result);
    std::vector<double> resultTones = Voicelead::uniquePcs(result, divisionsPerOctave_);
    printChord("  as pitch-class set:  ", resultTones);  
    System::inform("ENDED Score::setPT.\n");
  }


Generated by  Doxygen 1.6.0   Back to index