Skip to content

Commit

Permalink
dpf project makefile; doc improvements; bela result-key; fabric hash;…
Browse files Browse the repository at this point in the history
… py10-dev (Wasted-Audio#29)

* dpf project makefile; doc improvements; bela result-key; fabric hash; py10

* docs reshuffle; dpf project makefile; deprecate uploader

* use meaningful parameters in dpf; docs cleanup

* update changelog

* docs

* midi
  • Loading branch information
dromer authored Aug 19, 2021
1 parent 7028357 commit 900b2b5
Show file tree
Hide file tree
Showing 34 changed files with 414 additions and 278 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7, 3.8, 3.9]
python-version: [3.7, 3.8, 3.9, 3.10-dev]

steps:
- uses: actions/checkout@v2
Expand Down
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@ CHANGELOG
Next Release
-----

* Daisy support
* metadata json for generator config
* add trig attribute type
* Daisy platform support
* DPF cleanup + meta + trig
* documentation update
* DPF makefiles + meaningful values + docs

0.1.2
-----
Expand Down
32 changes: 13 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
![Build Status](https://github.com/Wasted-Audio/hvcc/actions/workflows/python.yml/badge.svg)

:warning: This is an attempt to modernize `hvcc` to work with `python3` and add some additional targets. :warning:
This is an attempt to modernize `hvcc` to work with `python3` and add some additional targets.

:warning: Not all functionality is being tested. Feedback is appreciated. :warning:
Not all functionality is being tested. Bugreports and feedback are appreciated.

# Heavy Compiler Collection (hvcc)

Expand Down Expand Up @@ -85,27 +85,22 @@ Available generator options:

* `c`
* `bela`
* `daisy`
* `dpf`
* `fabric`
* `js`
* `pdext`
* `unity`
* `daisy`
* `dpf`
* `vst2`
* `lv2`
* `jack`
* `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.
This can be handy when using a third-party patch library for example https://github.com/Wasted-Audio/heavylib.

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


### `-m` Meta Data
`hvcc` can take extra meta-data via a supplied json file. It depends on the generator which fields are supported.

Expand All @@ -132,15 +127,14 @@ Displays all the available parameters and options for hvcc.
- [Supported frameworks](/docs/01.introduction.md#supported-frameworks)
- [Licensing](/docs/01.introduction.md#licensing)
* [Getting Started](/docs/02.getting_started.md)
* [Unity](/docs/05.unity.md)
* [Wwise](/docs/06.wwise.md)
* [Javascript](/docs/07.javascript.md)
* [DPF](/docs/08.dpf.md)
* [MIDI](/docs/09.midi.md)
* [C API](/docs/10.c.md)
* [C++ API](/docs/11.cpp.md)
* [Heavy Lang Info](/docs/12.heavy_lang.md)
* [Heavy IR Info](/docs/13.heavy_ir_lang.md)
* [Generators](/docs/03.generators.md)
* [MIDI](/docs/04.midi.md)
* [C API](/docs/05.c.md)
* [C++ API](/docs/06.cpp.md)
* [Heavy Lang Info](/docs/07.heavy_lang.md)
* [Heavy IR Info](/docs/08.heavy_ir_lang.md)
* [Supported vanilla objects](/docs/09.supported_vanilla_objects)
* [Supported vanilla objects](/docs/10.unsupported_vanilla_objects)

## Contact
There are several places where heavy/hvcc conversation is happening:
Expand Down
9 changes: 6 additions & 3 deletions docs/01.introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@ However it's important to note that Pd is merely used as a front-end authoring e

Heavy can interpret and convert a subset of features from Pure Data patches:

* [Supported Pd objects](14.Supported_vanilla_objects.md)
* [Unsupported Pd objects](15.Unsupported_vanilla_objects.md)

* [Supported Pd objects](09.supported_vanilla_objects.md)
* [Unsupported Pd objects](10.unsupported_vanilla_objects.md)

## Supported Platforms
* Windows 8, 10 and WSA
Expand Down Expand Up @@ -60,3 +59,7 @@ The files that `hvcc` generates are split into two types:
* [Static](https://github.com/Wasted-Audio/hvcc/tree/master/hvcc/generators/ir2c/static): this code is independent of the input patch contents and provides the basic DSP functionality with which generated output can link against. It has a [BSD](https://github.com/Wasted-Audio/hvcc/blob/master/hvcc/generators/ir2c/static/HeavyContext.hpp#L2) licence.

* Generated: this relates to all the source files that use information about the input patch, for example `Heavy_{{name}}.cpp`. By default all these files will have a `Copyright (c) 2018 Enzien Audio, Ltd` header, but this can be modified with the [user copyright argument](../README.md#--copyright-user-copyright).

## How to start patching for heavy

See the [Getting started](02.getting_started.md) page on more information about how to construct compatible pure data patches.
27 changes: 24 additions & 3 deletions docs/02.getting_started.md
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Getting Started


## Audio Input/Output
To receive audio input into your patch add an `[adc~]` object.

Expand All @@ -20,6 +19,14 @@ Receivers not annotated with `@hv_param` are still completely functional, they s

![params](img/docs_exposed_params.png)

### Parameter Type

An optional parameter type can be set to which generator implementations can program custom features. The default type is `float`.

For example, `[r toggle @hvparam 0 1 1 bool]`.

See the [DPF docs](03.gen.dpf.md#parameter-types) for more information on how parameter types can be integrated into a generator.

### Output Parameters

In the same manner as above, all (control) `[send]` and `[s]` objects annotated with `@hv_param` will be exposed as **output** parameters.
Expand All @@ -39,7 +46,21 @@ For example, `[r bang @hv_event]` will show up as a button called "bang" in the

![events_unity](img/docs_exposed_events_unity.png)

See the [Unity docs](05.unity.md#exposing-and-sending-events) for more information on exposing events and controlling them.
See the [Unity docs](03.gen.unity.md#exposing-and-sending-events) for more information on exposing events and controlling them.

## Metadata
Some generators, like Daisy and DPF, enable support for extra configuration metadata.json file using the `-m`. It depends on the generator what is supported. See the [DPF docs](03.gen.dpf.md#metadata) for more information on setting meta data for plugins.


Simple Daisy example that selects the desired board to build for:

```json
{
"daisy": {
"board": "seed"
}
}
```

## Errors
If there's an incompatibility within the patch, Heavy will generate an error message.
Expand All @@ -53,4 +74,4 @@ Heavy will also perform patch analysis to look for common mistakes and inconsite

## Reporting Issues

If you experience any problems or have some thoughts on how to improve heavy make sure to browse and contribute to our [public issue tracker](https://github.com/enzienaudio/heavy/issues).
If you experience any problems or have some thoughts on how to improve heavy make sure to browse and contribute to our [public issue tracker](https://github.com/Wasted-Audio/hvcc/issues).
18 changes: 18 additions & 0 deletions docs/03.gen.daisy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Daisy

Currently daisy platform is supported for:

* `seed`
* `pod`
* `petal`
* `patch`

Which can be configured using the `-m` metadata.json `daisy.board` setting:

```json
{
"daisy": {
"board": "seed"
}
}
```
70 changes: 70 additions & 0 deletions docs/03.gen.dpf.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# DPF

Heavy can generate LV2 and VST2 plugins from your patch using the [Distrho Plugin Framework](https://github.com/DISTRHO/DPF). It can be either a synth (output-only) or an effect (input and output), supports an arbitrary number of parameters, and can process midi events.

## Defining Parameters
Each [exposed parameter](02.getting_started.md#exposing-parameters) will automatically generate a slider in the plugin interface.

## MIDI Control
In order to receive MIDI note on and off events, as well as control change messages, the `[notein]` and `[ctlin]` objects should be used, respectively.

![notein](img/docs_notein.png)

## Parameter Types
In DPF a parameter can get an optional type configured. The default type is `float`. Other assignable types are `bool` - for toggling a value - and `trig` - for momentary signals.

![dpf](img/docs_param_type.png)

The following dpf jinja templating:

```jinja
parameter.hints = kParameterIsAutomable
{% if v.attributes.type == 'bool': %}
| kParameterIsBoolean
{% elif v.attributes.type == 'trig': %}
| kParameterIsTrigger
{% endif %};
```

Generates the subsequent plugin code:

```c++
parameter.hints = kParameterIsAutomable | kParameterIsBoolean;
// or
parameter.hints = kParameterIsAutomable | kParameterIsTrigger;
```

## Metadata

An accomponying metadata.json file can be included to set additional plugin settings.

The `project` flag creates a `README.md` and `Makefile` in the root of the project output, but may conflict with other generators.

Each of these are optional and have either a default value or are entirely optional (description and homepage). Midi i/o ports are on by default, but can be set to `0` and they will be disabled - currently `midi_input` always has to be on!.


```json
{
"dpf": {
"project": true,
"description": "super simple test patch",
"maker": "nobody",
"homepage": "https://wasted.audio/plugin/dpf_example",
"plugin_uri": "lv2://wasted.audio/lv2/dpf_example",
"version": "6, 6, 6",
"license": "WTFPL",
"midi_input": 1,
"midi_output": 0,
"plugin_formats": [
"lv2_dsp",
"vst",
"jack"
]
}
}
```

## Notes
* The `[notein]` object is the only supported means of receiving MIDI note events (i.e. Note On and Note Off). Arguments to the object (e.g. to specify the channel number) will be ignored.
* The `[ctlin]` object is the only supported means of receiving MIDI control change events. Arguments to the object (e.g. to filter which CC event is delivered) will be ignored.
* If you are compiling from source, make sure to read the included `README.md` file in the root directory.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
12 changes: 12 additions & 0 deletions docs/03.generators.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Generators

HVCC supports a number of dedicated generators that can help to wrap the heavy c/cpp output into a pluggable format:

* `Bela`
* [Daisy](03.gen.daisy.md)
* [DPF](03.gen.dpf.md)
* [Fabric](03.gen.fabric.md)
* [Javascript](03.gen.javascript.md)
* `Pdext`
* [Wwise](03.gen.wwise.md)
* [Unity](03.gen.unity.md)
121 changes: 0 additions & 121 deletions docs/03.uploader.md

This file was deleted.

Loading

0 comments on commit 900b2b5

Please sign in to comment.