Skip to content

Commit fdfdf25

Browse files
committed
Merge branch 'v0.13.4'
2 parents 7eb3a41 + 585c0f4 commit fdfdf25

14 files changed

Lines changed: 623 additions & 78 deletions

File tree

.bumpversion.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 0.13.3
2+
current_version = 0.13.4
33

44
[bumpversion:file:pyproject.toml]
55
search = {current_version}

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
jobs:
99

1010
test:
11-
runs-on: ubuntu-20.04
11+
runs-on: ubuntu-22.04
1212
strategy:
1313
matrix:
1414
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
@@ -32,7 +32,7 @@ jobs:
3232
run: tox
3333

3434
build:
35-
runs-on: ubuntu-20.04
35+
runs-on: ubuntu-22.04
3636
steps:
3737
- uses: actions/checkout@v3
3838
with:

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
11
CHANGELOG
22
=====
33

4+
0.13.4
5+
-----
6+
7+
Bugfixes:
8+
9+
* sending `[stop(` to `[line~]` when it's not running no longer jumps the current value (#188)
10+
* JS: emsdk 4.0.7 EXPORTED_RUNTIME_METHODS
11+
* Typing: move obj_perf to defaultdict()
12+
* Documentation: corrections
13+
* CI: move to ubuntu-22.04
14+
* Dependency updates
15+
416
0.13.3
517
-----
618

docs/02.getting_started.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,11 @@ This list will be continuously epanded to document differences in object behavio
9999
* Heavy does not support numbers in `[unpack]`, e.g. `[unpack 0 0]` gives `Heavy only supports arguments 'f' and 's' to unpack.` Workaround is to use `f` instead, e.g. `[unpack f f]`, and if necessary prime the default values with a `[loadbang]` and `[0 0(`.
100100
* Sliders and number inputs are converted to `[f ]` and thus do not store send/receive/initialization/etc. settings.
101101
* Heavy does not accept arguments and control connections to: `[rzero~]`, `[rzero_rev~]`, `[czero~]`, `[czero_rev~]`. In Heavy, these objects accept only signal inputs. Arguments and control connections are ignored.
102-
* On the `[select]` object it is currently not possible to set the arguments via the right inlet (internally a hardcoded switch_case is used).
102+
* On the `[select]` and `[route]` objects it is currently not possible to set the arguments via the right inlet (internally a hardcoded switch_case is used).
103103
* Heavy supports remote/send messages, however empty messages are currently removed. So the typical `[; bla 1(` multiline message needs to contain at least something on the first line: `[_; bla 1(`.
104-
* Remote/send messages with `sinesum` or `const` arguments to initialize table values are not supported.
105-
* `[metro]` and `[timer]` objects do not accept tempo messages or unit arguments.
104+
* Remote/send messages with `sinesum`, `const` or `resize` arguments to initialize table values, or modify the table dimensions, are not supported.
105+
* `[delay]`, `[metro]` and `[timer]` objects do not accept tempo messages or unit arguments.
106106
* `[snapshot~]` does not respond within the same control flow as it executes in signal context. Its output happens on the next audio cycle, so additional care for this control flow needs to be taken into account if you depend on synchronous execution. It also doesn't accept `[set(` messages.
107107
* Certain filters are sensitive to ‘blowing up’ at very low or very high cutoff frequencies and/or resonances, due to the filter coefficients not being perfectly represented with a finite number of bits. While Pure data natively uses 64 bits, platforms like `OWL` and `Daisy` that use 32 bit float are more sensitive to this. For example, the Pure data `[bp~]` filter is implemented with a biquad which is prone to fail or distort with cutoff frequencies less than around 200 Hz (at 48kHz sample rate).
108+
* Right inlet for table onset of `[tabread4~]` does not do anything.
108109
* Heavy does not support multichannel connections.

hvcc/generators/c2js/c2js.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -127,12 +127,13 @@ def run_emscripten(
127127
"-s", "RESERVED_FUNCTION_POINTERS=2",
128128
"-s", "DEFAULT_LIBRARY_FUNCS_TO_INCLUDE=$addFunction",
129129
"-s", f"EXPORTED_FUNCTIONS=[{hv_api_defs.format(patch_name)}]",
130+
"-s", "EXPORTED_RUNTIME_METHODS=HEAPF32",
130131
"-s", f"MODULARIZE={should_modularize}",
131-
'-s', 'ASSERTIONS=1',
132-
'-s', f'ENVIRONMENT={environment}',
133-
'-s', 'SINGLE_FILE=1',
134-
'-s', 'ALLOW_TABLE_GROWTH=1',
135-
'-s', f'BINARYEN_ASYNC_COMPILATION={binaryen_async}', # Set this to 0 for the worklet so we don't
132+
"-s", "ASSERTIONS=1",
133+
"-s", f"ENVIRONMENT={environment}",
134+
"-s", "SINGLE_FILE=1",
135+
"-s", "ALLOW_TABLE_GROWTH=1",
136+
"-s", f"BINARYEN_ASYNC_COMPILATION={binaryen_async}", # Set this to 0 for the worklet so we don't
136137
# wait for promises when instantiating
137138
"--post-js", post_js_path
138139
]

