1 |
|
Home |
2 |
|
==== |
3 |
|
You can always find the latest version of libgig at: |
4 |
|
http://www.linuxsampler.org/libgig/ |
5 |
|
|
6 |
Content |
Content |
7 |
======= |
======= |
8 |
libgig actually consists of three parts: |
libgig actually consists of three parts: |
14 |
files and provide abstract access to the |
files and provide abstract access to the |
15 |
data. |
data. |
16 |
- gig classes (gig.h, gig.cpp): These are based on the DLS classes and |
- gig classes (gig.h, gig.cpp): These are based on the DLS classes and |
17 |
provide the neccessary extensions for |
provide the necessary extensions for |
18 |
the Gigasampler file format. |
the Gigasampler file format. |
19 |
|
|
20 |
|
Despite its name, libgig also provides support for other sampler file |
21 |
|
formats as well today: |
22 |
|
|
23 |
|
- SoundFont classes (SF.h, SF.cpp): They provide support for the very popular |
24 |
|
SoundFont v1 and v2 format (.sf2). |
25 |
|
|
26 |
|
- KORG classes (Korg.h, Korg.cpp): Provides support for sample based sounds |
27 |
|
used on many KORG synthesizer keyboards. |
28 |
|
|
29 |
|
- Akai classes (Akai.h): Currently S1000, S01, S2000 and S3000 |
30 |
|
series are supported. |
31 |
|
|
32 |
|
Beside the actual library there are following example applications: |
33 |
|
|
34 |
|
gigdump: Demo app that prints out the content of a .gig file. |
35 |
|
gigextract: Extracts samples from a .gig file. |
36 |
|
gigmerge: Merges several .gig files to one .gig file. |
37 |
|
gig2mono: Converts .gig files from stereo to mono. |
38 |
|
dlsdump: Demo app that prints out the content of a DLS file. |
39 |
|
korgdump: Prints out the content of the various KORG file types. |
40 |
|
korg2gig: Convert KORG sound file to Gigasampler/GigaStudio format. |
41 |
|
rifftree: Tool that prints out the RIFF tree of an arbitrary RIFF |
42 |
|
file. |
43 |
|
akaidump: Dump an AKAI media i.e. from a CDROM drive as disk image file |
44 |
|
to your hard disk drive. |
45 |
|
akaiextract: Extracts samples from an Akai disk image, either from a media |
46 |
|
(i.e. CDROM or Zip drive) for from a AKAI disk image file. |
47 |
|
|
48 |
|
Since version 3.0.0 libgig also provides write support, that is for |
49 |
|
creating modifying .gig, DLS and RIFF files. |
50 |
|
|
51 |
Requirements |
Requirements |
52 |
============ |
============ |
53 |
I simply used automake & co this time so you will need to have automake, |
POSIX systems (e.g. Linux, OS X): |
54 |
autoconf and libtool installed. I used the following versions: |
--------------------------------- |
55 |
|
|
56 |
automake 1.6.3 |
You need at least to have libtool installed to be able to build the |
57 |
autoconf 2.57 |
library with "./configure && make". |
58 |
|
|
59 |
If you want to compile the 'gigextract' application that comes with these |
Additionally you need to have either libaudiofile (>= 0.2.3) or |
60 |
sources then you will additionally need to have libaudiofile installed (I |
libsndfile (>= 1.0.2) installed which is mandatory to be able to compile |
61 |
used version 0.2.3). |
the 'gigextract' example application. But of course 'gigextract' is still |
62 |
|
just an example application, so it would make sense to compile it only if |
63 |
|
one of those libraries are available. That would remove that hard |
64 |
|
dependency to those two libs. But that's not a priority for me now. |
65 |
|
Note: for Windows systems only libsndfile is available. |
66 |
|
|
67 |
Non-POSIX systems |
If you want to regenerate all autotools build files (that is configure, |
68 |
================= |
Makefile.in, etc.) then you need to have automake (>= 1.5) and autoconf |
69 |
If you don't have a POSIX system, you have to set 'POSIX' to '0' in RIFF.h. |
installed. |
70 |
Instead of using POSIX calls then standard C calls will be used for file |
|
71 |
access. |
Windows: |
72 |
|
-------- |
73 |
|
|
74 |
|
The precompiled versions of libgig (and its tools) should be compatible |
75 |
|
with any Windows operating system of at least Win95 or younger. Notice |
76 |
|
that all example / demo applications coming with libgig are pure console |
77 |
|
applications, thus you won't see a GUI showing up! :) |
78 |
|
|
79 |
|
If you want to compile libgig and its tools by yourself, please also |
80 |
|
notice the requirements under "Compiling for Windows". |
81 |
|
|
82 |
|
Other Operating Systems: |
83 |
|
------------------------ |
84 |
|
|
85 |
|
libgig was written to compile for any operating system, using standard C |
86 |
|
library functions. However the latest versions of libgig lack a portable |
87 |
|
implementation of one tiny method called RIFF::File::ResizeFile(). So you |
88 |
|
would either have to add native OS API calls for that particular method, |
89 |
|
that is dependant to your OS, or you have to add a portable |
90 |
|
implementation. No matter which way you choose, please let us know! :) |
91 |
|
|
92 |
|
Compiling for Linux |
93 |
|
=================== |
94 |
|
You can either compile the sources and install the library directly on |
95 |
|
your system or you can create Redhat or Debian packages. |
96 |
|
|
97 |
|
a) Compiling and installing directly |
98 |
|
|
99 |
|
Call './configure && make' on the console to compile the library, all |
100 |
|
tools and demo applications, documentation and install them with |
101 |
|
'make install'. The latter has to be called as root. |
102 |
|
|
103 |
|
If you are compiling from CVS you have to call 'make -f Makefile.cvs' |
104 |
|
to generate all autotools build files before calling |
105 |
|
'./configure && make'. |
106 |
|
|
107 |
|
You can use 'make distclean' and probably 'make -f Makefile.cvs clean' |
108 |
|
to clean up everything again. The latter will also delete all automatic |
109 |
|
generated autools build files. |
110 |
|
|
111 |
|
b) Creating Debian packages |
112 |
|
|
113 |
|
Use 'dpkg-buildpackage -rfakeroot -b' to compile and create the Debian |
114 |
|
packages. This will generate 3 Debian packages: |
115 |
|
|
116 |
|
libgig: Contains the shared library files. |
117 |
|
libgig-dev: Contains the header files and documentation for building |
118 |
|
applications using libgig. |
119 |
|
gigtools: Contains the tools and demo applications. |
120 |
|
|
121 |
|
You can use 'fakeroot debian/rules clean' to clean up everything again. |
122 |
|
|
123 |
|
c) Creating Redhat packages |
124 |
|
|
125 |
|
You need to have the rpmbuild tool installed and properly configured to |
126 |
|
create RPM packages. To create the RPM packages do the following: |
127 |
|
|
128 |
|
* Get .spec file generated by ./configure and edit it as appropriate. |
129 |
|
|
130 |
|
* Copy the source tarball to "/usr/src/<rpmdir>/SOURCES" directory, |
131 |
|
where <rpmdir> is dependent to the system you are using. For SuSE |
132 |
|
<rmpdir> will be "packages", for Mandrake <rpmdir> is "RPM" and for |
133 |
|
Redhat / Fedora <rpmdir> always equals "redhat". |
134 |
|
|
135 |
|
* Build the rpm(s) by invoking 'rpmbuild -bb <specfile>' from the |
136 |
|
command line. |
137 |
|
|
138 |
|
On success, the resulting rpm(s) can usually be found under the proper |
139 |
|
"/usr/src/<rpmdir>/RPMS/<arch>" directory. |
140 |
|
|
141 |
Compiling: |
Compiling for Windows |
142 |
|
===================== |
143 |
|
|
144 |
|
libgig and its tools can be compiled for Windows using Bloodshed Dev-C++, |
145 |
|
which is a free (GPL) C++ integrated development environment for Windows. |
146 |
|
It is also possible to use MSYS from MinGW, which allows you to use |
147 |
|
'./configure && make' like the linux builds. |
148 |
|
|
149 |
|
You can download Dev-C++ here: |
150 |
|
|
151 |
|
http://www.bloodshed.net/devcpp.html |
152 |
|
|
153 |
|
Make sure you install a version with Mingw integrated. |
154 |
|
|
155 |
|
a) Compiling libgig.dll |
156 |
|
|
157 |
|
Simply open the project file "win32/libgig.dev" either directly in Dev-C++ |
158 |
|
or by double clicking on the project file in the Windows explorer, then |
159 |
|
click on "Compile" in the Dev-C++ menu and that's it! After compilation |
160 |
|
finished, you can find the files "libgig.dll", "libgig.a" and |
161 |
|
"liblibgig.def" in the "win32" directory. |
162 |
|
|
163 |
|
b) Compiling the example tools "rifftree", "dlsdump" and "gigdump" |
164 |
|
|
165 |
|
You need to have libgig.dll compiled as described in a). Then you can |
166 |
|
compile the respective tool by simply opening the respective project |
167 |
|
(.dev) file and clicking on "Compile" from the Dev-C++ menu. After |
168 |
|
compilation you can find the respective .exe file in the "win32" |
169 |
|
directory. |
170 |
|
|
171 |
|
c) Compiling the example tool "gigextract" |
172 |
|
|
173 |
|
You need to have libgig.dll compiled as described in a). Also you need |
174 |
|
libsndfile (as DLL) which is used to create the .wav files. You can |
175 |
|
download libsndfile already precompiled as DLL here: |
176 |
|
|
177 |
|
http://www.mega-nerd.com/libsndfile/ |
178 |
|
|
179 |
|
Extract the .zip file i.e. to "C:\". The libsndfile .dll file should then |
180 |
|
be i.e. under "C:\libsndfile-1_0_17". Beside the .dll file, make sure |
181 |
|
libsndfile's .lib file exists in that directory as well. If the .lib file |
182 |
|
does not exist yet, you have to create it with: |
183 |
|
|
184 |
|
dlltool --input-def libsndfile-1.def --output-lib libsndfile-1.lib |
185 |
|
|
186 |
|
Then you have to ensure the settings of gigextract's Dev-C++ project file |
187 |
|
are pointing to the correct location of your local copy of libsndfile. For |
188 |
|
that click in the Dev-C++ menu on "Project" -> "Project Options". Then |
189 |
|
click on the tab "Parameter" and make sure the path to "libsndfile-1.lib" |
190 |
|
in the "Linker" list view is correct. Then click on the tab "Directories" |
191 |
|
and then on the tab "Include Directories" and make sure the path to |
192 |
|
libsndfile points to the correct location there as well. |
193 |
|
|
194 |
|
After that you should finally be able to compile "gigextract" by clicking |
195 |
|
on "Compile" in the Dev-C++ menu. After compilation succeeded, you can |
196 |
|
find the "gigextract.exe" file in the "win32" directory. |
197 |
|
|
198 |
|
Test Cases |
199 |
========== |
========== |
200 |
- Use 'CXXFLAGS=-pedantic ./configure && make all' to compile the library |
The libgig sources come with a tiny console application which allows to |
201 |
and all tools and demo applications. |
automatically test libgig's functions on your system. This test |
202 |
|
application is not compiled by default, you have to compile it explicitly |
203 |
|
with the following commands on the console (cppunit has to be installed): |
204 |
|
|
205 |
- Beside the actual library there are four applications: |
cd src/testcases |
206 |
|
make libgigtests |
207 |
|
|
208 |
gigdump: Demo app that prints out the content of a .gig file. |
and then run the test application from the same directory with: |
|
gigextract: Extracts samples from a .gig file. |
|
|
dlsdump: Demo app that prints out the content of a DLS file. |
|
|
rifftree: Tool that prints out the RIFF tree of an arbitrary RIFF |
|
|
file. |
|
209 |
|
|
210 |
- If you have Doxygen installed you can generate the API documentation by |
./libgigtests |
211 |
just running 'doxygen' in the sources' top level directory. |
|
212 |
|
License |
213 |
|
======= |
214 |
|
libgig and its tools are released under the GNU General Public License (GPL). |
215 |
|
|
216 |
|
libakai and its tools are released under the GNU Lesser General Public (LGPL). |
217 |
|
Due to its different license model the Akai support part is built as separate |
218 |
|
DLL (.so) file. |
219 |
|
|
220 |
|
API Documentation |
221 |
|
================= |
222 |
|
If you have Doxygen installed you can generate the API documentation by |
223 |
|
running 'make docs' in the sources' top level directory. The API |
224 |
|
documentation will be generated in the 'doc' subdirectory. |
225 |
|
|
226 |
|
Patches |
227 |
|
======= |
228 |
|
If you have bug fixes or improvements, your patches are always welcome! |
229 |
|
Send them either directly to me or to the LinuxSampler developer's mailing |
230 |
|
list <linuxsampler-devel@lists.sourceforge.net>. |
231 |
|
|
232 |
|
Bugs |
233 |
|
==== |
234 |
|
Please use http://bugs.linuxsampler.org to check and report possible bugs. |
235 |
|
You might also try to run the "Test Cases" coming with libgig (see above), |
236 |
|
especially in case you are running on an odd system. |
237 |
|
|
238 |
|
Trademarks |
239 |
|
========== |
240 |
|
Tascam, Gigasampler, GigaStudio, KORG, Trinity, Triton, OASYS, M3, Kronos |
241 |
|
and Akai are trademarks of their respective owners. |
242 |
|
|
243 |
|
Credits |
244 |
|
======= |
245 |
|
The initial library (Gigasampler part) was based on the reverse engineering |
246 |
|
effort of Paul Kellett and Ruben van Royen. We owe current support for the |
247 |
|
Gigasampler v3/v4 format to Andreas Persson. Please also have a look at the |
248 |
|
ChangeLog for all those who contributed. |
249 |
|
|
250 |
|
Akai support files are a ported version of Sébastien Métrot's libakai. The |
251 |
|
original libakai only supported Mac and Windows. This forked version of |
252 |
|
libakai now also supports Linux and other POSIX compliant operating systems |
253 |
|
as well. |
254 |
|
|
255 |
- 'make distclean' to clean up everything again |
Thanks to all of you for your great work! |
256 |
|
|
257 |
Christian Schoenebeck <cuse@users.sourceforge.net> |
Christian Schoenebeck <cuse@users.sourceforge.net> |