Exemplo n.º 1
0
void NotePool::upgradeToLegato(void)
{
    for(auto &d:activeDesc())
        if(d.playing())
            for(auto &s:activeNotes(d))
                insertLegatoNote(d.note, d.sendto, s);
}
Exemplo n.º 2
0
void NotePool::upgradeToLegato(void)
{
    for(auto &d:activeDesc())
        if(d.status == Part::KEY_PLAYING)
            for(auto &s:activeNotes(d))
                insertLegatoNote(d.note, d.sendto, s);
}
Exemplo n.º 3
0
//There should only be one pair of notes which are still playing
void NotePool::applyLegato(LegatoParams &par)
{
    for(auto &desc:activeDesc()) {
        desc.note = par.midinote;
        for(auto &synth:activeNotes(desc))
            synth.note->legatonote(par);
    }
};
Exemplo n.º 4
0
void NotePool::releasePlayingNotes(void)
{
    for(auto &d:activeDesc()) {
        if(d.playing()) {
            d.setStatus(KEY_RELEASED);
            for(auto s:activeNotes(d))
                s.note->releasekey();
        }
    }
}
Exemplo n.º 5
0
void NotePool::releasePlayingNotes(void)
{
    for(auto &d:activeDesc()) {
        if(d.status == Part::KEY_PLAYING) {
            d.status = Part::KEY_RELEASED;
            for(auto s:activeNotes(d))
                s.note->releasekey();
        }
    }
}
Exemplo n.º 6
0
//There should only be one pair of notes which are still playing
void NotePool::applyLegato(LegatoParams &par)
{
    for(auto &desc:activeDesc()) {
        desc.note = par.midinote;
        for(auto &synth:activeNotes(desc))
            try {
                synth.note->legatonote(par);
            } catch (std::bad_alloc& ba) {
                std::cerr << "failed to create legato note: " << ba.what() << std::endl;
            }
    }
}
Exemplo n.º 7
0
void NotePool::dump(void)
{
    printf("NotePool::dump<\n");
    const char *format =
        "    Note %d:%d age(%d) note(%d) sendto(%d) status(%s) legato(%d) type(%d) kit(%d) ptr(%p)\n";
    int note_id=0;
    int descriptor_id=0;
    for(auto &d:activeDesc()) {
        descriptor_id += 1;
        for(auto &s:activeNotes(d)) {
            note_id += 1;
            printf(format,
                    note_id, descriptor_id,
                    d.age, d.note, d.sendto,
                    getStatus(d.status), d.legatoMirror, s.type, s.kit, s.note);
        }
    }
    printf(">NotePool::dump\n");
}
Exemplo n.º 8
0
void NotePool::entomb(NoteDescriptor &d)
{
    d.setStatus(KEY_RELEASED);
    for(auto &s:activeNotes(d))
        s.note->entomb();
}
Exemplo n.º 9
0
void NotePool::kill(NoteDescriptor &d)
{
    d.setStatus(KEY_OFF);
    for(auto &s:activeNotes(d))
        kill(s);
}
Exemplo n.º 10
0
void NotePool::release(NoteDescriptor &d)
{
    d.setStatus(KEY_RELEASED);
    for(auto s:activeNotes(d))
        s.note->releasekey();
}
Exemplo n.º 11
0
void NotePool::kill(NoteDescriptor &d)
{
    d.status = Part::KEY_OFF;
    for(auto &s:activeNotes(d))
        kill(s);
}
Exemplo n.º 12
0
void NotePool::release(NoteDescriptor &d)
{
    d.status = Part::KEY_RELEASED;
    for(auto s:activeNotes(d))
        s.note->releasekey();
}