Csound Csound-dev Csound-tekno Search About

[Csnd] Modelling a piano like instrument: waveguide questions

Date2021-09-02 10:44
From"Jeanette C."
Subject[Csnd] Modelling a piano like instrument: waveguide questions
Hey hey,
I'd like to create a piano like instrument (for starters). Some research lead 
me to a paper about modelling a piano based on waveguides:
https://quod.lib.umich.edu/i/icmc/bbp2372.1987.013/--modeling-piano-sound-using-waveguide-digital-filtering?rgn=main;view=fulltext
The author basically works with one-dimensional bidirectional waveguides. I 
expect the work was based on general purpose programming language(s).

I ran into quite a few challenges starting out. waveguide1 with higher 
frequencies would quickly decay, far too fast. I experimented with different 
cutoff settings and, naturally, the feedback.

Reading about waveguides with junctions and two delay lines, I wonder: 
following the above paper, should I model one string with two waveguide1 
opcodes partially feeding back into each other?

Or is there perhaps a newer or different approach to modelling a piano that is 
easier to implement in Csound?

Best wishes and TIA,

Jeanette

-- 
  * Website: http://juliencoder.de - for summer is a state of sound
  * Youtube: https://www.youtube.com/channel/UCMS4rfGrTwz8W7jhC1Jnv7g
  * Audiobombs: https://www.audiobombs.com/users/jeanette_c
  * GitHub: https://github.com/jeanette-c

And when you say those words
It's the sweetest thing I've ever heard <3
(Britney Spears)

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2021-09-02 14:24
From"Peter P."
SubjectRe: [Csnd] Modelling a piano like instrument: waveguide questions
AttachmentsNone  

Date2021-09-02 16:08
FromMichael Gogins
SubjectRe: [Csnd] Modelling a piano like instrument: waveguide questions
Attachmentsfaust_piano.dsp  
Faust has a piano model that I have attached.

In theory this can be used with the Csound Faust opcodes, but unfortunately, although I have made many nice Csound instruments using Faust .dsp sources, this particular one does not work for me.

In theory you can get Faust to translate this to C++ code and make a plugin Csound opcode that way, but I haven't (yet?) been able to get that to work.

Anyway, this model looks fairly complete.

Regards,
Mike



-----------------------------------------------------
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Thu, Sep 2, 2021 at 9:24 AM Peter P. <peterparker@fastmail.com> wrote:
Jeanette,

* Jeanette C. <julien@MAIL.UPB.DE> [2021-09-02 11:44]:
> Hey hey,
> I'd like to create a piano like instrument (for starters). Some research
> lead me to a paper about modelling a piano based on waveguides:
> https://quod.lib.umich.edu/i/icmc/bbp2372.1987.013/--modeling-piano-sound-using-waveguide-digital-filtering?rgn=main;view=fulltext
> The author basically works with one-dimensional bidirectional waveguides. I
> expect the work was based on general purpose programming language(s).
>
> I ran into quite a few challenges starting out. waveguide1 with higher
> frequencies would quickly decay, far too fast. I experimented with different
> cutoff settings and, naturally, the feedback.
The pitch versus decay issue is already handled in the first paper by
Karplus&Strong, as is tuning issues (for high pitches, semitones can
amount to delay differences of less than one sample). You might want to
look there.

> Reading about waveguides with junctions and two delay lines, I wonder:
> following the above paper, should I model one string with two waveguide1
> opcodes partially feeding back into each other?
>
> Or is there perhaps a newer or different approach to modelling a piano that
> is easier to implement in Csound?
Also check the work by Clayton Otey,
http://large.stanford.edu/courses/2007/ph210/otey2/
which has some code here
https://github.com/claytonotey/qiano and a neat OteyPianoStrings class
in supercollider.

best, P

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Date2021-09-02 17:59
FromPartev Sarkissian <0000060b2ef1338e-dmarc-request@LISTSERV.HEANET.IE>
SubjectRe: [Csnd] Modelling a piano like instrument: waveguide questions

Along with Karplus-Strong, there's Julius Smith's page at CCRMA,

https://ccrma.stanford.edu/~jos/

Modeling,...  https://ccrma.stanford.edu/~jos/pasp/
and Struck string,... https://ccrma.stanford.edu/~jos/pasp/Ideal_Struck_String.html

Enjoy.
-PBS




-----Original Message-----
From: Michael Gogins <michael.gogins@GMAIL.COM>
To: CSOUND@LISTSERV.HEANET.IE
Sent: Thu, Sep 2, 2021 8:08 am
Subject: Re: [Csnd] Modelling a piano like instrument: waveguide questions

