-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathREADME
110 lines (80 loc) · 2.69 KB
/
README
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
ZenGarden
Copyright RjDj, 2009
By Martin Roth <[email protected]>
ZenGarden is a standalone library for running Pure Data patches.
It is beta quality software - expect bugs and don't expect everything to be
implemented.
https://github.com/mhroth/ZenGarden/
Mailing list:
http://groups.google.com/group/zengarden?pli=1
Requirements
------------
libsndfile
- OSX: port install libsndfile
- Debian GNU/Linux: apt-get install libsndfile1-dev
- Nintendo DS: *experimental* see below
java - for the java example - you need at least java5
- Debian: apt-get install sun-java6-jdk
python - for the python example
- ctypes (in Python 2.5 or greater)
- pygame - http://pygame.org/
Run
---
The following commands both optionally take the full path to a Pd patch as
their first argument:
* `./runme-java.sh`
* `./runme-python.sh`
Build
-----
Here is how to build the library, JNI, etc. from scratch.
cd src
make
You can build individual components like so:
# build the library as a shared object file
make libzengarden
# build the Java Native Interface as a shared object file
make libjnizengarden
# build the Java hosted example
make examplegarden
Build: Nintendo DS
------------------
To build for Nintendo DS you first need to build libsndfile for NDS:
* Download it from http://www.mega-nerd.com/libsndfile/#Download
* Run the following commands in the directory where you unpacked the libsndfile source:
export PATH=$PATH:$DEVKITARM/bin/
./configure --enable-shared=no --enable-static=yes --disable-largefile --disable-alsa --disable-sqlite --host=arm-eabi --disable-external-libs --disable-test-coverage
make
# you may experience some errors to do with tests, but the .a file should be built anyway
# now copy the libsndfile.a library into your ZenGarden development directory
cp src/.libs/libsndfile.a ../ZenGarden/src/
# finally, copy the sndfile.h header file to the ZenGarden development directory
cp src/sndfile.h ../ZenGarden/src/
Finally, to build a static library for the nintendo DS, invoke the following command:
OS=nds make libzengarden-static
This will create ../libs/nds/libzengarden.a and you can use this library to
statically link into your nintendo DS programs.
Advantages
----------
Why use ZenGarden?
* Clean code and API
* Portable and embeddable
* Embedded devices, synthesizers
* Mobile phones
* Inside other languages
* LADSPA, VST, etc.
* Compiling Pd as a library is non-trivial and requires modifications to Pd vanilla
* Less bloat
* No GUI
* No hardware specific audio driver code
Layout
------
src/
- Source code
src/me/
- Java JNI demo source
Xcode/
- Xcode project
pd-patches/
- Demo Pd patches
pd-patches/unittest/
- Pd patches for doing unit testing of ZenGarden