Plucked string waveguide Karlpus-Strong model
Does anyone have a patch with the basic form of the Karplus-Strong algorithm or some other similar implementation for a waveguide physical model of a plucked string?
Cheers,
D
Here's a Max for Live synth I made....
A basic maxpatch just to demonstrate the algorithm:
And.... one more for good measure:
Hope that helps...
Thanks, that is very helpful.
Do you know if there's any way around the 1.5 ms limit? Basically I've created a graphic scoring/live performance system in Max/MSP, that allows the user to write a score in graphic (XY) form and then to perform live interacting with the score itself. To replay the scored material in performance mode I have included a number of synths in the patch (additive, FM , and so on) and I wanted to include a waveguide string synth too, however the interface allows the user to score tones across the entire audible range so I need a synth that can go up to 20kHz (or there about), so basically i was wondering whether anyone had found a way around the 1.5 ms limit (but i guess not because of the limitations in MSP's signal rate).
D
the 1.5ms limitation actually comes from the vector size. If you set the signal vector size to something less than 64 samples you'll have the possibility to make shorter delays (which will give you the higher frequencies).
yeh but to get to 20kHz with a Karplus-Strong algorithm I'd have to sacrifice the audio quality of the entire patch (including the quality of all the other synths in it, some of which are fairly realistic)
see the end of this thread re [tapin~] v [delay~]:
and my contribution to the string model examples:
Brendan
csound [csound~], RTcmix [rtcmix~] and ChucK [chuck~] all have good implementations of the K-S algorithm plus other fun physical models with no restrictions on vector size. The RTcmix version also has the snazzy Charles Sullivan enhancements allowing feedback/distortion.
@DC-omix:
you need to look into [poly~] more. with poly~ you can stick just your K-S in it, set its own samplerate and vector and get higher freqs, without sacrificing your other synths. poly~ is the coolest object in max. in fact not an object but a whole world in itself. however, 20kHz karplus-strong is gonna sound like shite whichever way you do it...
@brad +
yes brad is correct. for physical modelling use [csound~] and/or brad's AWESOME externals [chuck~] and [rtcmix~]
@everyone
does anyone know whatever happened to the 'percolate' project? it is SUCH a shame this never saw any light since max5. anyone know if anyone is actively thinking of working on this? it would be amazing to have updated percolate library.
the coolest PM max stuff i ever saw was manuel poletti's patches around the ircam 'modallys' library. however, last i looked, this was lingering in the same crap state as so much other COOL ircam software - max4 and no news of an update.
sorry for slight thread hijack.
Ah -- forgot to mention the PeRColate objects, too. They're still there, just checked and they seem to work fine w/ Max 5.1.7:
@pid
yeah i realise a K-S model synth isn't going to sound great at the higher end of the frequency range, but the option to use it at those frequencies has to be there since the program is being made for use in experimental composition. It may not be desirable to use the synth for such high pitches, but there may be a few people who wish to do so, so the option has to be there.
anyway, thanks for the advice, i'll look into re-patching the K-S with [poly~].
@DC-omix, i was just being a twat. i'd actually be one of those people "...who wish to do so..." myself afterall. saw some of your vids lately btw... awesome!
@pid
Thanks. glad you enjoyed them, I was thinking of doing some videos where I explain how some of the software I have created works and also making the software available. I've just never been really sure there would be many people interested in the kind of crazy stuff I do, I guess it's just a case of making the stuff available and people who are interested in that sort of thing will eventually come across it.
Anyway, I'm still debating whether to include the K-S synth in my new system. Basically it's tetraphonic with four different types of sound being controlled to produce four independent frequencies at any one time, the first is an additive organ/violin-type synth, the second is an FM tuned percussion (bell-type) synth, the third has a wind instrument-type sound and for the fourth I was thinking of including a plucked string sound, but there are other possible candidates such as a granular synth. does anyone have any suggestions as to what type of sound would be a good candidate to interact with other three?
(sorry for hijacking the thread)
@Brad I cannot figure out what needs to be done to install PeRcolate. I keep getting Object missing and I know that it is in the search path. I followed the instructions.
@saulpimson
what OS you on? I have v0.9b5 for winVista here working fine, I could zip the lot for you if you want
Brendan
brendan brings up a good point -- windows or mac? Olaf Matthes did the windows port. We have it linked from Columbia, but we only have the mac version on our site.
All I did was drag the PeRColate-UB and PeRColate-support folders into my Applications/Max5/Cycling '74/ folder and they worked fine.
I'm using Mac osx 10.6.6
I misread the instructions and put the PeRColate-UB and PeRColate-support folders in the Support folder (Applications/Max5/Cycling '74/Support)
They are working now.
I'm a student in computer music and after discovering the Karplus-Strong algorithm, I've been really intrigued to find and build some more physical modeling patches. Can anyone recommend any other algorithms that would be fun and interesting to build a .maxpat synth from?
Hi Mike
if you're thinking of DIY patches, I had great fun recreating instrument models using the soundonsound synthesis tutorials here:
if you're after more 'mathematical' models, I've no doubt a quick google of 'physical modelling' would give you an endless supply....
and hacking existing examples, such as Dave Bessell's excellent synths,
http://madwiki.beds.ac.uk/madwiki/index.php/User:Dave
is also fun!
Brendan
Hi there.
How comes that the more I filter the feedback signal, the lower are pitches in the high range ?
Thanks for your lights !
because an ordinary filter is a frequency dependent delay.
you are supposed filter the impuls(es) instead!
you are supposed filter the impuls(es) instead!
no, this is something else.
the question was about a (lowpass-) filter in the feedback path - this models the natural damping of high frequency content over time.
Thanks for the answer. I'm not sure I really understand, but I'll think about it !
and what is a solution, volker?
i wouldnt dare to do that inside the feedback loop already.
the freqency is known, so you could just use an envelope for the post filter, no?
a lowpass filter inside the feedback loop is an important building block of many physical models. Depending on the other (possibly non-linear) ingredients in the feedback path, you can't get the same results by filtering the output (+envelope).
One solution is to use a linear-phase filter (which might or might not be overkill), where the introduced delay is know (and equal for all frequencies!).
a simple recursive filter, like onepole~, has a non-linear phase response (check the onepole~ help patch!), i.e. frequency components entering the filter, will be delayed by differing amounts. That leads to the resulting spectrum being slightly inharmonic (the degree depends on the cutoff frequency). This sounds quite nice, imho, and can appear to be more "natural" than a "mathematical correct" harmonic spectrum.
But it also affects pitch perception :)
You could try to calculate the time delay (correspoding to the actual cutoff freq) of the fundamental frequency and use that value to correct the delay time of your karplus-strong thing (see sketch below). Of course this will not undo the inharmonicity of the onepole~.
Or you might get fancy and try to "correct" the phase-nonlinearity of the filter by cascading an allpass filter, that has an opposite phase response...
But things are worse even, as the delay line uses interpolation to allow for sub-sample delay times. This is a kind of lowpass filtering, too and you get more inconsistencies of the resulting spectrum - it's as always, if you dig deeper and deeper, it get's more and more complicated...
hm, i already ran into this too often; when you use a symetrical tranfer function you dont really know how long it is and then i end up introducing 500 ms of latency which fucks up the application. (latency in a generator, haha)
why it wont work with other filter types i clear to me - but i dont grasp how a frequency filter could be of any use inside the feed back loop, i.e. i would be interested what the idea CF´s attempt was.
i assume it performs job like ... making the damping depending on the gain of the exiter and things like that? until now i only controlled the spectrum of the exciter or put a post filter. maybe it is time for a change.