{"id":23638036,"url":"https://github.com/wasted-audio/hvcc","last_synced_at":"2025-05-15T10:07:18.523Z","repository":{"id":37623155,"uuid":"343553019","full_name":"Wasted-Audio/hvcc","owner":"Wasted-Audio","description":"The heavy hvcc compiler for Pure Data patches. Updated to python3 and additional generators","archived":false,"fork":false,"pushed_at":"2025-05-06T06:54:17.000Z","size":3872,"stargazers_count":310,"open_issues_count":38,"forks_count":33,"subscribers_count":14,"default_branch":"develop","last_synced_at":"2025-05-15T10:06:44.946Z","etag":null,"topics":["audio","c","compiler","cpp","daisy","dpf","dsp","owl","puredata","python","unity","webassembly","wwise"],"latest_commit_sha":null,"homepage":"https://wasted-audio.github.io/hvcc/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"enzienaudio/hvcc","license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Wasted-Audio.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"Wasted-Audio","patreon":"WastedAudio","ko_fi":"wastedaudio","liberapay":"WastedAudio"}},"created_at":"2021-03-01T20:50:26.000Z","updated_at":"2025-05-14T13:44:48.000Z","dependencies_parsed_at":"2024-03-18T09:41:57.094Z","dependency_job_id":"f171da05-d159-460f-aa19-1281b4e2a498","html_url":"https://github.com/Wasted-Audio/hvcc","commit_stats":{"total_commits":210,"total_committers":16,"mean_commits":13.125,"dds":"0.45238095238095233","last_synced_commit":"102208250c9feefaf43d54e44f09fec7d790abb3"},"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wasted-Audio%2Fhvcc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wasted-Audio%2Fhvcc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wasted-Audio%2Fhvcc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wasted-Audio%2Fhvcc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Wasted-Audio","download_url":"https://codeload.github.com/Wasted-Audio/hvcc/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254319722,"owners_count":22051074,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["audio","c","compiler","cpp","daisy","dpf","dsp","owl","puredata","python","unity","webassembly","wwise"],"created_at":"2024-12-28T07:21:54.088Z","updated_at":"2025-05-15T10:07:18.480Z","avatar_url":"https://github.com/Wasted-Audio.png","language":"Python","readme":"# Heavy Compiler Collection (hvcc)\n\n[![Build Status](https://github.com/Wasted-Audio/hvcc/actions/workflows/ci.yml/badge.svg)](https://github.com/Wasted-Audio/hvcc/actions)\n[![pypi](https://img.shields.io/pypi/v/hvcc.svg)](https://pypi.python.org/pypi/hvcc)\n[![python](https://img.shields.io/pypi/pyversions/hvcc.svg)](https://pypi.python.org/pypi/hvcc)\n\n`hvcc` is a python-based dataflow audio programming language compiler that generates C/C++ code and a variety of specific framework wrappers.\n\n## Background\n\nOriginaly 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.\n\nThe 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.\n\nIt 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.\n\n## Documentation\n\n* [Introduction](/docs/01.introduction.md)\n  * [What is heavy?](/docs/01.introduction.md#what-is-heavy)\n  * [Supported patch formats](/docs/01.introduction.md#supported-patch-formats)\n  * [Supported platforms](/docs/01.introduction.md#supported-platforms)\n  * [Supported frameworks](/docs/01.introduction.md#supported-frameworks)\n  * [Licensing](/docs/01.introduction.md#licensing)\n* [Getting Started](/docs/02.getting_started.md)\n* [Generators](/docs/03.generators.md)\n* [MIDI](/docs/04.midi.md)\n* [C API](/docs/05.c.md)\n* [C++ API](/docs/06.cpp.md)\n* [Heavy Lang Info](/docs/07.heavy_lang.md)\n* [Heavy IR Info](/docs/08.heavy_ir_lang.md)\n* [Supported vanilla objects](/docs/09.supported_vanilla_objects.md)\n* [Unsupported vanilla objects](/docs/10.unsupported_vanilla_objects.md)\n\n## Integrations\n\nhvcc has been integrated into several projects and services. This allows to easily compile patches without having to install hvcc manually.\n\n* [plugdata](https://plugdata.org/) - Modern interface for Pure Data. Includes a full cross-platform toolchain and targets Daisy, DPF and PD Externals.\n* [mod-cloud-builder](https://github.com/moddevices/mod-cloud-builder) - Online service for building LV2 plugins for the MOD platform.\n* [OWL Patch Library](https://www.rebeltech.org/patch-library) - Online service for building OWL plugins (uses an old fork).\n\n## Requirements\n\nPython 3.8 up to 3.12\n\n* `jinja2` (for generator templating)\n* `importlib_resources` (for reading static resources)\n* `json2daisy` (for daisy integration)\n\nFor tests:\n\n* `tox` (python install)\n* `numpy/scipy` (requirements-dev)\n* `midifile` (git submodule)\n* `tinywav` (git submodule)\n* `clang/clang++` (system install)\n\n## Installation\n\nhvcc is available from pypi.org and can be installed using python3 pip:\n\n`$ pip3 install hvcc`\n\nIf you want to develop hvcc you can install it from the source directory:\n\n`$ git clone https://github.com/Wasted-Audio/hvcc.git`\n\n`$ cd hvcc/`\n\n`$ pip3 install -e .`\n\n## Usage\n\n`hvcc` requires at least one argument that determines the top-level patch file to be loaded.\n\nGenerate a C/C++ program from `input.pd` and place the files in `~/myProject/`\n\n`$ hvcc ~/myProject/_main.pd`\n\nThis command will generate the following directories:\n\n* `~/myProject/hv` heavylang representation of the input pd patch(es)\n* `~/myProject/ir` heavyir representation of the heavylang patch\n* `~/myProject/c` final generated C/C++ source files (this is what you would use in your project)\n\n### `-o` Select output directory\n\nAs 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.\n\nThe `-o` or `--out_dir` parameter will specify where the output files are placed after a successful compile.\n\nFor example:\n\n`$ hvcc ~/myProject/_main.pd -o ~/Desktop/somewhere/else/`\n\nWill place all the generated files in `~/Desktop/somewhere/else/`.\n\n### `-n` Specify Patch Name\n\nThe `-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.\n\n`$ hvcc ~/myProject/_main.pd -o ~/Desktop/somewhere/else/ -n mySynth`\n\n### `-g` Generators\n\nOnce `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.\n\nFor example:\n\n`$ hvcc ~/myProject/_main.pd -o ~/Desktop/somewhere/else/ -n mySynth -g unity`\n\nWill also generate a `unity` section in the output directory contain all the build projects and source files to compile a Unity plugin.\n\nIt is also possible to pass a list of generators:\n\n`$ hvcc ~/myProject/_main.pd -o ~/Desktop/somewhere/else/ -n mySynth -g unity wwise js`\n\nA list of available generator options can be found [here](/docs/03.generators.md)\n\n### `-p` Search Paths\n\n`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.\n\nThis can be handy when using a third-party patch library like [heavylib](https://github.com/Wasted-Audio/heavylib) for example.\n\nSimply append any folder paths after the `-p` flag like so:\n\n`$ hvcc ~/myProject/_main.pd -o ~/Desktop/somewhere/else/ -n mySynth -p ~/Workspace/Projects/Enzien/heavylib/ ~/Desktop/myLib/`\n\n### `-m` Meta Data\n\n`hvcc` can take extra meta-data via a supplied json file. It depends on the generator which fields are supported.\n\n### `--copyright` User Copyright\n\nBy default all the generated source files via `hvcc` will have the following copyright text applied to the top of the file:\n\n`Copyright (c) 2018 Enzien Audio, Ltd.`\n\nThis can be changed with `--copyright` parameter\n\n`$ hvcc ~/myProject/_main.pd -o ~/Desktop/somewhere/else/ -n mySynth --copyright \"Copyright (c) Los Pollos Hermanos 2019\"`\n\n### `--help`\n\nDisplays all the available parameters and options for hvcc.\n\n## Contact\n\nThere are several places where heavy/hvcc conversation is happening:\n\n* [Discord](https://discord.gg/fmxJveg)\n* [IRC](https://web.libera.chat/#hvcc)\n* A number of forums:\n  * [Bela](https://forum.bela.io/?q=hvcc)\n  * [Rebel Technology](https://community.rebeltech.org/tags/puredata)\n  * [Daisy](https://forum.electro-smith.com/c/integrations/pure-data/32)\n  * [MOD](https://forum.moddevices.com/c/developers/pure-data/56)\n\nOr you can use the [discussions](https://github.com/Wasted-Audio/hvcc/discussions) tab of this repository\n","funding_links":["https://github.com/sponsors/Wasted-Audio","https://patreon.com/WastedAudio","https://ko-fi.com/wastedaudio","https://liberapay.com/WastedAudio"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwasted-audio%2Fhvcc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwasted-audio%2Fhvcc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwasted-audio%2Fhvcc/lists"}