thanks Julius! i'll see what i can find out on this front when i have some time. i'm not interested in a toy piano per se but a moderately accurate standard piano string model. actually in my web research i was surprised not to see very much out there in terms of useable code demos. there's loads of useful information on CCRMA in your amazing and excellent free book, but i'm a total math dunce - as in 'dragged myself kicking and screaming through algebra' math dunce.
so i'm looking for an existing object (Csound opcode, PD object (not Max object), C++ i could possibly port, Faust code) that has a moderately convincing real time piano string model. about the best example i found is this object for ChucK called Sympia, by Julian Faust ( https://sites.google.com/site/julianfaust/projects/coupled-piano-strings). there's also the prepiano opcode and the ppiano~ object in Max from Stefan Bilbao but that's a prepared piano not a standard one. i found a Ruby based physical model from Scott Van Duyne (with additive synthesis i think) here: https://ccrma.stanford.edu/software/snd/snd/piano.rb i'm imagining you're likely familiar with all of these, as well as most of the papers on the subject. so if i'm starting from Romain's examples in the faustlib, the closest one i can think of is this one, the steel string model. i found the code in the library folder: elecGuitar_ui_MIDI = elecGuitar(stringLength,pluckPosition,1,gain,gate)*outGain with{ f = hslider("v:elecGuitar/h:[0]midi/[0]freq[style:knob]",440,50,1000,0.01); bend = hslider("v:elecGuitar/h:[0]midi/[1]bend[hidden:1][midi:pitchwheel][style:knob]" ,1,0,10,0.01) : si.polySmooth(gate,0.999,1); gain = hslider("v:elecGuitar/h:[0]midi/[2]gain[style:knob]",0.8,0,1,0.01); s = hslider("v:elecGuitar/h:[0]midi/[3]sustain[hidden:1] [midi:ctrl 64][style:knob]",0,0,1,1); pluckPosition = hslider("v:elecGuitar/[1]pluckPosition[midi:ctrl 1]",0.8,0,1,0.01) : si.smoo; outGain = hslider("v:elecGuitar/[2]outGain",0.5,0,1,0.01); t = button("v:elecGuitar/[3]gate"); gate = t+s : min(1); freq = f*bend; stringLength = freq : f2l; }; but it seems to me that a piano string would be stiffer and of course have between one and three actual strings played by a struck hammer for a designated pitch, rather than a pluck. i do know that Romain has physical components - his Bi-Directional Utilities and Elements in the physmod library could likely be applicable but i have no idea how to hook these together. i'm figuring it's not as easy as just running this example through a dispersion allpass filter. i did find this lecture by Romain which might contain some clues worthy of study: https://ccrma.stanford.edu/~rmichon/faustTutorials/#simple-virtual-string-example my eventual goal is to use this as a starting point for creating an instrument that would be controllable inside PD that would be able to explore further boundaries timbrally and expressively beyond that of 'semi-accurate piano string model'. i have had some creative fun in PD with a percussively-oriented Karplus model i found which i duplicated three times and added a Spread control to detune the frequencies of the allpass which occasionally can sound barely like a honky tonk piano in certain registers. i did also find a PD object that is a port of a Mutable Instruments oscillator module called Plaits that has a stiff string model in it. i looked through the code and it does appear to reference a dispersion allpass filter. it's definitely not trying to sound like a piano string, but does have variable inharmonicity. at any rate, any help you or anyone can offer is certainly appreciated! best, scott On Sat, May 25, 2019 at 2:40 PM Julius Smith <j...@ccrma.stanford.edu> wrote: > Hi Scott, > > I added the piano dispersion filter to the library because it was so > easy to encapsulate that nice paper (cited in the comments) in > ready-to-use form. We should all do this! I'm not using it yet > myself, but I hope to when I circle back around to piano modeling. If > you send me a clean toy piano example without a dispersion filter in > its waveguide strings, I'll send it back to you with a tested > dispersion filter installed, and I'll add it to the examples if nobody > objects. > > Romain Michon has written many examples with strings, so I'd start > with (or just find) one of those. > > Cheers, > - Julius > > On Tue, May 21, 2019 at 10:51 AM Scott R. Looney <scottrloo...@gmail.com> > wrote: > > > > hey there, just joined the list and i am a complete newbie to FAUST, > having attended a one day seminar about two years ago @ CCRMA. additionally > i have no math skills to speak of and only a smattering of programming > experience in C++ - i mostly script in C#. > > > > so, i was wondering if some generous soul were working on modelling > piano strings and used the dispersion filter in FAUST in a working example. > i can see the filter listed there and its ostensible usage, but i have > absolutely no clue how to apply it. i would like to use it to model both a > normal string behavior as well as being able to tweak, twist and mangle the > output to get more unusual results. > > > > i'm not feeling a lot of interest in the list, as i searched for > 'dispersion' and came up with exactly one mention - when the filter code > was incorporated into the FAUST library, which was about 11 years ago. > would be really nice if someone made an example piano instrument to play > around with, but i'm not holding out a lot of hope.... > > > > best, > > scott > > _______________________________________________ > > Faudiostream-users mailing list > > Faudiostream-users@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/faudiostream-users > > > > -- > > Julius O. Smith III <j...@ccrma.stanford.edu> > Professor of Music and, by courtesy, Electrical Engineering > CCRMA, Stanford University > http://ccrma.stanford.edu/~jos/ >
_______________________________________________ Faudiostream-users mailing list Faudiostream-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/faudiostream-users