diff projects/heavy/hello-world/HvContext_bbb.c @ 162:c3e8226a5651 heavy-updated

- added additional flags to C rules (-DNDEBUG, -mfpu=neon) - sample-accurate envelope triggering pd/heavy example
author chnrx <chris.heinrichs@gmail.com>
date Thu, 12 Nov 2015 14:59:46 +0000
parents 5bcf04234f80
children
line wrap: on
line diff
--- a/projects/heavy/hello-world/HvContext_bbb.c	Thu Nov 05 19:27:44 2015 +0000
+++ b/projects/heavy/hello-world/HvContext_bbb.c	Thu Nov 12 14:59:46 2015 +0000
@@ -84,7 +84,7 @@
   Base(_c)->name = "bbb";
 
   Base(_c)->numBytes = sizeof(Hv_bbb);
-  Base(_c)->numBytes += sPhasor_k_init(&_c->sPhasor_O587H, 440.0f, sampleRate);
+  Base(_c)->numBytes += sPhasor_k_init(&_c->sPhasor_XIjUg, 440.0f, sampleRate);
 
   // loadbang
 
@@ -145,7 +145,7 @@
     __hv_zero_f(VOf(O1));
 
     // process all signal functions
-    __hv_phasor_k_f(&_c->sPhasor_O587H, VOf(Bf0));
+    __hv_phasor_k_f(&_c->sPhasor_XIjUg, VOf(Bf0));
     __hv_var_k_f(VOf(Bf1), 0.5f, 0.5f, 0.5f, 0.5f, 0.5f, 0.5f, 0.5f, 0.5f, 0);
     __hv_sub_f(VIf(Bf0), VIf(Bf1), VOf(Bf1));
     __hv_abs_f(VIf(Bf1), VOf(Bf1));
@@ -163,8 +163,8 @@
     __hv_fma_f(VIf(Bf0), VIf(Bf3), VIf(Bf4), VOf(Bf4));
     __hv_var_k_f(VOf(Bf3), 0.1f, 0.1f, 0.1f, 0.1f, 0.1f, 0.1f, 0.1f, 0.1f, 0);
     __hv_mul_f(VIf(Bf4), VIf(Bf3), VOf(Bf3));
+    __hv_add_f(VIf(Bf3), VIf(O0), VOf(O0));
     __hv_add_f(VIf(Bf3), VIf(O1), VOf(O1));
-    __hv_add_f(VIf(Bf3), VIf(O0), VOf(O0));
 
     // save output vars to output buffer
     __hv_store_f(outputBuffers[0]+n, VIf(O0));