summaryrefslogtreecommitdiff
path: root/voice.hh
blob: b409fa4cd34bccfeb058f9c61c03cbff0d64f316 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#ifndef VOICE_HH
#define VOICE_HH


#include "plist.hh"
#include "request.hh"

/// class for  horizontal stuff.
struct Voice {
    PointerList<Voice_element *> elts;
    Real start;

    /****************/
    Real when(const Voice_element*)const;
    Real last() const;
    Voice();
    void add(Voice_element*);
    void print() const;
};
/**

    Voice is a ordered row of Voice_elements. It is strictly horizontal:
    you cannot have two rhythmic elements running parallel in a Voice

    */

struct Voicegroup {
    /// don't know how to identify these.
};

/// one horizontal bit. 
struct Voice_element {
    Real duration;
    const Voicegroup *group;
    const Voice *voice;
    PointerList<Request*> reqs;

    List<const Item *> granted_items;
    List<const Spanner *> granted_spanners;

    /****************/
    
    void add(Request*);
    Voice_element();

    void print ()const;
};
/** Apart from being a container for the requests, Voice_element is
    glue between related items and spanners, between requests and
    (voice)groups
    */
#endif