Debian Codegraph @

src/host-examples/README.txt

raw
1 ---------------------------
2 host-examples (sample code)
3 ---------------------------
4 author: Ge Wang
5 date: Summer 2023
6 ---------------------------
7
8 So, you want to incorporate ChucK as a component/library within another
9 software? These examples can show you how.
10
11 ========
12 Examples
13 ========
14 host-1-minimal.cpp -- (no real-time audio) shows the basics of
15 initializing a ChucK instance, and using it to compile and run some ChucK
16 code
17
18 host-2-audio.cpp -- shows integrating the ChucK instance in a host with
19 real-time audio, and shows using the ChucK instance to compile and run
20 ChucK program at runtime to generate audio. The example plays audio (on
21 your default output audio device)
22
23 host-3-globals.cpp -- shows communication between C++ and ChucK using
24 ChucK global variables
25
26 host-4-shreds.cpp -- shows high-level shred operations from c++, including
27 adding, removing last, and getting the current VM status including info
28 about shreds
29
30 host-5-custom-api.cpp -- shows binding custom classes from a c++ host, to
31 add new custom classes specific to the host, usable from ChucK
32
33 ========
34 Building
35 ========
36 The `makefile` in this directory shows how to build the hosts as well as
37 ChucK core from source. Depending on the host software to integrate ChucK
38 into (e.g., command-line chuck, miniAudicle, web chuck. Chunity, Chunreal,
39 or what have you), the build could be drastically different; the makefile
40 is supplied just as a reference for these examples.
41
42 type `make` to get started.
43
44 NOTE much of the complexities of the makefiles here are due to the need
45 to support real-time on various operating systems. If you are incorporating
46 ChucK core as a component into a system that already handles real-time
47 audio, the build for ChucK can be much simpler. For reference see the
48 'vanilla' makefile, located in ../src/core/makefile
49
50 Good luck and keep on ChucKin'
51