From 9b2c80e52f90b4e308b28b82f03558e691ec0438 Mon Sep 17 00:00:00 2001 From: dreamer <1185977+dromer@users.noreply.github.com> Date: Fri, 10 Nov 2023 11:36:14 +0100 Subject: [PATCH] WIP: try basic bang~ implementation (#120) * try basic bang~ implementation * update docs * put at end of process(); send loadbang for first iteration * use normal loadbang object * update changelog --- CHANGELOG.md | 1 + docs/09.supported_vanilla_objects.md | 1 + docs/10.unsupported_vanilla_objects.md | 1 - hvcc/generators/ir2c/templates/Heavy_NAME.cpp | 2 ++ hvcc/interpreters/pd2hv/libs/pd/bang~.pd | 9 +++++++++ 5 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 hvcc/interpreters/pd2hv/libs/pd/bang~.pd diff --git a/CHANGELOG.md b/CHANGELOG.md index 385a7014..0553a376 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ CHANGELOG Next Release ----- +* Objects: `[bang~]` * Documentation fixes/additions * DPF: enum for UI parameter IDs * DPF bugfixes: correct input PortGroup names diff --git a/docs/09.supported_vanilla_objects.md b/docs/09.supported_vanilla_objects.md index e3f09221..6a98bc30 100644 --- a/docs/09.supported_vanilla_objects.md +++ b/docs/09.supported_vanilla_objects.md @@ -124,6 +124,7 @@ wrap /~ abs~ adc~ +bang~ biquad~ bp~ catch~ diff --git a/docs/10.unsupported_vanilla_objects.md b/docs/10.unsupported_vanilla_objects.md index 393b5b39..783c8a68 100644 --- a/docs/10.unsupported_vanilla_objects.md +++ b/docs/10.unsupported_vanilla_objects.md @@ -67,7 +67,6 @@ value ## Signal Objects ```list -bang~ block~ bob~ bonk~ diff --git a/hvcc/generators/ir2c/templates/Heavy_NAME.cpp b/hvcc/generators/ir2c/templates/Heavy_NAME.cpp index c984c5d7..f2a3dd08 100644 --- a/hvcc/generators/ir2c/templates/Heavy_NAME.cpp +++ b/hvcc/generators/ir2c/templates/Heavy_NAME.cpp @@ -246,6 +246,8 @@ int Heavy_{{name}}::process(float **inputBuffers, float **outputBuffers, int n) blockStartTimestamp = nextBlock; return n; {%- endif %} + + sendBangToReceiver(0xDD21C0EB); // send to __hv_bang~ } int Heavy_{{name}}::processInline(float *inputBuffers, float *outputBuffers, int n4) { diff --git a/hvcc/interpreters/pd2hv/libs/pd/bang~.pd b/hvcc/interpreters/pd2hv/libs/pd/bang~.pd new file mode 100644 index 00000000..23fae332 --- /dev/null +++ b/hvcc/interpreters/pd2hv/libs/pd/bang~.pd @@ -0,0 +1,9 @@ +#N canvas 320 37 549 254 12; +#X obj 99 102 r __hv_bang~; +#X obj 99 173 outlet; +#X obj 99 71 inlet; +#X text 151 69 inlet is inactive; +#X text 255 111 because we only receive the first bang at the end of the first process() loop we first send a loadbang; +#X obj 128 132 loadbang; +#X connect 0 0 1 0; +#X connect 5 0 1 0;