" -#ifdef HAVE_LINUXSAMPLER - // LinuxSampler GPL exception - " [1] Using LinuxSampler code in commercial hardware or software products is not allowed without prior written authorization by the authors." -#endif - "
" - ; + ""; } return retText; @@ -504,12 +493,9 @@ const char* const* carla_get_supported_file_extensions() // Base types "carxp", "carxs", - // Compatibility mode with older carla, loads linuxsampler as plugin - "gig", - // plugin files and resources #ifdef HAVE_FLUIDSYNTH - "sf2", + "sf2", "sf3", #endif #ifdef HAVE_ZYN_DEPS "xmz", "xiz", @@ -564,9 +550,6 @@ const char* const* carla_get_supported_features() #if defined(HAVE_LIBMAGIC) || defined(CARLA_OS_WIN) "bridges", #endif -#ifdef HAVE_LINUXSAMPLER - "gig", "sfz", -#endif #ifdef HAVE_PYQT "gui", #endif diff --git a/source/backend/engine/CarlaEngine.cpp b/source/backend/engine/CarlaEngine.cpp index 9ec2c5303..469dd732f 100644 --- a/source/backend/engine/CarlaEngine.cpp +++ b/source/backend/engine/CarlaEngine.cpp @@ -520,11 +520,11 @@ bool CarlaEngine::addPlugin(const BinaryType btype, const PluginType ptype, case PLUGIN_SF2: use16Outs = (extra != nullptr && std::strcmp((const char*)extra, "true") == 0); - plugin = CarlaPlugin::newFileSF2(initializer, use16Outs); + plugin = CarlaPlugin::newFluidSynth(initializer, use16Outs); break; case PLUGIN_SFZ: - plugin = CarlaPlugin::newFileSFZ(initializer); + plugin = CarlaPlugin::newSFZero(initializer); break; case PLUGIN_JACK: @@ -992,7 +992,7 @@ bool CarlaEngine::loadFile(const char* const filename) // ------------------------------------------------------------------- - if (extension == "sf2") + if (extension == "sf2" || extension == "sf3") return addPlugin(PLUGIN_SF2, filename, baseName, baseName, 0, nullptr); if (extension == "sfz") diff --git a/source/backend/plugin/CarlaPluginFluidSynth.cpp b/source/backend/plugin/CarlaPluginFluidSynth.cpp index fe95c1a57..48bbbfb24 100644 --- a/source/backend/plugin/CarlaPluginFluidSynth.cpp +++ b/source/backend/plugin/CarlaPluginFluidSynth.cpp @@ -1766,20 +1766,6 @@ CarlaPlugin* CarlaPlugin::newFluidSynth(const Initializer& init, const bool use1 #endif } -CarlaPlugin* CarlaPlugin::newFileSF2(const Initializer& init, const bool use16Outs) -{ - carla_debug("CarlaPlugin::newFileSF2({%p, \"%s\", \"%s\", \"%s\"}, %s)", init.engine, init.filename, init.name, init.label, bool2str(use16Outs)); -#ifdef HAVE_FLUIDSYNTH - return newFluidSynth(init, use16Outs); -#else - init.engine->setLastError("SF2 support not available"); - return nullptr; - - // unused - (void)use16Outs; -#endif -} - // ------------------------------------------------------------------------------------------------------------------- CARLA_BACKEND_END_NAMESPACE diff --git a/source/backend/plugin/CarlaPluginSFZero.cpp b/source/backend/plugin/CarlaPluginSFZero.cpp index deaeb8036..cdb696c2f 100644 --- a/source/backend/plugin/CarlaPluginSFZero.cpp +++ b/source/backend/plugin/CarlaPluginSFZero.cpp @@ -703,6 +703,10 @@ public: return false; } + const String dump = sound->dump(); + carla_stdout("SFZero sound information:"); + std::puts(dump.toRawUTF8()); + // --------------------------------------------------------------- const String basename(File(filename).getFileNameWithoutExtension()); @@ -763,7 +767,7 @@ private: CarlaPlugin* CarlaPlugin::newSFZero(const Initializer& init) { - carla_debug("CarlaPluginSFZero::newLinuxSampler({%p, \"%s\", \"%s\", \"%s\", " P_INT64 "})", + carla_debug("CarlaPluginSFZero::newSFZero({%p, \"%s\", \"%s\", \"%s\", " P_INT64 "})", init.engine, init.filename, init.name, init.label, init.uniqueId); // ------------------------------------------------------------------- @@ -786,11 +790,6 @@ CarlaPlugin* CarlaPlugin::newSFZero(const Initializer& init) return plugin; } -CarlaPlugin* CarlaPlugin::newFileSFZ(const Initializer& init) -{ - return newSFZero(init); -} - // ------------------------------------------------------------------------------------------------------------------- CARLA_BACKEND_END_NAMESPACE diff --git a/source/carla_backend.pro b/source/carla_backend.pro index 8459a4bc3..dfd3dc4a8 100644 --- a/source/carla_backend.pro +++ b/source/carla_backend.pro @@ -53,7 +53,6 @@ SOURCES = \ backend/plugin/CarlaPluginInternal.cpp \ backend/plugin/CarlaPluginJuce.cpp \ backend/plugin/CarlaPluginLADSPA.cpp \ - backend/plugin/CarlaPluginLinuxSampler.cpp \ backend/plugin/CarlaPluginLV2.cpp \ backend/plugin/CarlaPluginNative.cpp \ backend/plugin/CarlaPluginVST2.cpp diff --git a/source/carla_database.py b/source/carla_database.py index 43645b27f..c493953fd 100755 --- a/source/carla_database.py +++ b/source/carla_database.py @@ -112,10 +112,8 @@ def findMacVSTBundles(bundlePath): def findFilenames(filePath, stype): filenames = [] - if stype == "gig": - extensions = (".gig",) - elif stype == "sf2": - extensions = (".sf2",) + if stype == "sf2": + extensions = (".sf2",".sf3",) elif stype == "sfz": extensions = (".sfz",) else: @@ -345,9 +343,6 @@ def checkPluginLV2(filename, tool, wineSettings=None): def checkPluginVST2(filename, tool, wineSettings=None): return runCarlaDiscovery(PLUGIN_VST2, "VST2", filename, tool, wineSettings) -def checkFileGIG(filename, tool): - return runCarlaDiscovery(PLUGIN_GIG, "GIG", filename, tool) - def checkFileSF2(filename, tool): return runCarlaDiscovery(PLUGIN_SF2, "SF2", filename, tool) @@ -376,8 +371,6 @@ class SearchPluginsThread(QThread): self.fCheckDSSI = False self.fCheckLV2 = False self.fCheckVST2 = False - self.fCheckAU = False - self.fCheckGIG = False self.fCheckSF2 = False self.fCheckSFZ = False @@ -425,12 +418,11 @@ class SearchPluginsThread(QThread): self.fCheckWin32 = win32 self.fCheckWin64 = win64 - def setSearchPluginTypes(self, ladspa, dssi, lv2, vst2, gig, sf2, sfz): + def setSearchPluginTypes(self, ladspa, dssi, lv2, vst2, sf2, sfz): self.fCheckLADSPA = ladspa self.fCheckDSSI = dssi self.fCheckLV2 = lv2 self.fCheckVST2 = vst2 - self.fCheckGIG = gig self.fCheckSF2 = sf2 self.fCheckSFZ = sfz @@ -483,11 +475,9 @@ class SearchPluginsThread(QThread): # Special case for Sound Kits, only search native if self.fCheckNative and self.fToolNative: - if self.fCheckGIG: self.fCurCount += 1 if self.fCheckSF2: self.fCurCount += 1 if self.fCheckSFZ: self.fCurCount += 1 else: - self.fCheckGIG = False self.fCheckSF2 = False self.fCheckSFZ = False @@ -630,15 +620,6 @@ class SearchPluginsThread(QThread): settingsDB.sync() if not self.fContinueChecking: return - if self.fCheckGIG: - settings = QSettings("falkTX", "Carla2") - GIG_PATH = toList(settings.value(CARLA_KEY_PATHS_GIG, CARLA_DEFAULT_GIG_PATH)) - del settings - - self._checkKIT(GIG_PATH, "gig") - settingsDB.setValue("Plugins/GIG", self.fKitPlugins) - if not self.fContinueChecking: return - if self.fCheckSF2: settings = QSettings("falkTX", "Carla2") SF2_PATH = toList(settings.value(CARLA_KEY_PATHS_SF2, CARLA_DEFAULT_SF2_PATH)) @@ -782,9 +763,7 @@ class SearchPluginsThread(QThread): percent = ( float(i) / len(kitFiles) ) * self.fCurPercentValue self._pluginLook(self.fLastCheckValue + percent, kit) - if kitExtension == "gig": - plugins = checkFileGIG(kit, self.fToolNative) - elif kitExtension == "sf2": + if kitExtension == "sf2": plugins = checkFileSF2(kit, self.fToolNative) elif kitExtension == "sfz": plugins = checkFileSFZ(kit, self.fToolNative) @@ -941,7 +920,6 @@ class PluginRefreshW(QDialog): else: self.ui.ico_native.setPixmap(self.fIconNo) self.ui.ch_native.setEnabled(False) - self.ui.ch_gig.setEnabled(False) self.ui.ch_sf2.setEnabled(False) self.ui.ch_sfz.setEnabled(False) if not hasNonNative: @@ -998,18 +976,10 @@ class PluginRefreshW(QDialog): # Disable non-supported features features = gCarla.utils.get_supported_features() - if "gig" not in features: - self.ui.ch_gig.setChecked(False) - self.ui.ch_gig.setEnabled(False) - if "sf2" not in features: self.ui.ch_sf2.setChecked(False) self.ui.ch_sf2.setEnabled(False) - if "sfz" not in features: - self.ui.ch_sfz.setChecked(False) - self.ui.ch_sfz.setEnabled(False) - # ------------------------------------------------------------------------------------------------------------- # Resize to minimum size, as it's very likely UI stuff was hidden @@ -1030,7 +1000,6 @@ class PluginRefreshW(QDialog): self.ui.ch_dssi.clicked.connect(self.slot_checkTools) self.ui.ch_lv2.clicked.connect(self.slot_checkTools) self.ui.ch_vst.clicked.connect(self.slot_checkTools) - self.ui.ch_gig.clicked.connect(self.slot_checkTools) self.ui.ch_sf2.clicked.connect(self.slot_checkTools) self.ui.ch_sfz.clicked.connect(self.slot_checkTools) self.fThread.pluginLook.connect(self.slot_handlePluginLook) @@ -1058,9 +1027,6 @@ class PluginRefreshW(QDialog): check = settings.value("PluginDatabase/SearchVST2", True, type=bool) and self.ui.ch_vst.isEnabled() self.ui.ch_vst.setChecked(check) - check = settings.value("PluginDatabase/SearchGIG", False, type=bool) and self.ui.ch_gig.isEnabled() - self.ui.ch_gig.setChecked(check) - check = settings.value("PluginDatabase/SearchSF2", False, type=bool) and self.ui.ch_sf2.isEnabled() self.ui.ch_sf2.setChecked(check) @@ -1093,7 +1059,6 @@ class PluginRefreshW(QDialog): settings.setValue("PluginDatabase/SearchDSSI", self.ui.ch_dssi.isChecked()) settings.setValue("PluginDatabase/SearchLV2", self.ui.ch_lv2.isChecked()) settings.setValue("PluginDatabase/SearchVST2", self.ui.ch_vst.isChecked()) - settings.setValue("PluginDatabase/SearchGIG", self.ui.ch_gig.isChecked()) settings.setValue("PluginDatabase/SearchSF2", self.ui.ch_sf2.isChecked()) settings.setValue("PluginDatabase/SearchSFZ", self.ui.ch_sfz.isChecked()) settings.setValue("PluginDatabase/SearchNative", self.ui.ch_native.isChecked()) @@ -1125,13 +1090,12 @@ class PluginRefreshW(QDialog): self.ui.ch_posix32.isChecked(), self.ui.ch_posix64.isChecked(), self.ui.ch_win32.isChecked(), self.ui.ch_win64.isChecked()) - ladspa, dssi, lv2, vst, gig, sf2, sfz = (self.ui.ch_ladspa.isChecked(), self.ui.ch_dssi.isChecked(), - self.ui.ch_lv2.isChecked(), self.ui.ch_vst.isChecked(), - self.ui.ch_gig.isChecked(), self.ui.ch_sf2.isChecked(), - self.ui.ch_sfz.isChecked()) + ladspa, dssi, lv2, vst, sf2, sfz = (self.ui.ch_ladspa.isChecked(), self.ui.ch_dssi.isChecked(), + self.ui.ch_lv2.isChecked(), self.ui.ch_vst.isChecked(), + self.ui.ch_sf2.isChecked(), self.ui.ch_sfz.isChecked()) self.fThread.setSearchBinaryTypes(native, posix32, posix64, win32, win64) - self.fThread.setSearchPluginTypes(ladspa, dssi, lv2, vst, gig, sf2, sfz) + self.fThread.setSearchPluginTypes(ladspa, dssi, lv2, vst, sf2, sfz) self.fThread.start() # ------------------------------------------------------------------------------------------------------------------ @@ -1150,7 +1114,7 @@ class PluginRefreshW(QDialog): enabled2 = bool(self.ui.ch_ladspa.isChecked() or self.ui.ch_dssi.isChecked() or self.ui.ch_lv2.isChecked() or self.ui.ch_vst.isChecked() or - self.ui.ch_gig.isChecked() or self.ui.ch_sf2.isChecked() or self.ui.ch_sfz.isChecked()) + self.ui.ch_sf2.isChecked() or self.ui.ch_sfz.isChecked()) self.ui.b_start.setEnabled(enabled1 and enabled2) @@ -1428,7 +1392,7 @@ class PluginDatabaseW(QDialog): isSynth = bool(plugin['hints'] & PLUGIN_IS_SYNTH) isEffect = bool(aIns > 0 < aOuts and not isSynth) isMidi = bool(aIns == 0 and aOuts == 0 and mIns > 0 < mOuts) - isKit = bool(ptype in ("GIG", "SF2", "SFZ")) + isKit = bool(ptype in ("SF2", "SFZ")) isOther = bool(not (isEffect or isSynth or isMidi or isKit)) isNative = bool(plugin['build'] == BINARY_NATIVE) isRtSafe = bool(plugin['hints'] & PLUGIN_IS_RTSAFE) @@ -1490,7 +1454,7 @@ class PluginDatabaseW(QDialog): if plugin['API'] != PLUGIN_QUERY_API_VERSION and ptype == self.tr("Internal"): return - if ptype in (self.tr("Internal"), "LV2", "GIG", "SF2", "SFZ"): + if ptype in (self.tr("Internal"), "LV2", "SF2", "SFZ"): plugin['build'] = BINARY_NATIVE index = self.fLastTableIndex @@ -1678,17 +1642,6 @@ class PluginDatabaseW(QDialog): # ---------------------------------------------------------------------------------------------------- # Kits - gigs = toList(settingsDB.value("Plugins/GIG", [])) - - for gig in gigs: - for gig_i in gig: - self._addPluginToTable(gig_i, "GIG") - kitCount += 1 - - del gigs - - # ---------------------------------------------------------------------------------------------------- - sf2s = toList(settingsDB.value("Plugins/SF2", [])) for sf2 in sf2s: diff --git a/source/carla_settings.py b/source/carla_settings.py index e29925fb3..f233721b4 100755 --- a/source/carla_settings.py +++ b/source/carla_settings.py @@ -200,9 +200,8 @@ class CarlaSettingsW(QDialog): PATH_INDEX_DSSI = 1 PATH_INDEX_LV2 = 2 PATH_INDEX_VST2 = 3 - PATH_INDEX_GIG = 4 - PATH_INDEX_SF2 = 5 - PATH_INDEX_SFZ = 6 + PATH_INDEX_SF2 = 4 + PATH_INDEX_SFZ = 5 # Single and Multiple client mode is only for JACK, # but we still want to match QComboBox index to backend defines, @@ -322,7 +321,6 @@ class CarlaSettingsW(QDialog): self.ui.lw_dssi.currentRowChanged.connect(self.slot_pluginPathRowChanged) self.ui.lw_lv2.currentRowChanged.connect(self.slot_pluginPathRowChanged) self.ui.lw_vst.currentRowChanged.connect(self.slot_pluginPathRowChanged) - self.ui.lw_gig.currentRowChanged.connect(self.slot_pluginPathRowChanged) self.ui.lw_sf2.currentRowChanged.connect(self.slot_pluginPathRowChanged) self.ui.lw_sfz.currentRowChanged.connect(self.slot_pluginPathRowChanged) @@ -340,7 +338,6 @@ class CarlaSettingsW(QDialog): self.ui.lw_dssi.setCurrentRow(0) self.ui.lw_lv2.setCurrentRow(0) self.ui.lw_vst.setCurrentRow(0) - self.ui.lw_gig.setCurrentRow(0) self.ui.lw_sf2.setCurrentRow(0) self.ui.lw_sfz.setCurrentRow(0) @@ -447,7 +444,6 @@ class CarlaSettingsW(QDialog): dssis = toList(settings.value(CARLA_KEY_PATHS_DSSI, CARLA_DEFAULT_DSSI_PATH)) lv2s = toList(settings.value(CARLA_KEY_PATHS_LV2, CARLA_DEFAULT_LV2_PATH)) vst2s = toList(settings.value(CARLA_KEY_PATHS_VST2, CARLA_DEFAULT_VST2_PATH)) - gigs = toList(settings.value(CARLA_KEY_PATHS_GIG, CARLA_DEFAULT_GIG_PATH)) sf2s = toList(settings.value(CARLA_KEY_PATHS_SF2, CARLA_DEFAULT_SF2_PATH)) sfzs = toList(settings.value(CARLA_KEY_PATHS_SFZ, CARLA_DEFAULT_SFZ_PATH)) @@ -455,7 +451,6 @@ class CarlaSettingsW(QDialog): dssis.sort() lv2s.sort() vst2s.sort() - gigs.sort() sf2s.sort() sfzs.sort() @@ -475,10 +470,6 @@ class CarlaSettingsW(QDialog): if not vst2: continue self.ui.lw_vst.addItem(vst2) - for gig in gigs: - if not gig: continue - self.ui.lw_gig.addItem(gig) - for sf2 in sf2s: if not sf2: continue self.ui.lw_sf2.addItem(sf2) @@ -627,7 +618,6 @@ class CarlaSettingsW(QDialog): dssis = [] lv2s = [] vst2s = [] - gigs = [] sf2s = [] sfzs = [] @@ -643,9 +633,6 @@ class CarlaSettingsW(QDialog): for i in range(self.ui.lw_vst.count()): vst2s.append(self.ui.lw_vst.item(i).text()) - for i in range(self.ui.lw_gig.count()): - gigs.append(self.ui.lw_gig.item(i).text()) - for i in range(self.ui.lw_sf2.count()): sf2s.append(self.ui.lw_sf2.item(i).text()) @@ -656,7 +643,6 @@ class CarlaSettingsW(QDialog): self.host.set_engine_option(ENGINE_OPTION_PLUGIN_PATH, PLUGIN_DSSI, splitter.join(dssis)) self.host.set_engine_option(ENGINE_OPTION_PLUGIN_PATH, PLUGIN_LV2, splitter.join(lv2s)) self.host.set_engine_option(ENGINE_OPTION_PLUGIN_PATH, PLUGIN_VST2, splitter.join(vst2s)) - self.host.set_engine_option(ENGINE_OPTION_PLUGIN_PATH, PLUGIN_GIG, splitter.join(gigs)) self.host.set_engine_option(ENGINE_OPTION_PLUGIN_PATH, PLUGIN_SF2, splitter.join(sf2s)) self.host.set_engine_option(ENGINE_OPTION_PLUGIN_PATH, PLUGIN_SFZ, splitter.join(sfzs)) @@ -664,7 +650,6 @@ class CarlaSettingsW(QDialog): settings.setValue(CARLA_KEY_PATHS_DSSI, dssis) settings.setValue(CARLA_KEY_PATHS_LV2, lv2s) settings.setValue(CARLA_KEY_PATHS_VST2, vst2s) - settings.setValue(CARLA_KEY_PATHS_GIG, gigs) settings.setValue(CARLA_KEY_PATHS_SF2, sf2s) settings.setValue(CARLA_KEY_PATHS_SFZ, sfzs) @@ -776,15 +761,6 @@ class CarlaSettingsW(QDialog): if not path: continue self.ui.lw_vst.addItem(path) - elif curIndex == self.PATH_INDEX_GIG: - paths = CARLA_DEFAULT_GIG_PATH - paths.sort() - self.ui.lw_gig.clear() - - for path in paths: - if not path: continue - self.ui.lw_gig.addItem(path) - elif curIndex == self.PATH_INDEX_SF2: paths = CARLA_DEFAULT_SF2_PATH paths.sort() @@ -920,8 +896,6 @@ class CarlaSettingsW(QDialog): self.ui.lw_lv2.addItem(newPath) elif curIndex == self.PATH_INDEX_VST2: self.ui.lw_vst.addItem(newPath) - elif curIndex == self.PATH_INDEX_GIG: - self.ui.lw_gig.addItem(newPath) elif curIndex == self.PATH_INDEX_SF2: self.ui.lw_sf2.addItem(newPath) elif curIndex == self.PATH_INDEX_SFZ: @@ -939,8 +913,6 @@ class CarlaSettingsW(QDialog): self.ui.lw_lv2.takeItem(self.ui.lw_lv2.currentRow()) elif curIndex == self.PATH_INDEX_VST2: self.ui.lw_vst.takeItem(self.ui.lw_vst.currentRow()) - elif curIndex == self.PATH_INDEX_GIG: - self.ui.lw_gig.takeItem(self.ui.lw_gig.currentRow()) elif curIndex == self.PATH_INDEX_SF2: self.ui.lw_sf2.takeItem(self.ui.lw_sf2.currentRow()) elif curIndex == self.PATH_INDEX_SFZ: @@ -958,8 +930,6 @@ class CarlaSettingsW(QDialog): currentPath = self.ui.lw_lv2.currentItem().text() elif curIndex == self.PATH_INDEX_VST2: currentPath = self.ui.lw_vst.currentItem().text() - elif curIndex == self.PATH_INDEX_GIG: - currentPath = self.ui.lw_gig.currentItem().text() elif curIndex == self.PATH_INDEX_SF2: currentPath = self.ui.lw_sf2.currentItem().text() elif curIndex == self.PATH_INDEX_SFZ: @@ -980,8 +950,6 @@ class CarlaSettingsW(QDialog): self.ui.lw_lv2.currentItem().setText(newPath) elif curIndex == self.PATH_INDEX_VST2: self.ui.lw_vst.currentItem().setText(newPath) - elif curIndex == self.PATH_INDEX_GIG: - self.ui.lw_gig.currentItem().setText(newPath) elif curIndex == self.PATH_INDEX_SF2: self.ui.lw_sf2.currentItem().setText(newPath) elif curIndex == self.PATH_INDEX_SFZ: @@ -999,8 +967,6 @@ class CarlaSettingsW(QDialog): row = self.ui.lw_lv2.currentRow() elif index == self.PATH_INDEX_VST2: row = self.ui.lw_vst.currentRow() - elif index == self.PATH_INDEX_GIG: - row = self.ui.lw_gig.currentRow() elif index == self.PATH_INDEX_SF2: row = self.ui.lw_sf2.currentRow() elif index == self.PATH_INDEX_SFZ: diff --git a/source/carla_skin.py b/source/carla_skin.py index 8c59a4c3b..98891e4a3 100755 --- a/source/carla_skin.py +++ b/source/carla_skin.py @@ -1848,8 +1848,6 @@ def getSkinStyle(host, pluginId): progCount = host.get_midi_program_count(pluginId) # Samplers - if pluginInfo['type'] == PLUGIN_GIG: - return "gig" if pluginInfo['type'] == PLUGIN_SF2: return "sf2" if pluginInfo['type'] == PLUGIN_SFZ: diff --git a/source/carla_utils.py b/source/carla_utils.py index 4412585da..047f16d0a 100644 --- a/source/carla_utils.py +++ b/source/carla_utils.py @@ -2,7 +2,7 @@ # -*- coding: utf-8 -*- # Carla Backend utils -# Copyright (C) 2011-2014 Filipe Coelho