Debian Codegraph @

PKG-INFO

raw
1 Metadata-Version: 2.4
2 Name: hvcc
3 Version: 0.17.1
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 ## Documentation
46
47 - [Introduction](docs/getting-started/index.md)
48 - [What is heavy?](docs/getting-started/index.md#what-is-heavy)
49 - [Supported patch formats](docs/getting-started/index.md#supported-patch-formats)
50 - [Supported platforms](docs/getting-started/index.md#supported-platforms)
51 - [Supported frameworks](docs/getting-started/index.md#supported-frameworks)
52 - [Licensing](docs/getting-started/index.md#licensing)
53 - [Getting Started](docs/getting-started/patching.md)
54 - [Generators](docs/generators/index.md)
55 - [MIDI](docs/reference/midi.md)
56 - [C API](docs/reference/c.md)
57 - [C++ API](docs/reference/cpp.md)
58 - [Heavy Lang Info](docs/reference/ir/heavy_lang.md)
59 - [Heavy IR Info](docs/reference/ir/heavy_ir.md)
60 - [Heavy GUI IR Info](docs/reference/ir/heavy_gui_ir.md)
61 - [Supported vanilla objects](docs/reference/objects/supported.md)
62 - [Unsupported vanilla objects](docs/reference/objects/unsupported.md)
63
64 ## Integrations
65
66 hvcc has been integrated into several projects and services. This allows to easily compile patches without having to install hvcc manually.
67
68 - [plugdata](https://plugdata.org/) - Modern interface for Pure Data. Includes a full cross-platform toolchain and targets Daisy, DPF and PD Externals.
69 - [mod-cloud-builder](https://github.com/moddevices/mod-cloud-builder) - Online service for building LV2 plugins for the MOD platform.
70 - [OWL Patch Library](https://www.rebeltech.org/patch-library) - Online service for building OWL plugins (uses an old fork).
71
72 ## Requirements
73
74 Python 3.9 up to 3.14
75
76 - `jinja2` (for generator templating)
77 - `pydantic` (for data types)
78 - `pydantic-extra-types` (for data types)
79 - `arpeggio` (for `expr~` translation)
80
81 For tests:
82
83 - `tox` (python install)
84 - `numpy/scipy` (dev dependencies)
85 - `midifile` (git submodule)
86 - `tinywav` (git submodule)
87 - `clang/clang++` (system install)
88
89 ## Installation
90
91 hvcc is available from pypi.org and can be installed using python3 pip:
92
93 ```sh
94 pip3 install hvcc
95 ```
96
97 If you want to develop hvcc you can install it from the source directory:
98
99 ```sh
100 git clone https://github.com/Wasted-Audio/hvcc.git
101 cd hvcc/
102 pip3 install -e .
103 ```
104
105 Also review our [Contribution Guide](CONTRIBUTING.md) before opening a pull request.
106
107 ## Usage
108
109 `hvcc` requires at least one argument that determines the top-level patch file to be loaded.
110
111 Generate a C/C++ program from `input.pd` and place the files in `~/myProject/`
112
113 ```sh
114 hvcc ~/myProject/_main.pd
115 ```
116
117 This command will generate the following directories:
118
119 - `~/myProject/hv` heavylang representation of the input pd patch(es)
120 - `~/myProject/ir` heavyir representation of the heavylang patch
121 - `~/myProject/c` final generated C/C++ source files (this is what you would use in your project)
122
123 ### `-o` Select output directory
124
125 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.
126
127 The `-o` or `--out_dir` parameter will specify where the output files are placed after a successful compile.
128
129 For example:
130
131 ```sh
132 hvcc ~/myProject/_main.pd -o ~/Desktop/somewhere/else/
133 ```
134
135 Will place all the generated files in `~/Desktop/somewhere/else/`.
136
137 ### `-n` Specify Patch Name
138
139 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.
140
141 ```sh
142 hvcc ~/myProject/_main.pd -o ~/Desktop/somewhere/else/ -n mySynth
143 ```
144
145 ### `-g` Generators
146
147 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.
148
149 For example:
150
151 ```sh
152 hvcc ~/myProject/_main.pd -o ~/Desktop/somewhere/else/ -n mySynth -g unity
153 ```
154
155 Will also generate a `unity` section in the output directory contain all the build projects and source files to compile a Unity plugin.
156
157 It is also possible to pass a list of generators:
158
159 ```sh
160 hvcc ~/myProject/_main.pd -o ~/Desktop/somewhere/else/ -n mySynth -g unity wwise js
161 ```
162
163 A list of available generator options can be found [here](docs/generators/index.md)
164
165 ### `-p` Search Paths
166
167 `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.
168
169 This can be handy when using a third-party patch library like [heavylib](https://github.com/Wasted-Audio/heavylib) for example.
170
171 Simply append any folder paths after the `-p` flag like so:
172
173 ```sh
174 hvcc ~/myProject/_main.pd -o ~/Desktop/somewhere/else/ -n mySynth -p ~/Workspace/Projects/Enzien/heavylib/ ~/Desktop/myLib/
175 ```
176
177 ### `-m` Meta Data
178
179 `hvcc` can take extra meta-data via a supplied json file. It depends on the generator which fields are supported.
180
181 ### `--copyright` User Copyright
182
183 By default all the generated source files via `hvcc` will have the following copyright text applied to the top of the file:
184
185 `Copyright (c) 2018 Enzien Audio, Ltd.`
186
187 This can be changed with `--copyright` parameter
188
189 ```sh
190 hvcc ~/myProject/_main.pd -o ~/Desktop/somewhere/else/ -n mySynth --copyright "Copyright (c) Los Pollos Hermanos 2019"
191 ```
192
193 ### `--help`
194
195 Displays all the available parameters and options for hvcc.
196
197 ## Contact
198
199 The Heavy community aims to be safe and inclusive, please read our [Code of Conduct](CODE_OF_CONDUCT.md) before engaging.
200
201 There are several places where heavy/hvcc conversation is happening:
202
203 - [Discord](https://discord.gg/fmxJveg)
204 - [IRC](https://web.libera.chat/#hvcc)
205 - A number of forums:
206 - [Bela](https://forum.bela.io/?q=hvcc)
207 - [Rebel Technology](https://community.rebeltech.org/tags/puredata)
208 - [Daisy](https://forum.electro-smith.com/c/integrations/pure-data/32)
209 - [MOD](https://forum.moddevices.com/c/developers/pure-data/56)
210
211 Or you can use the [discussions](https://github.com/Wasted-Audio/hvcc/discussions) tab of this repository
212
213 ## Funding
214
215 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).
216
217 [<img src="https://nlnet.nl/logo/banner.png" alt="NLnet foundation logo" width="20%" />](https://nlnet.nl)
218 [<img src="https://nlnet.nl/image/logos/NGI0_tag.svg" alt="NGI Zero Logo" width="20%" />](https://nlnet.nl/commonsfund)
219