2 pulk-voices.cc -- implement Pulk_voice
4 source file of the GNU LilyPond music typesetter
6 (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
8 #include "pulk-voice.hh"
10 #include "musical-request.hh"
11 #include "voice-element.hh"
13 Pulk_voice::Pulk_voice(Voice*voice_l, int idx)
14 : cur_(voice_l->elts_)
16 elt_mom_ = voice_l->start_;
22 Pulk_voice::get_req_l_arr()
24 Array<Request*> req_l_arr;
27 Moment sub = subtle_moment_priorities_[subtle_idx_];
28 for (PCursor<Request*> i(cur_->req_p_list_); i.ok(); i++) {
29 Musical_req* m_l = i->musical();
31 if (!(m_l && m_l->subtle() && m_l->subtle()->subtime_ ))
34 if (m_l && m_l->subtle() && m_l->subtle()->subtime_ == sub)
39 } while ( ok() && when () == w);
44 Pulk_voice::set_subtle()
48 subtle_moment_priorities_.set_size(0);
51 for (PCursor<Request*> i(cur_->req_p_list_); i.ok(); i++) {
52 Musical_req* m_l = i->musical();
53 if (m_l&&m_l->subtle()){
54 Moment sub = m_l->subtle()->subtime_;
55 subtle_moment_priorities_.insert(sub);
57 subtle_moment_priorities_.insert(0);
67 if (subtle_idx_ == subtle_moment_priorities_.size()) {
68 elt_mom_ += cur_->duration_;
75 Pulk_voice::when()const
77 return elt_mom_ + subtle_moment_priorities_[subtle_idx_];