## Tuning with physical modelling

Jun 04 2014 | 4:34 am
Hello everyone. I desperately need your help. I have found this patch done by David Ronan for his dissertation, and I was trying to fix the tuning of this patch. I have tried to reduce the vector size, to subtract a delay equal to one sample from the delay given to tapout~, but I had no success.
Since in the patch there are several parts where the delay is used, shall I "correct" them everywhere?
I look forward to hearing from you. Thanks a lot
S.

• Jun 04 2014 | 4:25 pm
Sorry for bumping this: I have tried also to put what you can see in the screenshot every time that a pitch is received, but no success with this either.
Anyone? Thanks a lot.
S.
• Jun 04 2014 | 9:14 pm
What exactly do you mean by fix? I've not actually run the patch, but it looks pretty complete.
• Jun 04 2014 | 9:21 pm
Hi Mark. The problems are mainly 2: - it loads with an error message "bad argument" that I can't correct - the tuning is not working (especially above the 2nd octave)
Is there any way to fix these two problems? Thank you very much
• Jun 05 2014 | 10:49 am
Hi tuning the KS algorithm is tricky in the upper register, for complex mathematical reasons that I don't understand. In Max, you probably know that the sigvs restricts the maximum allowable upper frequency, or delaytime to [tapout~]. I usually cheat by manipulating the frequency of the delay line tuning, so the tuning discrepancy is distributed across the octave(s) mean-temperament style, cos my maths sux:
Brendan
• Jun 05 2014 | 11:41 am
. . . .  equal temperament
• Jun 05 2014 | 1:58 pm
The bad tuning is introduced by rounding the delay times to a fixed multiple of the signal vector size. There are two ways to "fix" the rounding errors introduced by the signal vector size: Set the sigv to 1 (eventually put the patch into a poly~ with @sigv 1) and/or use a higher sampling rate. You don't need to set the sigv to 1 if you use a gen~ based Karplus-Strong patch (the feedback in gen~ can be 1 sample). There will still be an error, but in a much higher pitch range (you don't want to hear these high pitches, be they tuned or not...;-)
hope that explains the effect...
Stefan
• Jun 05 2014 | 6:04 pm
Hi Brendan (TERRIBLY SORRY, I FORGOT THE LAST N THE FIRST TIME I WROTE IT HAHA), Hi Stefan, thank you for your help.
I've tried Stefan's solution to reduce the sigvs to 1, but the cpu just goes nuts (the default value when this patch is loaded is 8). Having a look at the patch, where should I put the poly~ within the poly~? I mean having the two waveguides, shall I put it in both? OR, do you reckon it would be easier to "convert" all that patch with a "gen~-based"?
Thank you very much!
• Jun 05 2014 | 9:05 pm
Hi 1. thanks to stefan for reminding me (us) of the poly 'upsampling' solution, and gen; 2. if you're tackling David Ronan's example, you might want to read and interrogate his equations for DWG string synthesis - beyond me I'm afraid; 3. take care with the lowpass filter on the delay line output, it can impact upon tuning at high frequencies; 4. my vote goes for both gen~ and a low sigvs:
HTH
Brenda(n)
• Jun 05 2014 | 9:07 pm
and this, from David Ronan:
Ignore my contributions to this 4yr-old thread; damn I was (am) such a n**b
• Jun 06 2014 | 9:20 pm