Skip to content

Commit

Permalink
Merge branch 'v0.13.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
dromer committed Jan 1, 2025
2 parents 81036da + 3f78848 commit 37249c7
Show file tree
Hide file tree
Showing 8 changed files with 69 additions and 56 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.13.1
current_version = 0.13.2

[bumpversion:file:pyproject.toml]
search = {current_version}
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
CHANGELOG
=====

0.13.2
-----

Bugfixes:

* Incorrect use of new extern formatting in ir2c and c2js templates

0.13.1
-----

Expand Down
16 changes: 8 additions & 8 deletions hvcc/generators/c2js/template/hv_worklet.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,25 +176,25 @@ class {{name}}_AudioLibWorklet extends AudioWorkletProcessor {
}

var parameterInHashes = {
{%- for k,v in externs.parameters.in %}
{%- for k,v in externs.parameters.inParam %}
"{{v.display}}": {{v.hash}}, // {{v.display}}
{%- endfor %}
};

var parameterOutHashes = {
{%- for k,v in externs.parameters.out %}
{%- for k,v in externs.parameters.outParam %}
"{{v.display}}": {{v.hash}}, // {{v.display}}
{%- endfor %}
};

var eventInHashes = {
{%- for k,v in externs.events.in %}
{%- for k,v in externs.events.inEvent %}
"{{v.display}}": {{v.hash}}, // {{v.display}}
{%- endfor %}
};

var eventOutHashes = {
{%- for k,v in externs.events.out %}
{%- for k,v in externs.events.outEvent %}
"{{v.display}}": {{v.hash}}, // {{v.display}}
{%- endfor %}
};
Expand All @@ -216,22 +216,22 @@ function sendMidiIn(hv_context, message) {
var channel = message[0] & 0x0F;
var data1 = message[1];
var data2 = message[2];

// all events to [midiin]
for (var i = 1; i <= 2; i++) {
_hv_sendMessageToReceiverFF(hv_context, HV_HASH_MIDIIN, 0,
message[i],
channel
);
}

// realtime events to [midirealtimein]
if (MIDI_REALTIME.includes(message[0])) {
_hv_sendMessageToReceiverFF(hv_context, HV_HASH_MIDIREALTIMEIN, 0,
message[0]
);
}

switch(command) {
case 0x80: // note off
_hv_sendMessageToReceiverFFF(hv_context, HV_HASH_NOTEIN, 0,
Expand Down Expand Up @@ -335,7 +335,7 @@ function sendMidiOut(sendName, msg) {
]
case "__hv_midiout":
let firstByte = _hv_msg_getFloat(msg, 0);
return (firstByte === 192 || firstByte === 208) ?
return (firstByte === 192 || firstByte === 208) ?
[_hv_msg_getFloat(msg, 0), _hv_msg_getFloat(msg, 1)] :
[_hv_msg_getFloat(msg, 0), _hv_msg_getFloat(msg, 1), _hv_msg_getFloat(msg, 2)];
default:
Expand Down
16 changes: 8 additions & 8 deletions hvcc/generators/c2js/template/hv_wrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,25 +168,25 @@ var {{name}}_AudioLib = function(options) {
}

var parameterInHashes = {
{%- for k,v in externs.parameters.in %}
{%- for k,v in externs.parameters.inParam %}
"{{v.display}}": {{v.hash}}, // {{v.display}}
{%- endfor %}
};

var parameterOutHashes = {
{%- for k,v in externs.parameters.out %}
{%- for k,v in externs.parameters.outParam %}
"{{v.display}}": {{v.hash}}, // {{v.display}}
{%- endfor %}
};

var eventInHashes = {
{%- for k,v in externs.events.in %}
{%- for k,v in externs.events.inEvent %}
"{{v.display}}": {{v.hash}}, // {{v.display}}
{%- endfor %}
};

var eventOutHashes = {
{%- for k,v in externs.events.out %}
{%- for k,v in externs.events.outEvent %}
"{{v.display}}": {{v.hash}}, // {{v.display}}
{%- endfor %}
};
Expand Down Expand Up @@ -319,22 +319,22 @@ function sendMidiIn(hv_context, message) {
var channel = message[0] & 0x0F;
var data1 = message[1];
var data2 = message[2];

// all events to [midiin]
for (var i = 1; i <= 2; i++) {
_hv_sendMessageToReceiverFF(hv_context, HV_HASH_MIDIIN, 0,
message[i],
channel
);
}

// realtime events to [midirealtimein]
if (MIDI_REALTIME.includes(message[0])) {
_hv_sendMessageToReceiverFF(hv_context, HV_HASH_MIDIREALTIMEIN, 0,
message[0]
);
}

switch(command) {
case 0x80: // note off
_hv_sendMessageToReceiverFFF(hv_context, HV_HASH_NOTEIN, 0,
Expand Down Expand Up @@ -438,7 +438,7 @@ function sendMidiOut(sendName, msg) {
]
case "__hv_midiout":
let firstByte = _hv_msg_getFloat(msg, 0);
return (firstByte === 192 || firstByte === 208) ?
return (firstByte === 192 || firstByte === 208) ?
[_hv_msg_getFloat(msg, 0), _hv_msg_getFloat(msg, 1)] :
[_hv_msg_getFloat(msg, 0), _hv_msg_getFloat(msg, 1), _hv_msg_getFloat(msg, 2)];
default:
Expand Down
8 changes: 4 additions & 4 deletions hvcc/generators/ir2c/templates/Heavy_NAME.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,31 +13,31 @@ extern "C" {
#pragma mark - Heavy Context
#endif

{% if externs.parameters.in|length > 0 -%}
{% if externs.parameters.inParam|length > 0 -%}
typedef enum {
{%- for k,v in externs.parameters.inParam %}
HV_{{name|upper}}_PARAM_IN_{{k|upper}} = {{v.hash}}, // {{v.display}}
{%- endfor %}
} Hv_{{name}}_ParameterIn;
{% endif -%}

{% if externs.parameters.out|length > 0 %}
{% if externs.parameters.outParam|length > 0 %}
typedef enum {
{%- for k,v in externs.parameters.outParam %}
HV_{{name|upper}}_PARAM_OUT_{{k|upper}} = {{v.hash}}, // {{v.display}}
{%- endfor %}
} Hv_{{name}}_ParameterOut;
{% endif -%}

{% if externs.events.in|length > 0 %}
{% if externs.events.inEvent|length > 0 %}
typedef enum {
{%- for k,v in externs.events.inEvent %}
HV_{{name|upper}}_EVENT_IN_{{k|upper}} = {{v.hash}}, // {{v.display}}
{%- endfor %}
} Hv_{{name}}_EventIn;
{% endif -%}

{% if externs.events.out|length > 0 %}
{% if externs.events.outEvent|length > 0 %}
typedef enum {
{%- for k,v in externs.events.outEvent %}
HV_{{name|upper}}_EVENT_OUT_{{k|upper}} = {{v.hash}}, // {{v.display}}
Expand Down
2 changes: 1 addition & 1 deletion hvcc/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
VERSION = "0.13.1"
VERSION = "0.13.2"
72 changes: 39 additions & 33 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "hvcc"
version = "0.13.1"
version = "0.13.2"
description = "`hvcc` is a python-based dataflow audio programming language compiler that generates C/C++ code and a variety of specific framework wrappers."
authors = ["Enzien Audio, Wasted Audio"]
license = "GPLv3"
Expand Down

0 comments on commit 37249c7

Please sign in to comment.