hvcc/generators/ir2c/ir2c_perf.py

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,24 +33,26 @@ def perf(
3333
blocksize: int = 512,
3434
mhz: int = 1000,
3535
verbose: bool = False
36-
) -> Dict[str, Counter]:
36+
) -> Dict[str, Dict[str, float]]:
3737
# read the hv.ir.json file
3838
with open(os.path.join(os.path.dirname(__file__), "../../core/json/heavy.ir.json"), "r") as f:
3939
HEAVY_IR_JSON = HeavyIRType(**json.load(f)).root
4040

4141
objects: Counter = Counter()
42-
perf: Counter = Counter()
43-
per_object_perf: Dict[str, Counter] = defaultdict(Counter)
42+
perf: Dict[str, float] = defaultdict(float)
43+
per_object_perf: Dict[str, Dict[str, float]] = defaultdict(lambda: defaultdict(float))
44+
4445
for o in ir.signal.processOrder:
4546
obj_id = o.id
4647
obj_type = ir.objects[obj_id].type
4748
if obj_type in HEAVY_IR_JSON.keys():
4849
objects[obj_type] += 1
4950
obj_perf = HEAVY_IR_JSON[obj_type].perf
5051
assert obj_perf is not None
51-
c = Counter(obj_perf.model_dump())
52-
perf = perf + c
53-
per_object_perf[obj_type] = per_object_perf[obj_type] + c
52+
c = defaultdict(float, **obj_perf.model_dump())
53+
for k, v in c.items():
54+
perf[k] = perf[k] + v
55+
per_object_perf[obj_type][k] = per_object_perf[obj_type][k] + v
5456
else:
5557
print(f"ERROR: Unknown object type {obj_type}")
5658

@@ -88,7 +90,8 @@ def perf(
8890
for k, v in items:
8991
if perf["avx"] > 0:
9092
print(
91-
"{2:>2.2g}% {3:<5} {0:<16} {1}".format(k, v, int(100.0 * v["avx"] / perf["avx"]), objects[k])
93+
"{2:>2.2g}% {3:<5} {0:<16} {1}".format(
94+
k, dict(v), int(100.0 * v["avx"] / perf["avx"]), objects[k])
9295
)
9396

9497
return per_object_perf

hvcc/generators/ir2c/static/HvLightPipe.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
// https://msdn.microsoft.com/en-us/library/hh875058.aspx#BarrierRestrictions
2626
// http://doxygen.reactos.org/d8/d47/armintr_8h_a02be7ec76ca51842bc90d9b466b54752.html
2727
#define hv_sfence() __dmb(0xE) /* _ARM_BARRIER_ST */
28-
#elif defined(__GNUC__)
28+
#elif defined(__GNUC__) && (__ARM_ARCH >= 7)
2929
#define hv_sfence() __asm__ volatile ("dmb 0xE":::"memory")
3030
#else
3131
// http://stackoverflow.com/questions/19965076/gcc-memory-barrier-sync-synchronize-vs-asm-volatile-memory

hvcc/generators/ir2c/static/HvSignalLine.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,10 +130,11 @@ void sLine_onMessage(HeavyContextInterface *_c, SignalLine *o, int letIn,
130130
o->m = vdupq_n_f32(0.0f);
131131
o->t = vdupq_n_f32(x);
132132
#else // HV_SIMD_NONE
133+
float x = (o->n > 0) ? (o->x + o->m) : o->t;
133134
o->n = 0;
134-
o->x += o->m;
135+
o->x = x;
135136
o->m = 0.0f;
136-
o->t = o->x;
137+
o->t = x;
137138
#endif
138139
}
139140
}

hvcc/types/compiler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class CompilerResp(BaseModel):
3535
out_file: str = ""
3636
compile_time: float = 0.0
3737
obj_counter: Counter = Counter()
38-
obj_perf: Dict[str, Counter] = defaultdict(Counter)
38+
obj_perf: Dict[str, Dict[str, float]] = defaultdict(lambda: defaultdict(float))
3939
ir: Optional[IRGraph] = None
4040

4141

hvcc/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
VERSION = "0.13.3"
1+
VERSION = "0.13.4"

0 commit comments

Comments
 (0)