History

tTapeDelay fixes.

mulshine committed 7 years ago

Commit dba87511 parent 579b8192 files · +5 −7Browse files

Unified · Split

2 files
  1. LEAF/Inc/leaf-mempool.h +1 −1
  2. LEAF/Src/leaf-delay.c +4 −6
LEAF/Inc/leaf-mempool.h+1−1
@@ -50,7 +50,7 @@ extern "C" { · 49 unmodified lines
5050
5151 //==============================================================================
5252
53−#define MPOOL_POOL_SIZE 3000000
53+#define MPOOL_POOL_SIZE 500000
5454 #define MPOOL_ALIGN_SIZE (8)
5555
5656 //#define size_t unsigned long
LEAF/Src/leaf-delay.c+4−6
@@ -413,8 +413,6 @@ float tDelayA_getGain (tDelayA* const d) · 412 unmodified lines
413413 void tTapeDelay_init (tTapeDelay* const d, float delay, uint32_t maxDelay)
414414 {
415415 d->maxDelay = maxDelay;
416−
417− d->delay = LEAF_clip(1.f, delay, d->maxDelay);
418416
419417 d->buff = (float*) leaf_alloc(sizeof(float) * maxDelay);
420418
@@ -427,7 +425,7 @@ void tTapeDelay_init (tTapeDelay* const d, float delay, uint32_t maxDelay) · 6 unmodified lines
427425 d->inc = 1.0f;
428426 d->inPoint = 0;
429427
430− tTapeDelay_setDelay(d, 1.f);
428+ tTapeDelay_setDelay(d, delay);
431429 }
432430
433431 void tTapeDelay_free(tTapeDelay* const d)
@@ -438,7 +436,7 @@ void tTapeDelay_free(tTapeDelay* const d) · 4 unmodified lines
438436
439437 int count = 0;
440438
441−#define SMOOTH_FACTOR 10.f
439+//#define SMOOTH_FACTOR 10.f
442440
443441 float tTapeDelay_tick (tTapeDelay* const d, float input)
444442 {
@@ -459,11 +457,11 @@ float tTapeDelay_tick (tTapeDelay* const d, float input) · 14 unmodified lines
459457 float diff = (d->inPoint - d->idx);
460458 while (diff < 0.f) diff += d->maxDelay;
461459
462− d->inc = 1.0f + (diff - d->delay) / d->delay * SMOOTH_FACTOR;
460+ d->inc = 1.0f + (diff - d->delay) / d->delay; //* SMOOTH_FACTOR;
463461
464462 d->idx += d->inc;
465463
466− if (d->idx >= d->maxDelay) d->idx = 0.f;
464+ if (d->idx >= d->maxDelay) d->idx = 0.0f;
467465
468466 return d->lastOut;
469467 }

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