/[svn]/libgig/trunk/README
ViewVC logotype

Annotation of /libgig/trunk/README

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3476 - (hide annotations) (download)
Wed Feb 20 19:12:49 2019 UTC (5 years, 2 months ago) by schoenebeck
File size: 12460 byte(s)
* Added MSVC build support
  (anonymous patch from mailing list).
* Introduced CMake build support (yet constrained for building with MSVC)
  (anonymous patch from mailing list).
* Bumped version (4.1.0.svn12).

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

  ViewVC Help
Powered by ViewVC