summaryrefslogtreecommitdiff
path: root/note_compiler/templates/head.2
diff options
context:
space:
mode:
Diffstat (limited to 'note_compiler/templates/head.2')
-rw-r--r--note_compiler/templates/head.211
1 files changed, 11 insertions, 0 deletions
diff --git a/note_compiler/templates/head.2 b/note_compiler/templates/head.2
new file mode 100644
index 0000000..917030c
--- /dev/null
+++ b/note_compiler/templates/head.2
@@ -0,0 +1,11 @@
+// member variables end here
+};
+
+//this function returns the smallest phase_init possible for a
+//given custom_wave which is greater or equal than PHASE_INIT
+#define PHASE_INIT 100
+inline fixed_t init_custom_osc_phase(int len, fixed_t sr)
+{
+ return ( (fixed_t(ceil( float(PHASE_INIT) * sr / len / ONE )) *len << (2*SCALE)) / sr);
+}
+