1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307
|
Home
====
You can always find the latest version of libgig at:
https://www.linuxsampler.org/libgig/
Content
=======
libgig actually consists of three major parts:
- RIFF classes (RIFF.h, RIFF.cpp): Provides convenient methods to parse and
access arbitrary RIFF files.
- DLS classes (DLS.h, DLS.cpp): They're using the RIFF classes to parse
DLS (Downloadable Sounds) Level 1 and 2
files and provide abstract access to the
data.
- gig classes (gig.h, gig.cpp): These are based on the DLS classes and
provide the necessary extensions for
the Gigasampler/GigaStudio file format.
Despite its name, libgig also provides (since version 4.0.0) support for
other sampler file formats as well:
- SoundFont classes (SF.h, SF.cpp): They provide support for the very popular
SoundFont v1 and v2 format (.sf2).
- KORG classes (Korg.h, Korg.cpp): Provides support for sample based sounds
used on many KORG synthesizer keyboards.
- Akai classes (Akai.h): Currently S1000, S01, S2000 and S3000
series are supported.
Additionally libgig contains the following separate API:
- Serialization classes (Serialization.h, Serialization.cpp):
Framework to serialize and deserialize
the runtime state of native C++ objects
(for saving and restoring their states
as abstract data).
Beside the actual library there are following example applications:
gigdump: Demo app that prints out the content of a .gig file.
gigextract: Extracts samples from a .gig file.
gigmerge: Merges several .gig files to one .gig file.
gig2mono: Converts .gig files from stereo to mono.
gig2stereo: Converts .gig files to true interleaved stereo sounds.
wav2gig: Creates a new .gig file from a set of .wav files.
dlsdump: Demo app that prints out the content of a DLS file.
korgdump: Prints out the content of the various KORG file types.
korg2gig: Convert KORG sound file to Gigasampler/GigaStudio format.
sf2dump: Prints out the content of a .sf2 file.
sf2extract: Extracts audio samples from a .sf2 file.
rifftree: Tool that prints out the RIFF tree of an arbitrary RIFF
file.
akaidump: Dump an AKAI media i.e. from a CDROM drive as disk image file
to your hard disk drive.
akaiextract: Extracts samples from an Akai disk image, either from a media
(i.e. CDROM or Zip drive) for from a AKAI disk image file.
Since version 3.0.0 libgig also provides write support, that is for
creating modifying .gig, DLS and RIFF files.
Requirements
============
All systems
-----------
Since libgig 4.3.0 you need at least a C++11 compliant compiler.
POSIX systems (e.g. Linux, macOS):
---------------------------------
You need at least to have libtool installed to be able to build the
library with "./configure && make".
Additionally you need to have either libaudiofile (>= 0.2.3) or
libsndfile (>= 1.0.2) installed which is mandatory to be able to compile
the 'gigextract' example application. But of course 'gigextract' is still
just an example application, so it would make sense to compile it only if
one of those libraries are available. That would remove that hard
dependency to those two libs. But that's not a priority for me now.
Note: for Windows systems only libsndfile is available.
If you want to regenerate all autotools build files (that is configure,
Makefile.in, etc.) then you need to have automake (>= 1.5) and autoconf
installed.
Windows:
--------
The precompiled versions of libgig (and its tools) should be compatible
with any Windows operating system of at least Win95 or younger. Notice
that all example / demo applications coming with libgig are pure console
applications, thus you won't see a GUI showing up! :)
If you want to compile libgig and its tools by yourself, please also
notice the requirements under "Compiling for Windows".
Other Operating Systems:
------------------------
libgig was written to compile for any operating system, using standard C
library functions. However there are some OS dependent requirements:
* Since libgig 3.0.0 an OS dependent implementation for a tiny method called
RIFF::File::ResizeFile() is required. So you would either have to add
native OS API calls for that particular method, that is dependant to your
OS, or you have to add a portable implementation. No matter which way you
choose, please let us know! :)
* Since libgig 4.3.0 presence of some UUID generating function is required to
be provided by the underlying system. This was an optional feature in
previous versions of libgig for many years, its absence only meant that you
were unable to load gig files created/modified by libgig to be accepted by
Tascam's original GigaStudio studio software, did not mean any restriction
for being used with LinuxSampler though. This has changed in the meantime,
so this is now a hard build requirement, as you would potentially encounter
misbehaviours now even if you stay entirely in the Linux eco system if UUIDs
were missing in gig files.
Compiling for Linux
===================
You can either compile the sources and install the library directly on
your system or you can create Redhat or Debian packages.
a) Compiling and installing directly
Call './configure && make' on the console to compile the library, all
tools and demo applications, documentation and install them with
'make install'. The latter has to be called as root.
If you are compiling from CVS you have to call 'make -f Makefile.cvs'
to generate all autotools build files before calling
'./configure && make'.
You can use 'make distclean' and probably 'make -f Makefile.cvs clean'
to clean up everything again. The latter will also delete all automatic
generated autools build files.
b) Creating Debian packages
Use 'dpkg-buildpackage -rfakeroot -b' to compile and create the Debian
packages. This will generate 3 Debian packages:
libgig: Contains the shared library files.
libgig-dev: Contains the header files and documentation for building
applications using libgig.
gigtools: Contains the tools and demo applications.
You can use 'fakeroot debian/rules clean' to clean up everything again.
c) Creating Redhat packages
You need to have the rpmbuild tool installed and properly configured to
create RPM packages. To create the RPM packages do the following:
* Get .spec file generated by ./configure and edit it as appropriate.
* Copy the source tarball to "/usr/src/<rpmdir>/SOURCES" directory,
where <rpmdir> is dependent to the system you are using. For SuSE
<rmpdir> will be "packages", for Mandrake <rpmdir> is "RPM" and for
Redhat / Fedora <rpmdir> always equals "redhat".
* Build the rpm(s) by invoking 'rpmbuild -bb <specfile>' from the
command line.
On success, the resulting rpm(s) can usually be found under the proper
"/usr/src/<rpmdir>/RPMS/<arch>" directory.
Compiling for Windows using CMake
=================================
The easiest way is to compile is to use vcpkg (https://github.com/Microsoft/vcpkg)
to install libsndfile (required). In the vcpkg install dir type:
.\vcpkg.exe install libsndfile [--triplet x64-windows]
This should install the libraries in vcpkg, add the triplet option if you wish to
get the 64bit libraries.
In an empty directory type:
cmake <libgig source dir> -DCMAKE_TOOLCHAIN_FILE=<vcpkg dir>\scripts\buildsystems\vcpkg.cmake
[-G"Visual Studio 15 2017 Win64"]
Use the -G option to select the visual studio version and whether to compile for
64bits.
This will create libgig.sln file which you can open in visual studio or you can use
the following command line to compile:
cmake --build . --config <Release|Debug|MinRelSize|RelWithDebInfo>
Compiling for Windows using Dev-C++
===================================
libgig and its tools can also be compiled on Windows using Bloodshed Dev-C++,
which is a free (GPL) C++ integrated development environment for Windows.
It is also possible to use MSYS from MinGW, which allows you to use
'./configure && make' like the linux builds.
You can download Dev-C++ here:
http://www.bloodshed.net/devcpp.html
Make sure you install a version with Mingw integrated.
a) Compiling libgig.dll
Simply open the project file "win32/libgig.dev" either directly in Dev-C++
or by double clicking on the project file in the Windows explorer, then
click on "Compile" in the Dev-C++ menu and that's it! After compilation
finished, you can find the files "libgig.dll", "libgig.a" and
"liblibgig.def" in the "win32" directory.
b) Compiling the example tools "rifftree", "dlsdump" and "gigdump"
You need to have libgig.dll compiled as described in a). Then you can
compile the respective tool by simply opening the respective project
(.dev) file and clicking on "Compile" from the Dev-C++ menu. After
compilation you can find the respective .exe file in the "win32"
directory.
c) Compiling the example tool "gigextract"
You need to have libgig.dll compiled as described in a). Also you need
libsndfile (as DLL) which is used to create the .wav files. You can
download libsndfile already precompiled as DLL here:
http://www.mega-nerd.com/libsndfile/
Extract the .zip file i.e. to "C:\". The libsndfile .dll file should then
be i.e. under "C:\libsndfile-1_0_17". Beside the .dll file, make sure
libsndfile's .lib file exists in that directory as well. If the .lib file
does not exist yet, you have to create it with:
dlltool --input-def libsndfile-1.def --output-lib libsndfile-1.lib
Then you have to ensure the settings of gigextract's Dev-C++ project file
are pointing to the correct location of your local copy of libsndfile. For
that click in the Dev-C++ menu on "Project" -> "Project Options". Then
click on the tab "Parameter" and make sure the path to "libsndfile-1.lib"
in the "Linker" list view is correct. Then click on the tab "Directories"
and then on the tab "Include Directories" and make sure the path to
libsndfile points to the correct location there as well.
After that you should finally be able to compile "gigextract" by clicking
on "Compile" in the Dev-C++ menu. After compilation succeeded, you can
find the "gigextract.exe" file in the "win32" directory.
Test Cases
==========
There are automated test cases which allow to automatically check libgig's
functions behaving as expected on your system. These test cases are not
compiled by default:
* Run 'make check' from the toplevel source directory to compile and
run all test cases.
License
=======
libgig and its tools are released under the GNU General Public License (GPL).
libakai and its tools are released under the GNU Lesser General Public (LGPL).
Due to its different license model the Akai support part is built as separate
DLL (.so) file.
API Documentation
=================
If you have Doxygen installed you can generate the API documentation by
running 'make docs' in the sources' top level directory. The API
documentation will be generated in the 'doc' subdirectory.
Patches
=======
If you have bug fixes or improvements, your patches are always welcome!
Send them either directly to me or to the LinuxSampler developer's mailing
list <linuxsampler-devel@lists.sourceforge.net>.
Bugs
====
Please report bugs to the LinuxSampler Developers mailing list.
You might also try to run the "Test Cases" coming with libgig (see above),
especially in case you are running on an odd system.
Trademarks
==========
Tascam, Gigasampler, GigaStudio, KORG, Trinity, Triton, OASYS, M3, Kronos
and Akai are trademarks of their respective owners.
Credits
=======
The initial library (Gigasampler part) was based on the reverse engineering
effort of Paul Kellett and Ruben van Royen. We owe current support for the
Gigasampler v3/v4 format to Andreas Persson. Please also have a look at the
ChangeLog for all those who contributed.
Akai support files are a ported version of Sbastien Mtrot's libakai. The
original libakai only supported Mac and Windows. This forked version of
libakai now also supports Linux and other POSIX compliant operating systems
as well and does not have a dependency to libngl as the original libakai had.
The SoundFont 2 file format C++ classes were written by Grigor Iliev.
Thanks to all of you for your great work!
Christian Schoenebeck <cuse@users.sourceforge.net>
|