void MuseScore::oscAction() { PathObject* pathObject = qobject_cast<PathObject*>(sender()); QString path = pathObject->path().mid(9); QAction* a = getAction(path.toLocal8Bit().data()); a->trigger(); }
void MuseScore::oscMuteChannel(double val) { if(!cs) return; PathObject* po = (PathObject*) sender(); int i = po->path().mid(5).toInt() - 1; QList<MidiMapping>* mms = cs->midiMapping(); if( i >= 0 && i < mms->size()) { MidiMapping mm = mms->at(i); Channel* channel = mm.articulation; channel->mute = (val==0.0f ? false : true); if (mixer) mixer->partEdit(i)->mute->setCheckState(val==0.0f ? Qt::Unchecked:Qt::Checked); } }
void MuseScore::oscPanChannel(double val) { if(!cs) return; PathObject* po = (PathObject*) sender(); int i = po->path().mid(4).toInt() - 1; QList<MidiMapping>* mms = cs->midiMapping(); if( i >= 0 && i < mms->size()) { MidiMapping mm = mms->at(i); Channel* channel = mm.articulation; int iv = lrint((val + 1) * 64); seq->setController(channel->channel, CTRL_PANPOT, iv); channel->volume = iv; if (mixer) mixer->partEdit(i)->pan->setValue(iv); } }
void MuseScore::oscVolChannel(double val) { if(!cs) return; PathObject* po = (PathObject*) sender(); int i = po->path().mid(4).toInt() - 1; QList<MidiMapping>* mms = cs->midiMapping(); if( i >= 0 && i < mms->size()) { MidiMapping mm = mms->at(i); Channel* channel = mm.articulation; int iv = lrint(val*127); seq->setController(channel->channel, CTRL_VOLUME, iv); channel->volume = iv; if (iledit) iledit->partEdit(i)->volume->setValue(iv); } }