pouët.net

Go to bottom

Physical modeling of an acoustic guitar.

category: code [glöplog]
I recently did for Chaos Construction 2011 demo:
http://tuapse-mikle.narod.ru/SpainGuitar.zip
This is not a midi, no samples, no generators with filters - each string guitar is represented as a chain of goods associated springs, damping is introduced. Visual prototype to check:
http://tuapse-mikle.narod.ru/VisualString.zip
Here, for clarity, the rate decreased in 1000.
Now I work on the sound of metal strings:
http://tuapse-mikle.narod.ru/Guitar.zip
I want to implement a plug-in for public use that would generate such samples.
added on the 2011-09-06 09:42:45 by Mikle Mikle
Wow, that sounds really nice. I don't know about physical modelling, any chance to make it realtime?
added on the 2011-09-06 15:46:30 by xTr1m xTr1m
Very cool!
The metal strings version needs distortion ;)
added on the 2011-09-06 15:56:04 by xernobyl xernobyl
Sample generation time is much shorter than the time of his sound, despite the fact that a program written in Visual Basic 6, so that realtime is possible.
Distortion must be post-effects, as the sum of the signals processed distortion does not sound like the sum of signal distortion treated separately.
added on the 2011-09-06 16:12:05 by Mikle Mikle
so what's this? a computer simulation of guitar strings?
sounds a bit wah-wah sometimes, and slightly digitalis at some points, but besides that very nice. Inspiring! I should look more into physicaal modelling myself.
added on the 2011-09-06 21:26:33 by numtek numtek
Sounds like standard Karplus/Strong to me.
added on the 2011-09-06 21:45:47 by hfr hfr
Can't do karplus/strong without filtering of some kind ... at least if the "no generators with filters"-part is to be taken for what it says ;)
added on the 2011-09-06 22:21:41 by Punqtured Punqtured
@Punqtured: Well, I made a Karplus-Strong based tracker ~20 years ago (w/o knowing the name of that algorithm) and this is not just KS. :D

@Mikle: The SpainGuitar one did not really convince me (would probably have worked better with 70ies funk!) but the metal one was quite good. now SHOW US YOUR powerchords (with overdrive, s’il vous plaît!)
added on the 2011-09-06 23:11:15 by xyz xyz
i really like the idea of pm, but making it sound interesting is really hard.
to make it useful as an artistic tool it needs sth special, rather unphysical.

accurate and fast string simulation i know is ftm-string:
added on the 2011-09-07 02:07:50 by Bird Bird
Spain Guitar - a simulation of an entire guitar with nylon strings. There is a mutual influence of the strings through the nut, it is possible to drown out the string, make a flageolet. There are a couple of resonances and reverberation case.
Guitar - it is only the sound of a steel string.
On Karplus, in my opinion, it does not seem. Maybe I did not see those demos with Karplus.
added on the 2011-09-07 07:55:15 by Mikle Mikle
xyz:
"accurate and fast string simulation i know is ftm-string:"
Size is important, I make a plugin for demoscene.

P.S.
Pardon my English - it's translator Google.
added on the 2011-09-07 08:00:24 by Mikle Mikle
xTr1m, we used it for 195/95/256.

Here is some of the physically based instruments we designed back in 2005 (although we only used a couple of them in the end). www.iquilezles.org/trastero/sound.zip. Emjoy!!

added on the 2011-09-07 08:13:28 by iq iq
It is cool as an experiment, however it sounds just unconvincing. Check this implementation of much simpler Karplus-Strong algorithm with guitar body simulation through LP resonant filter, I think it sounds much more convincing.

I think the reasons of unrealistic sound in your synth is lack of guitar body simulation, and not very realistic music data, with too perfect timings.
added on the 2011-09-07 08:52:17 by Shiru Shiru
Spain guitar doesn't sound guitar at all, but metal one could be convincing with right kind of playing data.

