Debian Codegraph @

PKG-INFO

raw
1 Metadata-Version: 2.4
2 Name: hvcc
3 Version: 0.17.2
4 Summary: `hvcc` is a python-based dataflow audio programming language compiler that generates C/C++ code and a variety of specific framework wrappers.
5 License: GPLv3
6 License-File: LICENSE
7 Author: Enzien Audio, Wasted Audio
8 Requires-Python: >=3.9,<4.0
9 Classifier: Development Status :: 4 - Beta
10 Classifier: Intended Audience :: Developers
11 Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
12 Classifier: License :: Other/Proprietary License
13 Classifier: Programming Language :: Python :: 3
14 Classifier: Programming Language :: Python :: 3.9
15 Classifier: Programming Language :: Python :: 3.10
16 Classifier: Programming Language :: Python :: 3.11
17 Classifier: Programming Language :: Python :: 3.12
18 Classifier: Programming Language :: Python :: 3.13
19 Classifier: Programming Language :: Python :: 3.14
20 Classifier: Topic :: Software Development :: Compilers
21 Requires-Dist: Jinja2 (>=2.11)
22 Requires-Dist: arpeggio (>=2.0.2,<3.0.0)
23 Requires-Dist: pydantic (>=2.9.1)
24 Requires-Dist: pydantic-extra-types (>=2.10.6,<3.0.0)
25 Project-URL: Documentation, https://wasted-audio.github.io/hvcc/
26 Project-URL: Repository, https://github.com/Wasted-Audio/hvcc
27 Description-Content-Type: text/markdown
28
29 # Heavy Compiler Collection (hvcc)
30
31 [![Build Status](https://github.com/Wasted-Audio/hvcc/actions/workflows/ci.yml/badge.svg)](https://github.com/Wasted-Audio/hvcc/actions)
32 [![pypi](https://img.shields.io/pypi/v/hvcc.svg)](https://pypi.python.org/pypi/hvcc)
33 [![python](https://img.shields.io/pypi/pyversions/hvcc.svg)](https://pypi.python.org/pypi/hvcc)
34
35 `hvcc` is a python-based dataflow audio programming language compiler that generates C/C++ code and a variety of specific framework wrappers.
36
37 ## Background
38
39 Originaly created by Enzien Audio, the need for `hvcc` arose from running against performance limitations while creating interactive music and sound products for the iPhone. [Pure Data](https://puredata.info) (libpd) was the only real choice for a design tool as it was embeddable and provided a high enough abstraction level that musicians or sound designers could be creative.
40
41 The goal was to leverage Pure Data as a design interface and statically interpret the resultant patches to generate a low-level, portable and optimised C/C++ program that would be structured to take advantage of modern hardware whilst still generating the same behaviour and audio output as Pure Data.
42
43 It has since then been expanded to provide further support for many different platforms and frameworks, targeting game audio design, daw plugins and embedded production tools. In 2021 Wasted Audio took over maintenance of the project.
44
45 > [!IMPORTANT]
46 > **Using HVCC in a (commercial) product, hardware device, game, or research?**
47 >
48 > We are collecting information on how HVCC is used in the wild to better understand ecosystem needs and ensure long-term sustainability. [**Tell us about your use case!**](#use-cases-and-commercial-users)
49
50 ## Documentation
51
52 - [Introduction](docs/getting-started/index.md)
53 - [What is heavy?](docs/getting-started/index.md#what-is-heavy)
54 - [Supported patch formats](docs/getting-started/index.md#supported-patch-formats)
55 - [Supported platforms](docs/getting-started/index.md#supported-platforms)
56 - [Supported frameworks](docs/getting-started/index.md#supported-frameworks)
57 - [Licensing](docs/getting-started/index.md#licensing)
58 - [Getting Started](docs/getting-started/patching.md)
59 - [Generators](docs/generators/index.md)
60 - [MIDI](docs/reference/midi.md)
61 - [C API](docs/reference/c.md)
62 - [C++ API](docs/reference/cpp.md)
63 - [Heavy Lang Info](docs/reference/ir/heavy_lang.md)
64 - [Heavy IR Info](docs/reference/ir/heavy_ir.md)
65 - [Heavy GUI IR Info](docs/reference/ir/heavy_gui_ir.md)
66 - [Supported vanilla objects](docs/reference/objects/supported.md)
67 - [Unsupported vanilla objects](docs/reference/objects/unsupported.md)
68
69 ## Integrations
70
71 hvcc has been integrated into several projects and services. This allows to easily compile patches without having to install hvcc manually.
72
73 - [plugdata](https://plugdata.org/) - Modern interface for Pure Data. Includes a full cross-platform toolchain and targets Daisy, DPF and PD Externals.
74 - [mod-cloud-builder](https://github.com/moddevices/mod-cloud-builder) - Online service for building LV2 plugins for the MOD platform.
75 - [OWL Patch Library](https://www.rebeltech.org/patch-library) - Online service for building OWL plugins (uses an old fork).
76 - [Boochow Web Apps](https://app.boochow.com/) - Online service for building Korg Logue SDK plugins.
77
78 ## Requirements
79
80 Python 3.9 up to 3.14
81
82 - `jinja2` (for generator templating)
83 - `pydantic` (for data types)
84 - `pydantic-extra-types` (for data types)
85 - `arpeggio` (for `expr~` translation)
86
87 For tests:
88
89 - `tox` (python install)
90 - `numpy/scipy` (dev dependencies)
91 - `midifile` (git submodule)
92 - `tinywav` (git submodule)
93 - `clang/clang++` (system install)
94
95 ## Installation
96
97 hvcc is available from pypi.org and can be installed using python3 pip:
98
99 ```sh
100 pip3 install hvcc
101 ```
102
103 If you want to develop hvcc you can install it from the source directory:
104
105 ```sh
106 git clone https://github.com/Wasted-Audio/hvcc.git
107 cd hvcc/
108 pip3 install -e .
109 ```
110
111 Also review our [Contribution Guide](CONTRIBUTING.md) before opening a pull request.
112
113 ## Basic Usage
114
115 `hvcc` requires at least one argument that determines the top-level patch file to be loaded.
116
117 Generate a C/C++ program from `input.pd` and place the files in `~/myProject/`
118
119 ```sh
120 hvcc ~/myProject/_main.pd
121 ```
122
123 This command will generate the following directories:
124
125 - `~/myProject/hv` heavylang representation of the input pd patch(es)
126 - `~/myProject/ir` heavyir representation of the heavylang patch
127 - `~/myProject/c` final generated C/C++ source files (this is what you would use in your project)
128
129 ### `-o` Select output directory
130
131 As seen in the above command, typical output of `hvcc` is split into several directories that contain the intermediate files used by the compiler itself, the final generated source files, and any additional framework specific files and projects.
132
133 The `-o` or `--out_dir` parameter will specify where the output files are placed after a successful compile.
134
135 For example:
136
137 ```sh
138 hvcc ~/myProject/_main.pd -o ~/Desktop/somewhere/else/
139 ```
140
141 Will place all the generated files in `~/Desktop/somewhere/else/`.
142
143 ### `-n` Specify Patch Name
144
145 The `-n` or `--name` parameter can be used to easily namespace the generated code so that there are no conflicts when integrating multiple patches into the same project.
146
147 ```sh
148 hvcc ~/myProject/_main.pd -o ~/Desktop/somewhere/else/ -n mySynth
149 ```
150
151 ### `-g` Generators
152
153 Once `hvcc` has generated internal information about the patch the `-g` or `--gen` parameter can be used to specify the output files it should generate. By default it will always include `c` for the C/C++ source files and additional generators can specified for certain framework targets.
154
155 For example:
156
157 ```sh
158 hvcc ~/myProject/_main.pd -o ~/Desktop/somewhere/else/ -n mySynth -g unity
159 ```
160
161 Will also generate a `unity` section in the output directory contain all the build projects and source files to compile a Unity plugin.
162
163 It is also possible to pass a list of generators:
164
165 ```sh
166 hvcc ~/myProject/_main.pd -o ~/Desktop/somewhere/else/ -n mySynth -g unity wwise js
167 ```
168
169 A list of available generator options can be found [here](docs/generators/index.md)
170
171 ### `-p` Search Paths
172
173 `hvcc` will iterate through various directories when resolving patch objects and abstractions. The `-p` or `--search_paths` argument can be used to add additional folders for `hvcc` to look in. Note that this argument is not needed for abstractions in the same folder as the top-level patch.
174
175 This can be handy when using a third-party patch library like [heavylib](https://github.com/Wasted-Audio/heavylib) for example.
176
177 Simply append any folder paths after the `-p` flag like so:
178
179 ```sh
180 hvcc ~/myProject/_main.pd -o ~/Desktop/somewhere/else/ -n mySynth -p ~/Workspace/Projects/Enzien/heavylib/ ~/Desktop/myLib/
181 ```
182
183 ### `-m` Meta Data
184
185 `hvcc` can take extra meta-data via a supplied json file. It depends on the generator which fields are supported.
186
187 ### `--copyright` User Copyright
188
189 By default all the generated source files via `hvcc` will have the following copyright text applied to the top of the file:
190
191 `Copyright (c) 2018 Enzien Audio, Ltd.`
192
193 This can be changed with `--copyright` parameter
194
195 ```sh
196 hvcc ~/myProject/_main.pd -o ~/Desktop/somewhere/else/ -n mySynth --copyright "Copyright (c) Los Pollos Hermanos 2019"
197 ```
198
199 ### `--help`
200
201 Displays all the available parameters and options for hvcc.
202
203 For more information see [CLI & Tools](docs/getting-started/tools.md)
204
205 ## Contact
206
207 The Heavy community aims to be safe and inclusive, please read our [Code of Conduct](CODE_OF_CONDUCT.md) before engaging.
208
209 ### Use Cases and Commercial Users
210
211 We are actively gathering information from individuals and companies using HVCC in production, commercial products, embedded hardware, or research.
212
213 Sharing your experience helps guide future development, highlight real-world adoption, and support the project's sustainability.
214
215 If you or your organization use HVCC, please reach out to:
216
217 - **Email (Private):** [`[email protected]`](mailto:[email protected])
218 - **GitHub Discussions (Public):** Share your work in [HVCC Discussions](https://github.com/Wasted-Audio/hvcc/discussions)
219
220 **Helpful details to include:**
221
222 - Company or project name (and whether you'd like to be publicly featured or kept confidential)
223 - Target framework or hardware (e.g., Daisy, DPF/VST/LV2, Unity/Wwise, custom embedded C/C++)
224 - Any features or improvements that would most benefit your workflow
225
226 ### Community and Chat
227
228 There are several places where heavy/hvcc conversation is happening:
229
230 - [Discord](https://discord.gg/fmxJveg)
231 - [IRC](https://web.libera.chat/#hvcc) (`#hvcc` on Libera.Chat)
232 - Forums:
233 - [Bela](https://forum.bela.io/?q=hvcc)
234 - [Rebel Technology](https://community.rebeltech.org/tags/puredata)
235 - [Daisy](https://forum.electro-smith.com/c/integrations/pure-data/32)
236 - [MOD](https://forum.moddevices.com/c/developers/pure-data/56)
237 - [Github Discussions](https://github.com/Wasted-Audio/hvcc/discussions)
238
239 ## Funding
240
241 This project is partially funded through [NGI0 Commons Fund](https://nlnet.nl/commonsfund), a fund established by [NLnet](https://nlnet.nl) with financial support from the European Commission's [Next Generation Internet](https://ngi.eu) program. Learn more at the [NLnet project page](https://nlnet.nl/project/HVCC).
242
243 [<img src="https://nlnet.nl/logo/banner.png" alt="NLnet foundation logo" width="20%" />](https://nlnet.nl)
244 [<img src="https://nlnet.nl/image/logos/NGI0_tag.svg" alt="NGI Zero Logo" width="20%" />](https://nlnet.nl/commonsfund)
245