| @@ -555,8 +555,6 @@ static void livingstring_init(tLivingString* const pl, float freq, float pick · 554 unmodified lines |
| 555 | p->decay = decay; | 555 | p->decay = decay; |
| 556 | p->prepIndex = prepIndex; | 556 | p->prepIndex = prepIndex; |
| 557 | p->levMode = levMode; | 557 | p->levMode = levMode; |
| 558 | tLivingString_setFreq(pl, freq); | | |
| 559 | tLivingString_setPickPos(pl, pickPos); | | |
| 560 | } | 558 | } |
| 561 | | 559 | |
| 562 | void tLivingString_init(tLivingString* const pl, float freq, float pickPos, float prepIndex, | 560 | void tLivingString_init(tLivingString* const pl, float freq, float pickPos, float prepIndex, |
| @@ -564,9 +562,11 @@ void tLivingString_init(tLivingString* const pl, float freq, float pickPos, f · 1 unmodified line |
| 564 | float levStrength, int levMode) | 562 | float levStrength, int levMode) |
| 565 | { | 563 | { |
| 566 | _tLivingString* p = *pl = (_tLivingString*) leaf_alloc(sizeof(_tLivingString)); | 564 | _tLivingString* p = *pl = (_tLivingString*) leaf_alloc(sizeof(_tLivingString)); |
| 567 | | 565 | |
| 568 | tExpSmooth_init(&p->wlSmooth, leaf.sampleRate/freq, 0.01); // smoother for string wavelength (not freq, to avoid expensive divisions) | 566 | tExpSmooth_init(&p->wlSmooth, leaf.sampleRate/freq, 0.01); // smoother for string wavelength (not freq, to avoid expensive divisions) |
| 569 | tExpSmooth_init(&p->ppSmooth, pickPos, 0.01); // smoother for pick position | 567 | tExpSmooth_init(&p->ppSmooth, pickPos, 0.01); // smoother for pick position |
| | 568 | tLivingString_setFreq(pl, freq); |
| | 569 | tLivingString_setPickPos(pl, pickPos); |
| 570 | tLinearDelay_init(&p->delLF,p->waveLengthInSamples, 2400); | 570 | tLinearDelay_init(&p->delLF,p->waveLengthInSamples, 2400); |
| 571 | tLinearDelay_init(&p->delUF,p->waveLengthInSamples, 2400); | 571 | tLinearDelay_init(&p->delUF,p->waveLengthInSamples, 2400); |
| 572 | tLinearDelay_init(&p->delUB,p->waveLengthInSamples, 2400); | 572 | tLinearDelay_init(&p->delUB,p->waveLengthInSamples, 2400); |
| @@ -614,6 +614,8 @@ void tLivingString_initToPool (tLivingString* const pl, float freq, float · 41 unmodified lines |
| 614 | | 614 | |
| 615 | tExpSmooth_initToPool(&p->wlSmooth, leaf.sampleRate/freq, 0.01, mp); // smoother for string wavelength (not freq, to avoid expensive divisions) | 615 | tExpSmooth_initToPool(&p->wlSmooth, leaf.sampleRate/freq, 0.01, mp); // smoother for string wavelength (not freq, to avoid expensive divisions) |
| 616 | tExpSmooth_initToPool(&p->ppSmooth, pickPos, 0.01, mp); // smoother for pick position | 616 | tExpSmooth_initToPool(&p->ppSmooth, pickPos, 0.01, mp); // smoother for pick position |
| | 617 | tLivingString_setFreq(pl, freq); |
| | 618 | tLivingString_setPickPos(pl, pickPos); |
| 617 | tLinearDelay_initToPool(&p->delLF,p->waveLengthInSamples, 2400, mp); | 619 | tLinearDelay_initToPool(&p->delLF,p->waveLengthInSamples, 2400, mp); |
| 618 | tLinearDelay_initToPool(&p->delUF,p->waveLengthInSamples, 2400, mp); | 620 | tLinearDelay_initToPool(&p->delUF,p->waveLengthInSamples, 2400, mp); |
| 619 | tLinearDelay_initToPool(&p->delUB,p->waveLengthInSamples, 2400, mp); | 621 | tLinearDelay_initToPool(&p->delUB,p->waveLengthInSamples, 2400, mp); |