Logo Search packages:      
Sourcecode: csound version File versions

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

Set the pitches of the specified segment of the score to the specified pitch-class set. Each pitch in the score is moved to the closest pitch-class in the specified set.

Definition at line 547 of file Score.cpp.

References csound::Voicelead::conformToPitchClassSet().

Referenced by csound::VoiceleadingNode::apply(), setPT(), and voicelead().

  {
    if (begin_ < 0) {
      begin_ = 0;
    }
    if (end_ > size()) {
      end_ = size();
    }
    if (begin_ == end_) {
      return;
    }
    for (size_t i = begin_; i < end_; i++) {
      Event &event = (*this)[i];
      event.setKey(Voicelead::conformToPitchClassSet(event.getKey(), pcs, divisionsPerOctave_));
    }
  }


Generated by  Doxygen 1.6.0   Back to index