Exemplo n.º 1
0
void Att::GetMidi( Object *element, ArrayOfStrAttr *attributes ) {
    if (dynamic_cast<AttChannelized*>(element) ) {
        AttChannelized *att = dynamic_cast<AttChannelized*>(element);
        if (att->HasMidiChannel()) {
            attributes->push_back(std::make_pair("midiChannel", att->StrToStr(att->GetMidiChannel())));
        }
        if (att->HasMidiDuty()) {
            attributes->push_back(std::make_pair("midiDuty", att->StrToStr(att->GetMidiDuty())));
        }
        if (att->HasMidiPort()) {
            attributes->push_back(std::make_pair("midiPort", att->StrToStr(att->GetMidiPort())));
        }
        if (att->HasMidiTrack()) {
            attributes->push_back(std::make_pair("midiTrackInt", att->IntToStr(att->GetMidiTrack())));
        }
    }
    if (dynamic_cast<AttMidiinstrument*>(element) ) {
        AttMidiinstrument *att = dynamic_cast<AttMidiinstrument*>(element);
        if (att->HasMidiInstrnum()) {
            attributes->push_back(std::make_pair("midiInstrnum", att->StrToStr(att->GetMidiInstrnum())));
        }
        if (att->HasMidiInstrname()) {
            attributes->push_back(std::make_pair("midiInstrname", att->StrToStr(att->GetMidiInstrname())));
        }
        if (att->HasMidiPan()) {
            attributes->push_back(std::make_pair("midiPan", att->StrToStr(att->GetMidiPan())));
        }
        if (att->HasMidiVolume()) {
            attributes->push_back(std::make_pair("midiVolume", att->StrToStr(att->GetMidiVolume())));
        }
    }
    if (dynamic_cast<AttMidinumber*>(element) ) {
        AttMidinumber *att = dynamic_cast<AttMidinumber*>(element);
        if (att->HasNum()) {
            attributes->push_back(std::make_pair("numInt", att->IntToStr(att->GetNum())));
        }
    }
    if (dynamic_cast<AttMiditempo*>(element) ) {
        AttMiditempo *att = dynamic_cast<AttMiditempo*>(element);
        if (att->HasMidiTempo()) {
            attributes->push_back(std::make_pair("midiTempo", att->StrToStr(att->GetMidiTempo())));
        }
    }
    if (dynamic_cast<AttMidivalue*>(element) ) {
        AttMidivalue *att = dynamic_cast<AttMidivalue*>(element);
        if (att->HasVal()) {
            attributes->push_back(std::make_pair("val", att->StrToStr(att->GetVal())));
        }
    }
    if (dynamic_cast<AttTimebase*>(element) ) {
        AttTimebase *att = dynamic_cast<AttTimebase*>(element);
        if (att->HasPpq()) {
            attributes->push_back(std::make_pair("ppqInt", att->IntToStr(att->GetPpq())));
        }
    }

}
Exemplo n.º 2
0
void Att::GetMidi( Object *element, ArrayOfStrAttr *attributes ) {
    if (element->HasAttClass( ATT_CHANNELIZED ) ) {
        AttChannelized *att = dynamic_cast<AttChannelized*>(element);
        assert( att );
        if (att->HasMidiChannel()) {
            attributes->push_back(std::make_pair("midiChannel", att->StrToStr(att->GetMidiChannel())));
        }
        if (att->HasMidiDuty()) {
            attributes->push_back(std::make_pair("midiDuty", att->StrToStr(att->GetMidiDuty())));
        }
        if (att->HasMidiPort()) {
            attributes->push_back(std::make_pair("midiPort", att->StrToStr(att->GetMidiPort())));
        }
        if (att->HasMidiTrack()) {
            attributes->push_back(std::make_pair("midiTrackInt", att->IntToStr(att->GetMidiTrack())));
        }
    }
    if (element->HasAttClass( ATT_MIDIINSTRUMENT ) ) {
        AttMidiinstrument *att = dynamic_cast<AttMidiinstrument*>(element);
        assert( att );
        if (att->HasMidiInstrnum()) {
            attributes->push_back(std::make_pair("midiInstrnum", att->StrToStr(att->GetMidiInstrnum())));
        }
        if (att->HasMidiInstrname()) {
            attributes->push_back(std::make_pair("midiInstrname", att->StrToStr(att->GetMidiInstrname())));
        }
        if (att->HasMidiPan()) {
            attributes->push_back(std::make_pair("midiPan", att->StrToStr(att->GetMidiPan())));
        }
        if (att->HasMidiVolume()) {
            attributes->push_back(std::make_pair("midiVolume", att->StrToStr(att->GetMidiVolume())));
        }
    }
    if (element->HasAttClass( ATT_MIDINUMBER ) ) {
        AttMidinumber *att = dynamic_cast<AttMidinumber*>(element);
        assert( att );
        if (att->HasNum()) {
            attributes->push_back(std::make_pair("numInt", att->IntToStr(att->GetNum())));
        }
    }
    if (element->HasAttClass( ATT_MIDITEMPO ) ) {
        AttMiditempo *att = dynamic_cast<AttMiditempo*>(element);
        assert( att );
        if (att->HasMidiTempo()) {
            attributes->push_back(std::make_pair("midiTempo", att->StrToStr(att->GetMidiTempo())));
        }
    }
    if (element->HasAttClass( ATT_MIDIVALUE ) ) {
        AttMidivalue *att = dynamic_cast<AttMidivalue*>(element);
        assert( att );
        if (att->HasVal()) {
            attributes->push_back(std::make_pair("val", att->StrToStr(att->GetVal())));
        }
    }
    if (element->HasAttClass( ATT_TIMEBASE ) ) {
        AttTimebase *att = dynamic_cast<AttTimebase*>(element);
        assert( att );
        if (att->HasPpq()) {
            attributes->push_back(std::make_pair("ppqInt", att->IntToStr(att->GetPpq())));
        }
    }

}