On 21/02/2019 17:23, Christian Schoenebeck wrote:
I can't say. I just googled "gx99 file" and I see various independent source
that this file was about "GigaPulse settings". One of them is a PDF from
Tascam, quote:
"If convolution encoded instrument is copied onto a GS3 system
without
its associated .gx99 file, a “No Banks Found” error message
will
be displayed upon loading the instrument. Always be sure to keep
.gx99 files together with their .gig files."
Yeah, there is very little information on them. I'll try creating some
gig libraries which result in a .gx99 file being created using the GSt3
editor to see what different outputs I get. I don't know how to create
instruments from scratch yet though, so I have a bit of studying to do!
I've attached a patch containing a few small corrections to the changes
you made when integrating my patch.
CU
Christian
All the best,
Ivan
diff -Naur libgig_original/src/DLS.cpp libgig_modified/src/DLS.cpp
--- libgig_original/src/DLS.cpp 2019-02-22 20:12:19.898636160 +0000
+++ libgig_modified/src/DLS.cpp 2019-02-22 22:11:27.560070762 +0000
@@ -2087,7 +2087,6 @@
// save extension files (if required)
if (!ExtensionFiles.empty()) {
// for assembling path of extension files to be saved to
- const std::string folder = parentPath(Path);
const std::string baseName = pathWithoutExtension(Path);
// save the individual extension files
std::list<RIFF::File*>::iterator it = ExtensionFiles.begin();
@@ -2102,8 +2101,8 @@
// not work for saving new gigs created from scratch
const std::string oldName = (*it)->GetFileName();
const bool isGigaPulseFile = (extensionOfPath(oldName) == "gx99");
- std::string ext = (isGigaPulseFile) ? ".gx99" : strPrint(".gx02d", i+1);
- std::string newPath = concatPath(folder, baseName) + ext;
+ std::string ext = (isGigaPulseFile) ? ".gx99" : strPrint(".gx%02d", i+1);
+ std::string newPath = baseName + ext;
// save extension file to its new location
(*it)->Save(newPath, &subprogress);
}
diff -Naur libgig_original/src/helper.h libgig_modified/src/helper.h
--- libgig_original/src/helper.h 2019-02-22 20:12:19.894636136 +0000
+++ libgig_modified/src/helper.h 2019-02-22 21:24:31.815737442 +0000
@@ -329,7 +329,7 @@
*/
inline std::string parentPath(const std::string path) {
std::size_t pos = path.find_last_of(NATIVE_PATH_SEPARATOR);
- return (pos == std::string::npos) ? path : path.substr(0, pos);
+ return (pos == std::string::npos) ? "" : path.substr(0, pos);
}
/**
@@ -338,7 +338,7 @@
*/
inline std::string lastPathComponent(const std::string path) {
std::size_t pos = path.find_last_of(NATIVE_PATH_SEPARATOR);
- return (pos == std::string::npos) ? path : path.substr(pos+1);
+ return (pos == std::string::npos) ? "" : path.substr(pos+1);
}
/**
@@ -348,7 +348,7 @@
inline std::string pathWithoutExtension(const std::string path) {
std::size_t posSep = path.find_last_of(NATIVE_PATH_SEPARATOR);
std::size_t posBase = (posSep == std::string::npos) ? 0 : posSep+1;
- std::size_t posDot = path.find_last_of(".", posBase);
+ std::size_t posDot = path.find_last_of(".");
return (posDot != std::string::npos && posDot > posBase)
? path.substr(0, posDot) : path;
}
@@ -360,7 +360,7 @@
inline std::string extensionOfPath(const std::string path) {
std::size_t posSep = path.find_last_of(NATIVE_PATH_SEPARATOR);
std::size_t posBase = (posSep == std::string::npos) ? 0 : posSep+1;
- std::size_t posDot = path.find_last_of(".", posBase);
+ std::size_t posDot = path.find_last_of(".");
return (posDot != std::string::npos && posDot > posBase)
? path.substr(posDot+1) : "";
}
_______________________________________________
Linuxsampler-devel mailing list
Linuxsampler-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxsampler-devel