Forums > MaxMSP

Tuning with physical modelling

June 3, 2014 | 9:34 pm

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.

Attachments:
  1. Sitar.zip

June 4, 2014 | 9:25 am

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.

Attachments:
  1. Screen-Shot-2014-06-04-at-17.24.11

June 4, 2014 | 2:14 pm

What exactly do you mean by fix? I’ve not actually run the patch, but it looks pretty complete.


June 4, 2014 | 2: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


June 5, 2014 | 3: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:

– Pasted Max Patch, click to expand. –

Brendan


June 5, 2014 | 4:41 am

. . . . [edit] equal temperament


June 5, 2014 | 6:58 am

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


June 5, 2014 | 11:04 am

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!

  • This reply was modified 3 months by  pianolife.

June 5, 2014 | 2: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:

– Pasted Max Patch, click to expand. –

HTH

Brenda(n)


June 5, 2014 | 2:07 pm

and this, from David Ronan:

http://cycling74.com/forums/topic/bidirectional-digital-waveguide/

Ignore my contributions to this 4yr-old thread; damn I was (am) such a n**b


June 6, 2014 | 2:20 pm

addendum

4a. gen~ is all you need:

– Pasted Max Patch, click to expand. –

. . . like what stefan said


June 7, 2014 | 6:03 am

Thank you very much!!!! I’ve got a better tuning without using gen~ (I changed a bit the delay patch, and I got rid of the onepole~, as suggested by BrendaN. The only problem I’m struggling with now is to set the velocity 0 to mute the notes. They go on "forever", although I can free the voices in the poly~ object. How can I mute the notes using velocity 0? What I’ve done so far (in other patches) was using a sustain point in the line~ object. But there’s no such a thing here… Any ideas? Thank you so much!!


Viewing 12 posts - 1 through 12 (of 12 total)