@@ -11,7 +11,7 @@ Features | |||
--------- | |||
* LADSPA, DSSI, LV2 and VST plugin formats | |||
* GIG, SF2 and SFZ sound banks | |||
* SF2/3 and SFZ sound banks | |||
* Internal audio and midi file player | |||
* Automation of plugin parameters via MIDI CC | |||
* Remote control over OSC | |||
@@ -84,17 +84,10 @@ | |||
</property> | |||
</widget> | |||
</item> | |||
<item> | |||
<widget class="QCheckBox" name="ch_gig"> | |||
<property name="text"> | |||
<string>GIG</string> | |||
</property> | |||
</widget> | |||
</item> | |||
<item> | |||
<widget class="QCheckBox" name="ch_sf2"> | |||
<property name="text"> | |||
<string>SF2</string> | |||
<string>SF2/3</string> | |||
</property> | |||
</widget> | |||
</item> | |||
@@ -7,7 +7,7 @@ | |||
<x>0</x> | |||
<y>0</y> | |||
<width>612</width> | |||
<height>507</height> | |||
<height>520</height> | |||
</rect> | |||
</property> | |||
<property name="minimumSize"> | |||
@@ -1167,12 +1167,7 @@ | |||
</item> | |||
<item> | |||
<property name="text"> | |||
<string>GIG</string> | |||
</property> | |||
</item> | |||
<item> | |||
<property name="text"> | |||
<string>SF2</string> | |||
<string>SF2/3</string> | |||
</property> | |||
</item> | |||
<item> | |||
@@ -923,13 +923,8 @@ public: | |||
static CarlaPlugin* newVST2(const Initializer& init); | |||
static CarlaPlugin* newFluidSynth(const Initializer& init, const bool use16Outs); | |||
static CarlaPlugin* newLinuxSampler(const Initializer& init, const char* const format, const bool use16Outs); | |||
static CarlaPlugin* newSFZero(const Initializer& init); | |||
static CarlaPlugin* newFileGIG(const Initializer& init, const bool use16Outs); | |||
static CarlaPlugin* newFileSF2(const Initializer& init, const bool use16Outs); | |||
static CarlaPlugin* newFileSFZ(const Initializer& init); | |||
static CarlaPlugin* newJackApp(const Initializer& init); | |||
#endif | |||
@@ -452,10 +452,7 @@ const char* carla_get_complete_license_text() | |||
// Sample kit libraries | |||
#ifdef HAVE_FLUIDSYNTH | |||
"<li>FluidSynth library for SF2 support</li>" | |||
#endif | |||
#ifdef HAVE_LINUXSAMPLER | |||
"<li>LinuxSampler library for GIG and SFZ support [1]</li>" | |||
"<li>FluidSynth library for SF2/3 support</li>" | |||
#endif | |||
// misc libs | |||
@@ -481,15 +478,7 @@ const char* carla_get_complete_license_text() | |||
#endif // HAVE_EXTERNAL_PLUGINS | |||
// end | |||
"</ul>" | |||
"<p>" | |||
#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 | |||
"</p>" | |||
; | |||
"</ul>"; | |||
} | |||
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 | |||
@@ -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") | |||
@@ -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 |
@@ -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 |
@@ -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 | |||
@@ -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: | |||
@@ -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: | |||
@@ -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: | |||
@@ -2,7 +2,7 @@ | |||
# -*- coding: utf-8 -*- | |||
# Carla Backend utils | |||
# Copyright (C) 2011-2014 Filipe Coelho <falktx@falktx.com> | |||
# Copyright (C) 2011-2018 Filipe Coelho <falktx@falktx.com> | |||
# | |||
# This program is free software; you can redistribute it and/or | |||
# modify it under the terms of the GNU General Public License as | |||
@@ -42,8 +42,6 @@ def getPluginTypeAsString(ptype): | |||
return "LV2" | |||
if ptype == PLUGIN_VST2: | |||
return "VST2" | |||
if ptype == PLUGIN_GIG: | |||
return "GIG" | |||
if ptype == PLUGIN_SF2: | |||
return "SF2" | |||
if ptype == PLUGIN_SFZ: | |||
@@ -72,8 +70,6 @@ def getPluginTypeFromString(stype): | |||
return PLUGIN_LV2 | |||
if stype in ("vst2", "vst"): | |||
return PLUGIN_VST2 | |||
if stype == "gig": | |||
return PLUGIN_GIG | |||
if stype == "sf2": | |||
return PLUGIN_SF2 | |||
if stype == "sfz": | |||
@@ -753,7 +753,7 @@ class PluginEdit(QDialog): | |||
self.ui.ch_send_program_changes.setEnabled(canSendPrograms) | |||
self.ui.ch_send_program_changes.setChecked(self.fPluginInfo['optionsEnabled'] & PLUGIN_OPTION_SEND_PROGRAM_CHANGES) | |||
self.ui.sw_programs.setCurrentIndex(0 if self.fPluginInfo['type'] in (PLUGIN_VST2, PLUGIN_GIG, PLUGIN_SFZ) else 1) | |||
self.ui.sw_programs.setCurrentIndex(0 if self.fPluginInfo['type'] in (PLUGIN_VST2, PLUGIN_SFZ) else 1) | |||
# Show/hide keyboard | |||
showKeyboard = (self.fPluginInfo['category'] == PLUGIN_CATEGORY_SYNTH or midiCountInfo['ins'] > 0 < midiCountInfo['outs']) | |||
@@ -1480,7 +1480,7 @@ class PluginEdit(QDialog): | |||
def _updateCtrlPrograms(self): | |||
self.ui.keyboard.setEnabled(self.fControlChannel >= 0) | |||
if self.fPluginInfo['category'] != PLUGIN_CATEGORY_SYNTH or self.fPluginInfo['type'] not in (PLUGIN_INTERNAL, PLUGIN_SF2, PLUGIN_GIG): | |||
if self.fPluginInfo['category'] != PLUGIN_CATEGORY_SYNTH or self.fPluginInfo['type'] not in (PLUGIN_INTERNAL, PLUGIN_SF2): | |||
return | |||
if self.fControlChannel < 0: | |||
@@ -1,6 +1,6 @@ | |||
/* | |||
* Carla Plugin discovery | |||
* Copyright (C) 2011-2017 Filipe Coelho <falktx@falktx.com> | |||
* Copyright (C) 2011-2018 Filipe Coelho <falktx@falktx.com> | |||
* | |||
* This program is free software; you can redistribute it and/or | |||
* modify it under the terms of the GNU General Public License as | |||
@@ -23,7 +23,6 @@ | |||
#ifdef BUILD_BRIDGE | |||
# undef HAVE_FLUIDSYNTH | |||
# undef HAVE_LINUXSAMPLER | |||
#endif | |||
#include "CarlaLadspaUtils.hpp" | |||
@@ -31,12 +30,6 @@ | |||
#include "CarlaLv2Utils.hpp" | |||
#include "CarlaVstUtils.hpp" | |||
#ifndef BUILD_BRIDGE | |||
// need to include this before linuxsampler | |||
# define CARLA_UTILS_CACHED_PLUGINS_ONLY | |||
# include "CarlaUtils.cpp" | |||
#endif | |||
#ifdef CARLA_OS_MAC | |||
# import <Foundation/Foundation.h> | |||
#endif | |||
@@ -45,15 +38,16 @@ | |||
# include <fluidsynth.h> | |||
#endif | |||
#ifdef HAVE_LINUXSAMPLER | |||
# include "linuxsampler/EngineFactory.h" | |||
#endif | |||
#include <iostream> | |||
#include "water/files/File.h" | |||
#include "water/text/StringArray.h" | |||
#ifndef BUILD_BRIDGE | |||
# define CARLA_UTILS_CACHED_PLUGINS_ONLY | |||
# include "CarlaUtils.cpp" | |||
#endif | |||
#define DISCOVERY_OUT(x, y) std::cout << "\ncarla-discovery::" << x << "::" << y << std::endl; | |||
using water::CharPointer_UTF8; | |||
@@ -273,138 +267,6 @@ static intptr_t VSTCALLBACK vstHostCallback(AEffect* const effect, const int32_t | |||
return ret; | |||
} | |||
#ifdef HAVE_LINUXSAMPLER | |||
// -------------------------------------------------------------------------- | |||
// LinuxSampler stuff | |||
class LinuxSamplerScopedEngine | |||
{ | |||
public: | |||
LinuxSamplerScopedEngine(const char* const filename, const char* const stype) | |||
: fEngine(nullptr) | |||
{ | |||
using namespace LinuxSampler; | |||
try { | |||
fEngine = EngineFactory::Create(stype); | |||
} | |||
catch (const Exception& e) | |||
{ | |||
DISCOVERY_OUT("error", e.what()); | |||
return; | |||
} | |||
if (fEngine == nullptr) | |||
return; | |||
InstrumentManager* const insMan(fEngine->GetInstrumentManager()); | |||
if (insMan == nullptr) | |||
{ | |||
DISCOVERY_OUT("error", "Failed to get LinuxSampler instrument manager"); | |||
return; | |||
} | |||
std::vector<InstrumentManager::instrument_id_t> ids; | |||
try { | |||
ids = insMan->GetInstrumentFileContent(filename); | |||
} | |||
catch (const InstrumentManagerException& e) | |||
{ | |||
DISCOVERY_OUT("error", e.what()); | |||
return; | |||
} | |||
if (ids.size() == 0) | |||
{ | |||
DISCOVERY_OUT("error", "Failed to find any instruments"); | |||
return; | |||
} | |||
InstrumentManager::instrument_info_t info; | |||
try { | |||
info = insMan->GetInstrumentInfo(ids[0]); | |||
} | |||
catch (const InstrumentManagerException& e) | |||
{ | |||
DISCOVERY_OUT("error", e.what()); | |||
return; | |||
} | |||
outputInfo(&info, nullptr, ids.size() > 1); | |||
} | |||
~LinuxSamplerScopedEngine() | |||
{ | |||
if (fEngine != nullptr) | |||
{ | |||
LinuxSampler::EngineFactory::Destroy(fEngine); | |||
fEngine = nullptr; | |||
} | |||
} | |||
static void outputInfo(const LinuxSampler::InstrumentManager::instrument_info_t* const info, const char* const basename, const bool has16Outs) | |||
{ | |||
CarlaString name; | |||
const char* label; | |||
if (info != nullptr) | |||
{ | |||
name = info->InstrumentName.c_str(); | |||
label = info->Product.c_str(); | |||
} | |||
else | |||
{ | |||
name = basename; | |||
label = basename; | |||
} | |||
// 2 channels | |||
DISCOVERY_OUT("init", "-----------"); | |||
DISCOVERY_OUT("build", BINARY_NATIVE); | |||
DISCOVERY_OUT("hints", PLUGIN_IS_SYNTH); | |||
DISCOVERY_OUT("name", name.buffer()); | |||
DISCOVERY_OUT("label", label); | |||
if (info != nullptr) | |||
DISCOVERY_OUT("maker", info->Artists); | |||
DISCOVERY_OUT("audio.outs", 2); | |||
DISCOVERY_OUT("midi.ins", 1); | |||
DISCOVERY_OUT("end", "------------"); | |||
// 16 channels | |||
if (name.isEmpty() || ! has16Outs) | |||
return; | |||
name += " (16 outputs)"; | |||
DISCOVERY_OUT("init", "-----------"); | |||
DISCOVERY_OUT("build", BINARY_NATIVE); | |||
DISCOVERY_OUT("hints", PLUGIN_IS_SYNTH); | |||
DISCOVERY_OUT("name", name.buffer()); | |||
DISCOVERY_OUT("label", label); | |||
if (info != nullptr) | |||
DISCOVERY_OUT("maker", info->Artists); | |||
DISCOVERY_OUT("audio.outs", 32); | |||
DISCOVERY_OUT("midi.ins", 1); | |||
DISCOVERY_OUT("end", "------------"); | |||
} | |||
private: | |||
LinuxSampler::Engine* fEngine; | |||
CARLA_PREVENT_HEAP_ALLOCATION | |||
CARLA_DECLARE_NON_COPY_CLASS(LinuxSamplerScopedEngine) | |||
}; | |||
#endif // HAVE_LINUXSAMPLER | |||
// ------------------------------ Plugin Checks ----------------------------- | |||
#ifndef BUILD_BRIDGE | |||
@@ -1621,11 +1483,6 @@ int main(int argc, char* argv[]) | |||
DISCOVERY_OUT("info", "skipping fluidsynth based plugin"); | |||
return 0; | |||
} | |||
if (filenameCheck.contains("linuxsampler", true) || filenameCheck.endsWith("ls16.so")) | |||
{ | |||
DISCOVERY_OUT("info", "skipping linuxsampler based plugin"); | |||
return 0; | |||
} | |||
#ifdef CARLA_OS_MAC | |||
if (type == PLUGIN_VST2 && (filenameCheck.endsWith(".vst") || filenameCheck.endsWith(".vst/"))) | |||
openLib = false; | |||
@@ -268,7 +268,7 @@ void Reader::read(const char *text, unsigned int length) | |||
{ | |||
buildingRegion->group = static_cast<int>(value.getLargeIntValue()); | |||
} | |||
else if (opcode == "off_by") | |||
else if (opcode == "off_by" || opcode == "offby") | |||
{ | |||
buildingRegion->off_by = value.getLargeIntValue(); | |||
} | |||
@@ -288,7 +288,7 @@ void Reader::read(const char *text, unsigned int length) | |||
buildingRegion->end = end2; | |||
} | |||
} | |||
else if (opcode == "loop_mode") | |||
else if (opcode == "loop_mode" || opcode == "loopmode") | |||
{ | |||
bool modeIsSupported = value == "no_loop" || value == "one_shot" || value == "loop_continuous"; | |||
if (modeIsSupported) | |||
@@ -301,11 +301,11 @@ void Reader::read(const char *text, unsigned int length) | |||
sound_->addUnsupportedOpcode(fauxOpcode); | |||
} | |||
} | |||
else if (opcode == "loop_start") | |||
else if (opcode == "loop_start" || opcode == "loopstart") | |||
{ | |||
buildingRegion->loop_start = value.getLargeIntValue(); | |||
} | |||
else if (opcode == "loop_end") | |||
else if (opcode == "loop_end" || opcode == "loopend") | |||
{ | |||
buildingRegion->loop_end = value.getLargeIntValue(); | |||
} | |||
@@ -325,11 +325,11 @@ void Reader::read(const char *text, unsigned int length) | |||
{ | |||
buildingRegion->pitch_keytrack = value.getIntValue(); | |||
} | |||
else if (opcode == "bend_up") | |||
else if (opcode == "bend_up" || opcode == "bendup") | |||
{ | |||
buildingRegion->bend_up = value.getIntValue(); | |||
} | |||
else if (opcode == "bend_down") | |||
else if (opcode == "bend_down" || opcode == "benddown") | |||
{ | |||
buildingRegion->bend_down = value.getIntValue(); | |||
} | |||
@@ -45,97 +45,6 @@ void Region::clear() | |||
ampeg_veltrack.clearMod(); | |||
} | |||
void Region::clearForSF2() | |||
{ | |||
clear(); | |||
pitch_keycenter = -1; | |||
loop_mode = no_loop; | |||
// SF2 defaults in timecents. | |||
ampeg.delay = -12000.0; | |||
ampeg.attack = -12000.0; | |||
ampeg.hold = -12000.0; | |||
ampeg.decay = -12000.0; | |||
ampeg.sustain = 0.0; | |||
ampeg.release = -12000.0; | |||
} | |||
void Region::clearForRelativeSF2() | |||
{ | |||
clear(); | |||
pitch_keytrack = 0; | |||
amp_veltrack = 0.0; | |||
ampeg.sustain = 0.0; | |||
} | |||
void Region::addForSF2(Region *other) | |||
{ | |||
offset += other->offset; | |||
end += other->end; | |||
loop_start += other->loop_start; | |||
loop_end += other->loop_end; | |||
transpose += other->transpose; | |||
tune += other->tune; | |||
pitch_keytrack += other->pitch_keytrack; | |||
volume += other->volume; | |||
pan += other->pan; | |||
ampeg.delay += other->ampeg.delay; | |||
ampeg.attack += other->ampeg.attack; | |||
ampeg.hold += other->ampeg.hold; | |||
ampeg.decay += other->ampeg.decay; | |||
ampeg.sustain += other->ampeg.sustain; | |||
ampeg.release += other->ampeg.release; | |||
} | |||
void Region::sf2ToSFZ() | |||
{ | |||
// EG times need to be converted from timecents to seconds. | |||
ampeg.delay = timecents2Secs(static_cast<int>(ampeg.delay)); | |||
ampeg.attack = timecents2Secs(static_cast<int>(ampeg.attack)); | |||
ampeg.hold = timecents2Secs(static_cast<int>(ampeg.hold)); | |||
ampeg.decay = timecents2Secs(static_cast<int>(ampeg.decay)); | |||
if (ampeg.sustain < 0.0f) | |||
{ | |||
ampeg.sustain = 0.0f; | |||
} | |||
ampeg.sustain = 100.0f * decibelsToGain(-ampeg.sustain / 10.0f); | |||
ampeg.release = timecents2Secs(static_cast<int>(ampeg.release)); | |||
// Pin very short EG segments. Timecents don't get to zero, and our EG is | |||
// happier with zero values. | |||
if (ampeg.delay < 0.01f) | |||
{ | |||
ampeg.delay = 0.0f; | |||
} | |||
if (ampeg.attack < 0.01f) | |||
{ | |||
ampeg.attack = 0.0f; | |||
} | |||
if (ampeg.hold < 0.01f) | |||
{ | |||
ampeg.hold = 0.0f; | |||
} | |||
if (ampeg.decay < 0.01f) | |||
{ | |||
ampeg.decay = 0.0f; | |||
} | |||
if (ampeg.release < 0.01f) | |||
{ | |||
ampeg.release = 0.0f; | |||
} | |||
// Pin values to their ranges. | |||
if (pan < -100.0f) | |||
{ | |||
pan = -100.0f; | |||
} | |||
else if (pan > 100.0f) | |||
{ | |||
pan = 100.0f; | |||
} | |||
} | |||
water::String Region::dump() | |||
{ | |||
water::String info = water::String::formatted("%d - %d, vel %d - %d", lokey, hikey, lovel, hivel); | |||
@@ -53,10 +53,6 @@ struct Region | |||
Region(); | |||
void clear(); | |||
void clearForSF2(); | |||
void clearForRelativeSF2(); | |||
void addForSF2(Region *other); | |||
void sf2ToSFZ(); | |||
water::String dump(); | |||
bool matches(int note, int velocity, Trigger trig) | |||
@@ -146,6 +146,7 @@ water::String Sound::dump() | |||
info << "no warnings.\n"; | |||
} | |||
#ifdef DEBUG | |||
if (regions_.size() > 0) | |||
{ | |||
info << regions_.size() << " regions: \n"; | |||
@@ -171,6 +172,8 @@ water::String Sound::dump() | |||
{ | |||
info << "no samples.\n"; | |||
} | |||
#endif | |||
return info; | |||
} | |||