All Projects → enzienaudio → Hvcc

enzienaudio / Hvcc

Licence: gpl-3.0
The heavy hvcc compiler for Pure Data patches.

Programming Languages

python
139335 projects - #7 most used programming language
python27
39 projects

Labels

Projects that are alternatives of or similar to Hvcc

Swift Lispkit
Interpreter framework for Lisp-based extension and scripting languages on macOS and iOS. LispKit is based on the R7RS standard for Scheme. Its compiler generates bytecode for a virtual machine. LispKit is fully implemented in Swift 5.
Stars: ✭ 228 (-9.16%)
Mutual labels:  compiler
Openj9
Eclipse OpenJ9: A Java Virtual Machine for OpenJDK that's optimized for small footprint, fast start-up, and high throughput. Builds on Eclipse OMR (https://github.com/eclipse/omr) and combines with the Extensions for OpenJDK for OpenJ9 repo.
Stars: ✭ 2,802 (+1016.33%)
Mutual labels:  compiler
Kotlin Compile Testing
A library for testing Kotlin and Java annotation processors, compiler plugins and code generation
Stars: ✭ 245 (-2.39%)
Mutual labels:  compiler
Gwion
🎵 strongly-timed musical programming language
Stars: ✭ 235 (-6.37%)
Mutual labels:  compiler
Adlik
Adlik: Toolkit for Accelerating Deep Learning Inference
Stars: ✭ 237 (-5.58%)
Mutual labels:  compiler
Asmjit
Machine code generation for C++
Stars: ✭ 2,874 (+1045.02%)
Mutual labels:  compiler
Cranelift
Cranelift code generator
Stars: ✭ 2,485 (+890.04%)
Mutual labels:  compiler
Kaitai struct compiler
Kaitai Struct: compiler to translate .ksy => .cpp / .cs / .dot / .java / .js / .php / .pm / .py / .rb
Stars: ✭ 251 (+0%)
Mutual labels:  compiler
Create Your Own Lang With Rust
Create your own programming language with Rust (WIP)
Stars: ✭ 236 (-5.98%)
Mutual labels:  compiler
Artiq
A leading-edge control system for quantum information experiments
Stars: ✭ 245 (-2.39%)
Mutual labels:  compiler
Vbuild
"Compile" your VueJS components (sfc/*.vue) to standalone html/js/css ... python only (no need of nodejs). Support python components too !
Stars: ✭ 236 (-5.98%)
Mutual labels:  compiler
Cproc
C11 compiler (mirror)
Stars: ✭ 238 (-5.18%)
Mutual labels:  compiler
Fsharp
The F# compiler, F# core library, F# language service, and F# tooling integration for Visual Studio
Stars: ✭ 2,966 (+1081.67%)
Mutual labels:  compiler
Ts Llvm
TypeScript to LLVM compiler (abandoned)
Stars: ✭ 230 (-8.37%)
Mutual labels:  compiler
Never
Never: statically typed, embeddable functional programming language.
Stars: ✭ 248 (-1.2%)
Mutual labels:  compiler
Flint
The Flint Programming Language for Smart Contracts
Stars: ✭ 228 (-9.16%)
Mutual labels:  compiler
Vuepack
Publish .vue files in NPM packages
Stars: ✭ 242 (-3.59%)
Mutual labels:  compiler
Lightbeam
Lightbeam has moved and now lives in the Wasmtime repository!
Stars: ✭ 253 (+0.8%)
Mutual labels:  compiler
Phosphorus
JavaScript compiler for Scratch projects.
Stars: ✭ 250 (-0.4%)
Mutual labels:  compiler
Zinc
Scala incremental compiler library, originally part of sbt
Stars: ✭ 246 (-1.99%)
Mutual labels:  compiler

Heavy Compiler Collection (hvcc)

hvcc is a python-based dataflow audio programming language compiler that generates C/C++ code and a variety of specific framework wrappers.

IMPORTANT!

This repo is currently unsupported and looking for a maintainer. The original authors will not respond to messages or issues. Bugs will not be fixed. Features will not be added. You are on your own. Good luck.

Background

The original need for hvcc arose from running against performance limitations while creating interactive music and sound products for the iPhone. Pure Data (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.

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.

It has since then been expanded to provide further support for many different platforms and frameworks, especially targeting game audio production tools.

Requirements

  • python 2.7
    • enum (for error reporting)
    • jinja2 (for generator templating)
    • nose2 (for tests, optional)

Installation

$ git clone https://github.com/enzienaudio/hvcc.git

$ cd hvcc/

$ pip2.7 install -r requirements.txt

Usage

hvcc requires at least one argument that determines the top-level patch file to be loaded.

Generate a C/C++ program from input.pd and place the files in ~/myProject/

$ python2.7 hvcc.py ~/myProject/_main.pd

This command will generate the following directories:

  • ~/myProject/hv heavylang representation of the input pd patch(es)
  • ~/myProject/ir heavyir representation of the heavylang patch
  • ~/myProject/c final generated C/C++ source files (this is what you would use in your project)

-o Select output directory

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.

The -o or --out_dir parameter will specify where the output files are placed after a successful compile.

For example:

$ python2.7 hvcc.py ~/myProject/_main.pd -o ~/Desktop/somewhere/else/

Will place all the generated files in ~/Desktop/somewhere/else/.

-n Specify Patch Name

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.

$ python2.7 hvcc.py ~/myProject/_main.pd -o ~/Desktop/somewhere/else/ -n mySynth

-g Generators

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.

For example:

$ python2.7 hvcc.py ~/myProject/_main.pd -o ~/Desktop/somewhere/else/ -n mySynth -g unity

Will also generate a unity section in the output directory contain all the build projects and source files to compile a Unity plugin.

It is also possible to pass a list of generators:

$ python2.7 hvcc.py ~/myProject/_main.pd -o ~/Desktop/somewhere/else/ -n mySynth -g unity wwise js

Available generator options:

  • c
  • bela
  • fabric
  • js
  • pdext
  • unity
  • vst2
  • wwise

-p Search Paths

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.

This can be handy when using a third-party patch library for example https://github.com/enzienaudio/heavylib.

$ python2.7 hvcc.py ~/myProject/_main.pd -o ~/Desktop/somewhere/else/ -n mySynth -p "[~/Workspace/Projects/Enzien/heavylib/, ~/Desktop/myLib/]"

--copyright User Copyright

By default all the generated source files via hvcc will have the following copyright text applied to the top of the file:

Copyright (c) 2018 Enzien Audio, Ltd.

This can be changed with --copyright parameter

$ python2.7 hvcc.py ~/myProject/_main.pd -o ~/Desktop/somewhere/else/ -n mySynth --copyright "Copyright (c) Los Pollos Hermanos 2019"

--help

Displays all the available parameters and options for hvcc.

Documentation

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].