Faust has a piano model that I have attached.

In theory this can be used with the Csound Faust opcodes, but unfortunately, although I have made many nice Csound instruments using Faust .dsp sources, this particular one does not work for me.

In theory you can get Faust to translate this to C++ code and make a plugin Csound opcode that way, but I haven't (yet?) been able to get that to work.

Anyway, this model looks fairly complete.

Regards,
Mike



-----------------------------------------------------
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Thu, Sep 2, 2021 at 9:24 AM Peter P. <peterparker@fastmail.com> wrote:
Jeanette,

* Jeanette C. <julien@MAIL.UPB.DE> [2021-09-02 11:44]:
> Hey hey,
> I'd like to create a piano like instrument (for starters). Some research
> lead me to a paper about modelling a piano based on waveguides:
> https://quod.lib.umich.edu/i/icmc/bbp2372.1987.013/--modeling-piano-sound-using-waveguide-digital-filtering?rgn=main;view=fulltext
> The author basically works with one-dimensional bidirectional waveguides. I
> expect the work was based on general purpose programming language(s).
>
> I ran into quite a few challenges starting out. waveguide1 with higher
> frequencies would quickly decay, far too fast. I experimented with different
> cutoff settings and, naturally, the feedback.
The pitch versus decay issue is already handled in the first paper by
Karplus&Strong, as is tuning issues (for high pitches, semitones can
amount to delay differences of less than one sample). You might want to
look there.

> Reading about waveguides with junctions and two delay lines, I wonder:
> following the above paper, should I model one string with two waveguide1
> opcodes partially feeding back into each other?
>
> Or is there perhaps a newer or different approach to modelling a piano that
> is easier to implement in Csound?
Also check the work by Clayton Otey,
http://large.stanford.edu/courses/2007/ph210/otey2/
which has some code here
https://github.com/claytonotey/qiano and a neat OteyPianoStrings class
in supercollider.

best, P

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Date2021-09-02 19:37
From"Jeanette C."
SubjectRe: [Csnd] Modelling a piano like instrument: waveguide questions
Hi Partev, Michael and Peter,
many thanks for all your pointers and resources. I'm slowly making my way, 
hoping to gain something along the roa. :) It's definitely fun.

Best wishes,

Jeanette

-- 
  * Website: http://juliencoder.de - for summer is a state of sound
  * Youtube: https://www.youtube.com/channel/UCMS4rfGrTwz8W7jhC1Jnv7g
  * Audiobombs: https://www.audiobombs.com/users/jeanette_c
  * GitHub: https://github.com/jeanette-c

I love the things you say
And I love the love your touch conveys <3
(Britney Spears)

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2021-09-03 22:19
FromMichael Gogins
SubjectRe: [Csnd] Modelling a piano like instrument: waveguide questions
Okay, I got this to work. There is evidently a bug in the Faust `faust2csound` tool, which I figured out how to work around (it's easy).

The Faust piano does not sound nearly as good as the Pianoteq physically modelled VST plugin, but still, this opens the way to creating many new plugin opcodes from Faust code.


Regards,
Mike

-----------------------------------------------------
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Thu, Sep 2, 2021 at 2:36 PM Jeanette C. <julien@mail.upb.de> wrote:
Hi Partev, Michael and Peter,
many thanks for all your pointers and resources. I'm slowly making my way,
hoping to gain something along the roa. :) It's definitely fun.

Best wishes,

Jeanette

--
  * Website: http://juliencoder.de - for summer is a state of sound
  * Youtube: https://www.youtube.com/channel/UCMS4rfGrTwz8W7jhC1Jnv7g
  * Audiobombs: https://www.audiobombs.com/users/jeanette_c
  * GitHub: https://github.com/jeanette-c

I love the things you say
And I love the love your touch conveys <3
(Britney Spears)

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Date2021-09-04 09:42
FromVictor Lazzarini
SubjectRe: [Csnd] [EXTERNAL] Re: [Csnd] Modelling a piano like instrument: waveguide questions
If you let Yann Orlarey know about this bug, he'll fix very quickly.

Prof. Victor Lazzarini
Maynooth University
Ireland

On 3 Sep 2021, at 22:20, Michael Gogins <michael.gogins@gmail.com> wrote:



*Warning*

This email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.