Biggest part of the guitar sound is playing style. Even best physical modeled guitar will sound like harpsichord if played like piano and non-guitar sounds remind of guitar if you play them like guitar (single note pitch bends while other strings are sustaining, play guitar chords instead of triads, simulate strumming by having small delay between notes and so on).

added on the 2011-09-07 09:26:53 by sauli sauli
In Can I have my pills now I used lots of KS strings, with and without post-processing for the clavinet-like sound and the "space guitar".
added on the 2011-09-07 09:38:33 by trc_wm trc_wm
I demand sourcecode to rip from! Nice sounding stuff sounds nice.
added on the 2011-09-07 10:23:07 by las las
I fully agree that realism is not realistic enough initial data, the musical score.
trc_wm:
Sound nice, but not real.
iq:
I liked the harmonica and bowed instruments
las:
Here the source demos Spain Guitar and editor score:
http://tuapse-mikle.narod.ru/SpainGuitarSrc.zip
But this is Visual Basic 6 and complete lack of comments :).
added on the 2011-09-07 11:40:29 by Mikle Mikle
@Mikle can you post samples; I'm not on windows.
added on the 2011-09-07 18:08:56 by trc_wm trc_wm
how does it work, when developing? FFT analysis of a recorded sound, trying to find a function that mimics amplitude for the frequency over time? like: sin(a)*sin(a1)+sin(b)*sin(b1)+sin(c)+sin(d) ? or what kind of math is involved?
added on the 2011-09-07 19:48:56 by jaw jaw
@y Shiru : thanks, I was looking for that exct same link :) Rather convincing indeed.
added on the 2011-09-07 20:00:44 by numtek numtek
@trc_wm
Here demo with mp3:
http://ftp.scene.org/file.php?file=%2Fparties%2F2011%2Fchaosconstructions11%2Fcombined_32k_exe_music%2Fspainguitar_2.zip&fileinfo
@trc_wm
Look at sources:
Code: For i = 1 To St(SS).stLen - 1 St(SS).s(i) = St(SS).s(i) + ((St(SS).p(i - 1) + St(SS).p(i + 1)) * 0.5 - St(SS).p(i)) * St(SS).LFrc Next i For i = 1 To St(SS).stLen - 1 St(SS).s(i) = St(SS).s(i) * St(SS).k1 + (St(SS).s(i - 1) + St(SS).s(i + 1)) * St(SS).k2 Next i For i = 1 To St(SS).stLen - 1 St(SS).p(i) = St(SS).p(i) + St(SS).s(i) Next i

s(i) - speed
p(i) - position
LFrc - force devided by mass
added on the 2011-09-08 09:00:24 by Mikle Mikle
iq: Where can I learn how to synthesize such sounds? I got curious and would like to read something :)
added on the 2011-09-08 09:31:37 by xTr1m xTr1m
uncovering static's synth is physical modelling btw.
(we also used karplus strong our mid 2000s 64ks)
added on the 2011-09-08 09:53:03 by smash smash
jaw: something like that was what i did for the timpani sounds in uncovering static. i didnt do the spectrum analysis myself, i found a frequency/time/amplitude plot in the internet and rebuilt i think the 8 most dominant freqs with sine oscs and fiddled the envelope settings until it sounded good enough.

the rest of the instruments like the snare, bowed string, brass/woodwind, piano are all based on feedback delays, using various types of filters before during and after the loop to control and shape the spectrum. also controlled randomness for certain parameters helps a lot to make the sounds a lot more natural.

there are other ways of doing PM of course, but waveguides (delay based approach) is imho the most easy and compact way to do and gets you pretty far already.

and sauli is totally right. the best modelled instrument will sound like crap if it is not played right. i noticed that especialy for the bowed strings we used. they didnt change at all from first incarnation to actual intro usage but sounded completely different and way better in the end after reed had given it a proper score to play instead of me hitting randon notes on the keyboard during testing :)



added on the 2011-09-08 11:25:11 by gopher gopher

login

Go to top