From c7479c669c4969d1f504fab2789a51358778c930 Mon Sep 17 00:00:00 2001 From: j-enns <38088930+j-enns@users.noreply.github.com> Date: Thu, 26 Feb 2026 15:29:29 -0700 Subject: [PATCH 1/5] Update MetaOscil.h include other phMod types --- MetaOscil.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/MetaOscil.h b/MetaOscil.h index 43671f350..9758eb0ce 100644 --- a/MetaOscil.h +++ b/MetaOscil.h @@ -126,6 +126,34 @@ template int8_t phMod(Q15n16 phmod_proportion) {return current_osc->phMod(phmod_proportion);} + /** Returns the next sample given a phase modulation value. + @param phmod_proportion a phase modulation value given as a proportion of the wave. The + phmod_proportion parameter is a SFix fixed-point number where the fractional part represents almost -1 to almost 1, modulating the phase by one whole table length in + each direction. This fixed point math number is interpreted as a SFix<15,16> internally. + @return a sample from the table. + */ + template + inline + int8_t phMod(SFix phmod_proportion) + { + return current_osc->phMod(phmod_proportion); + } + + + + /** Returns the next sample given a phase modulation value. + @param phmod_proportion a phase modulation value given as a proportion of the wave. The + phmod_proportion parameter is a SFix<15,16> fixed-point number where the fractional part represents almost -1 to almost 1, modulating the phase by one whole table length in + each direction. + @return a sample from the table. + */ + inline + int8_t phMod(SFix<15,16> phmod_proportion) + { + return current_osc->phMod(phmod_proportion); + } + + /** Set the MetaOsc frequency with an unsigned int. @param frequency to play the wave table.*/ inline From 0e722b075e290238fcdb540c84f62cfe5ce15739 Mon Sep 17 00:00:00 2001 From: j-enns <38088930+j-enns@users.noreply.github.com> Date: Fri, 27 Feb 2026 22:41:52 -0700 Subject: [PATCH 2/5] Update MetaOscil.h make last value unnecessary, as in the comments otherwise if final freq is left off this is always true --- MetaOscil.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MetaOscil.h b/MetaOscil.h index 9758eb0ce..5f4dc61b2 100644 --- a/MetaOscil.h +++ b/MetaOscil.h @@ -166,7 +166,7 @@ template current_osc->setFreq(frequency); } - else if (frequency > cutoff_freqs[N_OSCIL-1]) + else if (frequency > cutoff_freqs[N_OSCIL-2]) { oscillators[N_OSCIL-1]->setPhaseFractional(current_osc->getPhaseFractional()); current_osc = oscillators[N_OSCIL-1]; From 71a04b949c64f78767fd18271f8030d248d341c0 Mon Sep 17 00:00:00 2001 From: j-enns <38088930+j-enns@users.noreply.github.com> Date: Sat, 28 Feb 2026 09:58:22 -0700 Subject: [PATCH 3/5] Update setFreq update setFreq to use last oscil for all frequencies above the penultimate cutoff, regardless of if the last oscillator has a cutoff frequency set --- MetaOscil.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MetaOscil.h b/MetaOscil.h index 5f4dc61b2..f363bf877 100644 --- a/MetaOscil.h +++ b/MetaOscil.h @@ -174,7 +174,7 @@ template } else // dichotomic search { - byte low_point = 0, high_point = N_OSCIL-1, mid_point = (N_OSCIL-1)>>1; + byte low_point = 0, high_point = N_OSCIL-2, mid_point = (N_OSCIL-1)>>1; while(low_point != high_point) { if (frequency > cutoff_freqs[mid_point]) low_point = mid_point+1; From d62c349c0214492dc1188ae5ba978235e7253228 Mon Sep 17 00:00:00 2001 From: j-enns <38088930+j-enns@users.noreply.github.com> Date: Sat, 17 Oct 2026 16:21:21 -0700 Subject: [PATCH 4/5] Update MetaOscil.h --- MetaOscil.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MetaOscil.h b/MetaOscil.h index f363bf877..5f4dc61b2 100644 --- a/MetaOscil.h +++ b/MetaOscil.h @@ -174,7 +174,7 @@ template } else // dichotomic search { - byte low_point = 0, high_point = N_OSCIL-2, mid_point = (N_OSCIL-1)>>1; + byte low_point = 0, high_point = N_OSCIL-1, mid_point = (N_OSCIL-1)>>1; while(low_point != high_point) { if (frequency > cutoff_freqs[mid_point]) low_point = mid_point+1; From 6d9f358b3e54b491c8ee3ad654b330f3beb262ea Mon Sep 17 00:00:00 2001 From: j-enns <38088930+j-enns@users.noreply.github.com> Date: Sat, 17 Oct 2026 16:33:00 -0700 Subject: [PATCH 5/5] Update MetaOscil.h --- MetaOscil.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MetaOscil.h b/MetaOscil.h index 5f4dc61b2..9758eb0ce 100644 --- a/MetaOscil.h +++ b/MetaOscil.h @@ -166,7 +166,7 @@ template current_osc->setFreq(frequency); } - else if (frequency > cutoff_freqs[N_OSCIL-2]) + else if (frequency > cutoff_freqs[N_OSCIL-1]) { oscillators[N_OSCIL-1]->setPhaseFractional(current_osc->getPhaseFractional()); current_osc = oscillators[N_OSCIL-1];