Okay, I got this to work. There is evidently a bug in the Faust `faust2csound` tool, which I figured out how to work around (it's easy).

The Faust piano does not sound nearly as good as the Pianoteq physically modelled VST plugin, but still, this opens the way to creating many new plugin opcodes from Faust code.


Regards,
Mike

-----------------------------------------------------
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Thu, Sep 2, 2021 at 2:36 PM Jeanette C. <julien@mail.upb.de> wrote:
Hi Partev, Michael and Peter,
many thanks for all your pointers and resources. I'm slowly making my way,
hoping to gain something along the roa. :) It's definitely fun.

Best wishes,

Jeanette

--
  * Website: http://juliencoder.de - for summer is a state of sound
  * Youtube: https://www.youtube.com/channel/UCMS4rfGrTwz8W7jhC1Jnv7g
  * Audiobombs: https://www.audiobombs.com/users/jeanette_c
  * GitHub: https://github.com/jeanette-c

I love the things you say
And I love the love your touch conveys <3
(Britney Spears)

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Date2021-09-04 13:12
FromMichael Gogins
SubjectRe: [Csnd] [EXTERNAL] Re: [Csnd] Modelling a piano like instrument: waveguide questions
I have opened an issue for this in the Faust repository: https://github.com/grame-cncm/faust/issues/648.

Regards,
Mike

-----------------------------------------------------
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Sat, Sep 4, 2021 at 4:42 AM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
If you let Yann Orlarey know about this bug, he'll fix very quickly.

Prof. Victor Lazzarini
Maynooth University
Ireland

On 3 Sep 2021, at 22:20, Michael Gogins <michael.gogins@gmail.com> wrote:



*Warning*

This email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.

Okay, I got this to work. There is evidently a bug in the Faust `faust2csound` tool, which I figured out how to work around (it's easy).

The Faust piano does not sound nearly as good as the Pianoteq physically modelled VST plugin, but still, this opens the way to creating many new plugin opcodes from Faust code.


Regards,
Mike

-----------------------------------------------------
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Thu, Sep 2, 2021 at 2:36 PM Jeanette C. <julien@mail.upb.de> wrote:
Hi Partev, Michael and Peter,
many thanks for all your pointers and resources. I'm slowly making my way,
hoping to gain something along the roa. :) It's definitely fun.

Best wishes,

Jeanette

--
  * Website: http://juliencoder.de - for summer is a state of sound
  * Youtube: https://www.youtube.com/channel/UCMS4rfGrTwz8W7jhC1Jnv7g
  * Audiobombs: https://www.audiobombs.com/users/jeanette_c
  * GitHub: https://github.com/jeanette-c

I love the things you say
And I love the love your touch conveys <3
(Britney Spears)

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Date2021-09-04 13:24
FromVictor Lazzarini
SubjectRe: [Csnd] [EXTERNAL] Re: [Csnd] Modelling a piano like instrument: waveguide questions
great

Prof. Victor Lazzarini
Maynooth University
Ireland

On 4 Sep 2021, at 13:13, Michael Gogins <michael.gogins@gmail.com> wrote:


I have opened an issue for this in the Faust repository: https://github.com/grame-cncm/faust/issues/648.

Regards,
Mike

-----------------------------------------------------
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Sat, Sep 4, 2021 at 4:42 AM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
If you let Yann Orlarey know about this bug, he'll fix very quickly.

Prof. Victor Lazzarini
Maynooth University
Ireland

On 3 Sep 2021, at 22:20, Michael Gogins <michael.gogins@gmail.com> wrote:



*Warning*

This email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.

Okay, I got this to work. There is evidently a bug in the Faust `faust2csound` tool, which I figured out how to work around (it's easy).

The Faust piano does not sound nearly as good as the Pianoteq physically modelled VST plugin, but still, this opens the way to creating many new plugin opcodes from Faust code.


Regards,
Mike

-----------------------------------------------------
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Thu, Sep 2, 2021 at 2:36 PM Jeanette C. <julien@mail.upb.de> wrote:
Hi Partev, Michael and Peter,
many thanks for all your pointers and resources. I'm slowly making my way,
hoping to gain something along the roa. :) It's definitely fun.

Best wishes,

Jeanette

--
  * Website: http://juliencoder.de - for summer is a state of sound
  * Youtube: https://www.youtube.com/channel/UCMS4rfGrTwz8W7jhC1Jnv7g
  * Audiobombs: https://www.audiobombs.com/users/jeanette_c
  * GitHub: https://github.com/jeanette-c

I love the things you say
And I love the love your touch conveys <3
(Britney Spears)

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here