History

Fix lfo depth

Davis Polito committed 4 years ago

Commit 80fdd361 parent 8190e161 file · +4 −4Browse files

Unified · Split

leaf/Src/leaf-oscillators.c+4−4
@@ -2912,7 +2912,7 @@ float tSquareLFO_tick(tSquareLFO* const cy) · 2911 unmodified lines
2912 // Phasor increment2912 // Phasor increment
2913 float a = tIntPhasor_tick(&c->phasor);2913 float a = tIntPhasor_tick(&c->phasor);
2914 float b = tIntPhasor_tick(&c->invPhasor);2914 float b = tIntPhasor_tick(&c->invPhasor);
2915 float tmp = ((a - b)) + c->pulsewidth - 1.0f;2915 float tmp = ((a - b)) + c->pulsewidth - 0.5f;
2916 return 2 * tmp;2916 return 2 * tmp;
2917}2917}
2918 2918
@@ -2974,7 +2974,7 @@ void tSawSquareLFO_free (tSawSquareLFO* const cy) · 55 unmodified lines
2974float tSawSquareLFO_tick (tSawSquareLFO* const cy)2974float tSawSquareLFO_tick (tSawSquareLFO* const cy)
2975{2975{
2976 _tSawSquareLFO* c = *cy;2976 _tSawSquareLFO* c = *cy;
2977 float a = tIntPhasor_tick(&c->saw);2977 float a = (tIntPhasor_tick(&c->saw) - 0.5f ) * 2.0f;
2978 float b = tSquareLFO_tick(&c->square);2978 float b = tSquareLFO_tick(&c->square);
2979 return (1 - c->shape) * a + c->shape * b; 2979 return (1 - c->shape) * a + c->shape * b;
2980}2980}
@@ -3081,7 +3081,7 @@ void tTriLFO_setFreq(tTriLFO* const cy, float freq) · 100 unmodified lines
3081void tTriLFO_setPhase(tTriLFO* const cy, float phase)3081void tTriLFO_setPhase(tTriLFO* const cy, float phase)
3082{3082{
3083 _tTriLFO* c = *cy;3083 _tTriLFO* c = *cy;
3084 3084 phase = (phase + 0.5f);
3085 int i = phase;3085 int i = phase;
3086 phase -= i;3086 phase -= i;
3087 c->phase = phase * TWO_TO_32_INT;3087 c->phase = phase * TWO_TO_32_INT;
@@ -3110,7 +3110,7 @@ void tSineTriLFO_initToPool (tSineTriLFO* const cy, tMempool* const mp) · 22 unmodified lines
3110 LEAF* leaf = c->mempool->leaf;3110 LEAF* leaf = c->mempool->leaf;
3111 tTriLFO_initToPool(&c->tri,mp);3111 tTriLFO_initToPool(&c->tri,mp);
3112 tCycle_initToPool(&c->sine,mp); 3112 tCycle_initToPool(&c->sine,mp);
3113 3113
3114}3114}
3115void tSineTriLFO_free (tSineTriLFO* const cy)3115void tSineTriLFO_free (tSineTriLFO* const cy)
3116{3116{

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t