void MasterSynthesizer::setSampleRate(float val) { _sampleRate = val; for (Synthesizer* s : _synthesizer) { s->init(_sampleRate); connect(s->gui(), SIGNAL(sfChanged()), SLOT(sfChanged())); } for (Effect* e : _effectList[0]) e->init(_sampleRate); for (Effect* e : _effectList[1]) e->init(_sampleRate); lock2 = false; lock1 = false; }
void ZerberusGui::moveSoundfontInTheList(int currentIdx, int targetIdx) { QStringList sfonts = zerberus()->soundFonts(); sfonts.swap(currentIdx, targetIdx); zerberus()->removeSoundFonts(zerberus()->soundFonts()); loadSoundFontsAsync(sfonts); files->setCurrentRow(targetIdx); emit sfChanged(); }
void ZerberusGui::soundFontUpClicked() { int row = files->currentRow(); if (row <= 0) return; QStringList sfonts = zerberus()->soundFonts(); sfonts.swap(row, row-1); zerberus()->removeSoundFonts(zerberus()->soundFonts()); loadSoundFontsAsync(sfonts); files->setCurrentRow(row-1); emit sfChanged(); }
void FluidGui::soundFontAddClicked() { QFileInfoList l = FluidS::Fluid::sfFiles(); SfListDialog ld; foreach (const QFileInfo& fi, l) ld.add(fi.fileName(), fi.absoluteFilePath()); if (!ld.exec()) return; QString sfName = ld.name(); QString sfPath = ld.path(); int n = soundFonts->count(); QStringList sl; for (int i = 0; i < n; ++i) { QListWidgetItem* item = soundFonts->item(i); sl.append(item->text()); } if (sl.contains(sfPath)) { QMessageBox::warning(this, tr("MuseScore"), QString(tr("Soundfont %1 already loaded")).arg(sfPath)); } else { bool loaded = fluid()->addSoundFont(sfPath); if (!loaded) { QMessageBox::warning(this, tr("MuseScore"), QString(tr("cannot load soundfont %1")).arg(sfPath)); } else { soundFonts->insertItem(0, sfName); emit sfChanged(); emit valueChanged(); } } updateUpDownButtons(); }