Csound Csound-dev Csound-tekno Search About

[Csnd] Code Share: Synthetic Harp

Date2020-10-05 04:18
FromSteven Yi
Subject[Csnd] Code Share: Synthetic Harp
Hi All,

I thought I'd share a synthetic harp patch that's loosely
physically-inspired.  There's subtractive synthesis used for a string
pluck sound and a reson bank for a (perhaps overly!) resonant body:

https://ide.csound.com/editor/G6ksxg6mOp0T9qB1HCd6

The project above has a melodic pattern generating for testing purposes.

Code body for instrument is as follows:

instr Harp

  ;; STRING SOUND
  asig = vco2(.5, p4, 2, .45)
  asig += vco2(.25, p4 * 2, 2, linseg(.5, .1, .05, p3, .05))
  asig += vco2(.25, p4 * 0.997934234, 12)

  asig = zdf_ladder(asig, cpsoct(linseg:a(13.4, .1, 10, 1, 5, p3, 4)), 0.5)

  ;; BODY SOUND
  a1 = reson(asig, 800, 160) * 0.05
  a2 = reson(asig, 2000, 400) * 0.05
  a3 = reson(asig, 3000, 650) * 0.05

  asig += a1 + a2 + a3

  asig = dcblock2(asig)
  asig *= linen:a(.15 * p5, .001, p3, .01)

  pan_verb_mix(asig, 0.5, 0.1)
endin

(replace pan_verb_mix without out(asig,asig) if testing locally)

Cheers!
Steven

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

Date2020-10-05 04:58
From"Dr. Richard Boulanger"
SubjectRe: [Csnd] Code Share: Synthetic Harp
Lovely and cool.

Dr. Richard Boulanger
Professor
Electronic Production and Design
Berklee College of Music

> On Oct 4, 2020, at 11:19 PM, Steven Yi  wrote:
> 
> Hi All,
> 
> I thought I'd share a synthetic harp patch that's loosely
> physically-inspired.  There's subtractive synthesis used for a string
> pluck sound and a reson bank for a (perhaps overly!) resonant body:
> 
> https://us-west-2.protection.sophos.com?d=csound.com&u=aHR0cHM6Ly9pZGUuY3NvdW5kLmNvbS9lZGl0b3IvRzZrc3hnNm1PcDBUOXFCMUhDZDY=&e=cmJvdWxhbmdlckBiZXJrbGVlLmVkdQ==&t=d0Y5WUs0MEc5NHM0bGpNelFZTXl0alE0enN3R1BzVU5LUjdSWWdpbFFkQT0=&h=12f0fc22770d4ae79ad7a13ead5c552e
> 
> The project above has a melodic pattern generating for testing purposes.
> 
> Code body for instrument is as follows:
> 
> instr Harp
> 
>  ;; STRING SOUND
>  asig = vco2(.5, p4, 2, .45)
>  asig += vco2(.25, p4 * 2, 2, linseg(.5, .1, .05, p3, .05))
>  asig += vco2(.25, p4 * 0.997934234, 12)
> 
>  asig = zdf_ladder(asig, cpsoct(linseg:a(13.4, .1, 10, 1, 5, p3, 4)), 0.5)
> 
>  ;; BODY SOUND
>  a1 = reson(asig, 800, 160) * 0.05
>  a2 = reson(asig, 2000, 400) * 0.05
>  a3 = reson(asig, 3000, 650) * 0.05
> 
>  asig += a1 + a2 + a3
> 
>  asig = dcblock2(asig)
>  asig *= linen:a(.15 * p5, .001, p3, .01)
> 
>  pan_verb_mix(asig, 0.5, 0.1)
> endin
> 
> (replace pan_verb_mix without out(asig,asig) if testing locally)
> 
> Cheers!
> Steven
> 
> Csound mailing list
> Csound@listserv.heanet.ie
> https://us-west-2.protection.sophos.com?d=heanet.ie&u=aHR0cHM6Ly9saXN0c2Vydi5oZWFuZXQuaWUvY2dpLWJpbi93YT9BMD1DU09VTkQ=&e=cmJvdWxhbmdlckBiZXJrbGVlLmVkdQ==&t=V2MrMzVGMU1BZEZaZ1lZck9kUnhTTC9YN1BHMnUxSDd4THhWY0dLeURxYz0=&h=12f0fc22770d4ae79ad7a13ead5c552e
> Send bugs reports to
>        https://us-west-2.protection.sophos.com?d=github.com&u=aHR0cHM6Ly9naXRodWIuY29tL2Nzb3VuZC9jc291bmQvaXNzdWVz&e=cmJvdWxhbmdlckBiZXJrbGVlLmVkdQ==&t=cWpnbGx6KzZUci9yQkZQMDNaTDdyZFdzK1l1WDE0TVhzOXR1dHltRUx5RT0=&h=12f0fc22770d4ae79ad7a13ead5c552e
> 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

Date2020-10-05 07:44
FromJeff Harrington
SubjectRe: [Csnd] Code Share: Synthetic Harp
Very cool sounds!  And your reson banks are fascinating!  Easy way to
add a formant aura around a sound?

Jeff

https://open.spotify.com/artist/1SlRSnxbcQTZfiUOgGH2zA


On 10/5/2020 5:18 AM, Steven Yi wrote:
> Hi All,
>
> I thought I'd share a synthetic harp patch that's loosely
> physically-inspired.  There's subtractive synthesis used for a string
> pluck sound and a reson bank for a (perhaps overly!) resonant body:
>
> https://ide.csound.com/editor/G6ksxg6mOp0T9qB1HCd6
>
> The project above has a melodic pattern generating for testing purposes.
>
> Code body for instrument is as follows:
>
> instr Harp
>
>   ;; STRING SOUND
>   asig = vco2(.5, p4, 2, .45)
>   asig += vco2(.25, p4 * 2, 2, linseg(.5, .1, .05, p3, .05))
>   asig += vco2(.25, p4 * 0.997934234, 12)
>
>   asig = zdf_ladder(asig, cpsoct(linseg:a(13.4, .1, 10, 1, 5, p3, 4)), 0.5)
>
>   ;; BODY SOUND
>   a1 = reson(asig, 800, 160) * 0.05
>   a2 = reson(asig, 2000, 400) * 0.05
>   a3 = reson(asig, 3000, 650) * 0.05
>
>   asig += a1 + a2 + a3
>
>   asig = dcblock2(asig)
>   asig *= linen:a(.15 * p5, .001, p3, .01)
>
>   pan_verb_mix(asig, 0.5, 0.1)
> endin
>
> (replace pan_verb_mix without out(asig,asig) if testing locally)
>
> Cheers!
> Steven
>
> 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

Date2020-10-05 09:39
FromAndrea Strappa
Subject[Csnd] R: [Csnd] Code Share: Synthetic Harp

Thank you, Steven, there is a lot to learn.

Andrea S.

 

Da: Jeff Harrington
Inviato: lunedì 5 ottobre 2020 08:44
A: CSOUND@LISTSERV.HEANET.IE
Oggetto: Re: [Csnd] Code Share: Synthetic Harp

 

V

 


Date2020-10-05 12:14
FromVictor Lazzarini
SubjectRe: [Csnd] [EXTERNAL] [Csnd] Code Share: Synthetic Harp
all these examples are brilliant, keep them coming! You could make your own catalog!
========================
Prof. Victor Lazzarini
Maynooth University
Ireland

> On 5 Oct 2020, at 04:18, Steven Yi  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.
> 
> Hi All,
> 
> I thought I'd share a synthetic harp patch that's loosely
> physically-inspired.  There's subtractive synthesis used for a string
> pluck sound and a reson bank for a (perhaps overly!) resonant body:
> 
> https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fide.csound.com%2Feditor%2FG6ksxg6mOp0T9qB1HCd6&data=02%7C01%7CVictor.Lazzarini%40mu.ie%7C8a524ac3821d491b1c6808d868dd6aca%7C1454f5ccbb354685bbd98621fd8055c9%7C1%7C0%7C637374647471375755&sdata=QCV9FmK29WuUVwfmZjp%2BL5bCMRHYrLRuP78Mi3BpKkI%3D&reserved=0
> 
> The project above has a melodic pattern generating for testing purposes.
> 
> Code body for instrument is as follows:
> 
> instr Harp
> 
>  ;; STRING SOUND
>  asig = vco2(.5, p4, 2, .45)
>  asig += vco2(.25, p4 * 2, 2, linseg(.5, .1, .05, p3, .05))
>  asig += vco2(.25, p4 * 0.997934234, 12)
> 
>  asig = zdf_ladder(asig, cpsoct(linseg:a(13.4, .1, 10, 1, 5, p3, 4)), 0.5)
> 
>  ;; BODY SOUND
>  a1 = reson(asig, 800, 160) * 0.05
>  a2 = reson(asig, 2000, 400) * 0.05
>  a3 = reson(asig, 3000, 650) * 0.05
> 
>  asig += a1 + a2 + a3
> 
>  asig = dcblock2(asig)
>  asig *= linen:a(.15 * p5, .001, p3, .01)
> 
>  pan_verb_mix(asig, 0.5, 0.1)
> endin
> 
> (replace pan_verb_mix without out(asig,asig) if testing locally)
> 
> Cheers!
> Steven
> 
> Csound mailing list
> Csound@listserv.heanet.ie
> https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flistserv.heanet.ie%2Fcgi-bin%2Fwa%3FA0%3DCSOUND&data=02%7C01%7CVictor.Lazzarini%40mu.ie%7C8a524ac3821d491b1c6808d868dd6aca%7C1454f5ccbb354685bbd98621fd8055c9%7C1%7C0%7C637374647471375755&sdata=RrbSmUG4V5DmZ4L95S%2FzB8sdoxAp8Lnt0PriSV8vhkQ%3D&reserved=0
> Send bugs reports to
>        https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcsound%2Fcsound%2Fissues&data=02%7C01%7CVictor.Lazzarini%40mu.ie%7C8a524ac3821d491b1c6808d868dd6aca%7C1454f5ccbb354685bbd98621fd8055c9%7C1%7C0%7C637374647471375755&sdata=vajYo5RGkBcHPDrJqp47QHYScicOwVtgcRN8UhQ5hIQ%3D&reserved=0
> 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

Date2020-10-05 14:58
FromSteven Yi
SubjectRe: [Csnd] [EXTERNAL] [Csnd] Code Share: Synthetic Harp
Thanks all!

Jeff: I was thinking along the lines of formants when I started coding
this instrument. I think I don't spend enough time designing sounds
with reson/mode and will probably continue to practice and exploring
with them.

Victor: Thanks!  I think once we have collections implemented in the
Web-IDE I'll be organizing a number of the items I posted into various
collections. Just need to find some time. :)

On Mon, Oct 5, 2020 at 7:14 AM Victor Lazzarini  wrote:
>
> all these examples are brilliant, keep them coming! You could make your own catalog!
> ========================
> Prof. Victor Lazzarini
> Maynooth University
> Ireland
>
> > On 5 Oct 2020, at 04:18, Steven Yi  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.
> >
> > Hi All,
> >
> > I thought I'd share a synthetic harp patch that's loosely
> > physically-inspired.  There's subtractive synthesis used for a string
> > pluck sound and a reson bank for a (perhaps overly!) resonant body:
> >
> > https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fide.csound.com%2Feditor%2FG6ksxg6mOp0T9qB1HCd6&data=02%7C01%7CVictor.Lazzarini%40mu.ie%7C8a524ac3821d491b1c6808d868dd6aca%7C1454f5ccbb354685bbd98621fd8055c9%7C1%7C0%7C637374647471375755&sdata=QCV9FmK29WuUVwfmZjp%2BL5bCMRHYrLRuP78Mi3BpKkI%3D&reserved=0
> >
> > The project above has a melodic pattern generating for testing purposes.
> >
> > Code body for instrument is as follows:
> >
> > instr Harp
> >
> >  ;; STRING SOUND
> >  asig = vco2(.5, p4, 2, .45)
> >  asig += vco2(.25, p4 * 2, 2, linseg(.5, .1, .05, p3, .05))
> >  asig += vco2(.25, p4 * 0.997934234, 12)
> >
> >  asig = zdf_ladder(asig, cpsoct(linseg:a(13.4, .1, 10, 1, 5, p3, 4)), 0.5)
> >
> >  ;; BODY SOUND
> >  a1 = reson(asig, 800, 160) * 0.05
> >  a2 = reson(asig, 2000, 400) * 0.05
> >  a3 = reson(asig, 3000, 650) * 0.05
> >
> >  asig += a1 + a2 + a3
> >
> >  asig = dcblock2(asig)
> >  asig *= linen:a(.15 * p5, .001, p3, .01)
> >
> >  pan_verb_mix(asig, 0.5, 0.1)
> > endin
> >
> > (replace pan_verb_mix without out(asig,asig) if testing locally)
> >
> > Cheers!
> > Steven
> >
> > Csound mailing list
> > Csound@listserv.heanet.ie
> > https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flistserv.heanet.ie%2Fcgi-bin%2Fwa%3FA0%3DCSOUND&data=02%7C01%7CVictor.Lazzarini%40mu.ie%7C8a524ac3821d491b1c6808d868dd6aca%7C1454f5ccbb354685bbd98621fd8055c9%7C1%7C0%7C637374647471375755&sdata=RrbSmUG4V5DmZ4L95S%2FzB8sdoxAp8Lnt0PriSV8vhkQ%3D&reserved=0
> > Send bugs reports to
> >        https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcsound%2Fcsound%2Fissues&data=02%7C01%7CVictor.Lazzarini%40mu.ie%7C8a524ac3821d491b1c6808d868dd6aca%7C1454f5ccbb354685bbd98621fd8055c9%7C1%7C0%7C637374647471375755&sdata=vajYo5RGkBcHPDrJqp47QHYScicOwVtgcRN8UhQ5hIQ%3D&reserved=0
> > 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

Date2020-10-07 02:27
FromDave Seidel
SubjectRe: [Csnd] Code Share: Synthetic Harp
Hi Steven,

How did you choose the frequency and bandwidth values for the reson bank?

- Dave

On Sun, Oct 4, 2020 at 11:18 PM Steven Yi <stevenyi@gmail.com> wrote:
Hi All,

I thought I'd share a synthetic harp patch that's loosely
physically-inspired.  There's subtractive synthesis used for a string
pluck sound and a reson bank for a (perhaps overly!) resonant body:

https://ide.csound.com/editor/G6ksxg6mOp0T9qB1HCd6

The project above has a melodic pattern generating for testing purposes.

Code body for instrument is as follows:

instr Harp

  ;; STRING SOUND
  asig = vco2(.5, p4, 2, .45)
  asig += vco2(.25, p4 * 2, 2, linseg(.5, .1, .05, p3, .05))
  asig += vco2(.25, p4 * 0.997934234, 12)

  asig = zdf_ladder(asig, cpsoct(linseg:a(13.4, .1, 10, 1, 5, p3, 4)), 0.5)

  ;; BODY SOUND
  a1 = reson(asig, 800, 160) * 0.05
  a2 = reson(asig, 2000, 400) * 0.05
  a3 = reson(asig, 3000, 650) * 0.05

  asig += a1 + a2 + a3

  asig = dcblock2(asig)
  asig *= linen:a(.15 * p5, .001, p3, .01)

  pan_verb_mix(asig, 0.5, 0.1)
endin

(replace pan_verb_mix without out(asig,asig) if testing locally)

Cheers!
Steven

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

Date2020-10-07 03:17
FromPete Goodeve
SubjectRe: [Csnd] Code Share: Synthetic Harp
AttachmentsNone  

Date2020-10-07 12:58
FromdocB <000005d2745f1ec0-dmarc-request@LISTSERV.HEANET.IE>
SubjectRe: [Csnd] Code Share: Synthetic Harp
Attachmentsmfifpdcjjhcbcdei.png  


asig += vco2(.25, p4 * 2, 2, linseg(.5, .1, .05, p3, .05))
should do the job.

here an old one (see image) - the juno 60. had the possibily to modulate the pwm (kpw) parameter by using the envelope.

Hi Steven,

I have a question, too!  You seem to have created the pluck sound by using
the zdf_ladder to sweep the filter frequency against the fixed-frequency
source tones.  I initially assumed that the linen envelope at the end was
doing it, but I removed that envelope (with a suitable volume adjustment)
and I hear little difference!

Is this a common technique, or is it original here?

Thanks,
	-- Pete --

On Tue, Oct 06, 2020 at 09:27:05PM -0400, Dave Seidel wrote:
Hi Steven,

How did you choose the frequency and bandwidth values for the reson bank?

- Dave

On Sun, Oct 4, 2020 at 11:18 PM Steven Yi <stevenyi@gmail.com> wrote:

Hi All,

I thought I'd share a synthetic harp patch that's loosely
physically-inspired.  There's subtractive synthesis used for a string
pluck sound and a reson bank for a (perhaps overly!) resonant body:

https://ide.csound.com/editor/G6ksxg6mOp0T9qB1HCd6

The project above has a melodic pattern generating for testing purposes.

Code body for instrument is as follows:

instr Harp

  ;; STRING SOUND
  asig = vco2(.5, p4, 2, .45)
  asig += vco2(.25, p4 * 2, 2, linseg(.5, .1, .05, p3, .05))
  asig += vco2(.25, p4 * 0.997934234, 12)

  asig = zdf_ladder(asig, cpsoct(linseg:a(13.4, .1, 10, 1, 5, p3, 4)), 0.5)

  ;; BODY SOUND
  a1 = reson(asig, 800, 160) * 0.05
  a2 = reson(asig, 2000, 400) * 0.05
  a3 = reson(asig, 3000, 650) * 0.05

  asig += a1 + a2 + a3

  asig = dcblock2(asig)
  asig *= linen:a(.15 * p5, .001, p3, .01)

  pan_verb_mix(asig, 0.5, 0.1)
endin

(replace pan_verb_mix without out(asig,asig) if testing locally)

Cheers!
Steven

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

Date2020-10-07 15:43
FromSteven Yi
SubjectRe: [Csnd] Code Share: Synthetic Harp
Hi Dave,

Might be odd to say but I kind of just came up with them intuitively.
I had my students use the formant table from manual for the soprano
'a' for an exercise so I had those kinds of relationships of center
frequencies in mind, but I wasn't consulting any charts or analyses
when I chose these frequencies. The bandwidths I approached as a wide
proportion of the center frequency and then just experimented.  I
should mention I adjusted the attenuation in the version online since
my original post here
(https://ide.csound.com/editor/G6ksxg6mOp0T9qB1HCd6) to:

  a1 = reson(asig, 800, 160) * 0.025
  a2 = reson(asig, 2000, 400) * 0.04
  a3 = reson(asig, 3000, 650) * 0.03

to balance the resonance a bit.

Cheers!
Steven

On Tue, Oct 6, 2020 at 9:27 PM Dave Seidel  wrote:
>
> Hi Steven,
>
> How did you choose the frequency and bandwidth values for the reson bank?
>
> - Dave
>
> On Sun, Oct 4, 2020 at 11:18 PM Steven Yi  wrote:
>>
>> Hi All,
>>
>> I thought I'd share a synthetic harp patch that's loosely
>> physically-inspired.  There's subtractive synthesis used for a string
>> pluck sound and a reson bank for a (perhaps overly!) resonant body:
>>
>> https://ide.csound.com/editor/G6ksxg6mOp0T9qB1HCd6
>>
>> The project above has a melodic pattern generating for testing purposes.
>>
>> Code body for instrument is as follows:
>>
>> instr Harp
>>
>>   ;; STRING SOUND
>>   asig = vco2(.5, p4, 2, .45)
>>   asig += vco2(.25, p4 * 2, 2, linseg(.5, .1, .05, p3, .05))
>>   asig += vco2(.25, p4 * 0.997934234, 12)
>>
>>   asig = zdf_ladder(asig, cpsoct(linseg:a(13.4, .1, 10, 1, 5, p3, 4)), 0.5)
>>
>>   ;; BODY SOUND
>>   a1 = reson(asig, 800, 160) * 0.05
>>   a2 = reson(asig, 2000, 400) * 0.05
>>   a3 = reson(asig, 3000, 650) * 0.05
>>
>>   asig += a1 + a2 + a3
>>
>>   asig = dcblock2(asig)
>>   asig *= linen:a(.15 * p5, .001, p3, .01)
>>
>>   pan_verb_mix(asig, 0.5, 0.1)
>> endin
>>
>> (replace pan_verb_mix without out(asig,asig) if testing locally)
>>
>> Cheers!
>> Steven
>>
>> 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

Date2020-10-07 15:54
FromDave Seidel
SubjectRe: [Csnd] Code Share: Synthetic Harp
Thanks, Steven! Not odd at all, sometimes intuition is the best guide. Thanks for the code! For me it brings up a long-time goal to design a "sympathetic strings" instrument/UDO for Csound.

- Dave

On Wed, Oct 7, 2020 at 10:44 AM Steven Yi <stevenyi@gmail.com> wrote:
Hi Dave,

Might be odd to say but I kind of just came up with them intuitively.
I had my students use the formant table from manual for the soprano
'a' for an exercise so I had those kinds of relationships of center
frequencies in mind, but I wasn't consulting any charts or analyses
when I chose these frequencies. The bandwidths I approached as a wide
proportion of the center frequency and then just experimented.  I
should mention I adjusted the attenuation in the version online since
my original post here
(https://ide.csound.com/editor/G6ksxg6mOp0T9qB1HCd6) to:

  a1 = reson(asig, 800, 160) * 0.025
  a2 = reson(asig, 2000, 400) * 0.04
  a3 = reson(asig, 3000, 650) * 0.03

to balance the resonance a bit.

Cheers!
Steven

On Tue, Oct 6, 2020 at 9:27 PM Dave Seidel <dave.seidel@gmail.com> wrote:
>
> Hi Steven,
>
> How did you choose the frequency and bandwidth values for the reson bank?
>
> - Dave
>
> On Sun, Oct 4, 2020 at 11:18 PM Steven Yi <stevenyi@gmail.com> wrote:
>>
>> Hi All,
>>
>> I thought I'd share a synthetic harp patch that's loosely
>> physically-inspired.  There's subtractive synthesis used for a string
>> pluck sound and a reson bank for a (perhaps overly!) resonant body:
>>
>> https://ide.csound.com/editor/G6ksxg6mOp0T9qB1HCd6
>>
>> The project above has a melodic pattern generating for testing purposes.
>>
>> Code body for instrument is as follows:
>>
>> instr Harp
>>
>>   ;; STRING SOUND
>>   asig = vco2(.5, p4, 2, .45)
>>   asig += vco2(.25, p4 * 2, 2, linseg(.5, .1, .05, p3, .05))
>>   asig += vco2(.25, p4 * 0.997934234, 12)
>>
>>   asig = zdf_ladder(asig, cpsoct(linseg:a(13.4, .1, 10, 1, 5, p3, 4)), 0.5)
>>
>>   ;; BODY SOUND
>>   a1 = reson(asig, 800, 160) * 0.05
>>   a2 = reson(asig, 2000, 400) * 0.05
>>   a3 = reson(asig, 3000, 650) * 0.05
>>
>>   asig += a1 + a2 + a3
>>
>>   asig = dcblock2(asig)
>>   asig *= linen:a(.15 * p5, .001, p3, .01)
>>
>>   pan_verb_mix(asig, 0.5, 0.1)
>> endin
>>
>> (replace pan_verb_mix without out(asig,asig) if testing locally)
>>
>> Cheers!
>> Steven
>>
>> 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

Date2020-10-07 15:55
FromSteven Yi
SubjectRe: [Csnd] Code Share: Synthetic Harp
Hi Pete,

(For some reason your message went into my spam folder so I didn't see
the message until now. Hopefully will be fixed now!)

I don't think there's anything original about the filtering for a
plucked string? I think the effect makes sense and karplus-strong
string plucks have a similar spectral evolution in attenuating the
higher frequencies faster than the lower ones.   I use linen alot for
declicking and sometimes to soften attacks if most of the sound
shaping is done through the filter cutoff. (I just tried with .03 for
linen rise time and got a sort of wineglass rub sound, fun!)

Cheers!
Steven

On Tue, Oct 6, 2020 at 10:17 PM Pete Goodeve  wrote:
>
> Hi Steven,
>
> I have a question, too!  You seem to have created the pluck sound by using
> the zdf_ladder to sweep the filter frequency against the fixed-frequency
> source tones.  I initially assumed that the linen envelope at the end was
> doing it, but I removed that envelope (with a suitable volume adjustment)
> and I hear little difference!
>
> Is this a common technique, or is it original here?
>
> Thanks,
>         -- Pete --
>
> On Tue, Oct 06, 2020 at 09:27:05PM -0400, Dave Seidel wrote:
> > Hi Steven,
> >
> > How did you choose the frequency and bandwidth values for the reson bank?
> >
> > - Dave
> >
> > On Sun, Oct 4, 2020 at 11:18 PM Steven Yi  wrote:
> >
> > > Hi All,
> > >
> > > I thought I'd share a synthetic harp patch that's loosely
> > > physically-inspired.  There's subtractive synthesis used for a string
> > > pluck sound and a reson bank for a (perhaps overly!) resonant body:
> > >
> > > https://ide.csound.com/editor/G6ksxg6mOp0T9qB1HCd6
> > >
> > > The project above has a melodic pattern generating for testing purposes.
> > >
> > > Code body for instrument is as follows:
> > >
> > > instr Harp
> > >
> > >   ;; STRING SOUND
> > >   asig = vco2(.5, p4, 2, .45)
> > >   asig += vco2(.25, p4 * 2, 2, linseg(.5, .1, .05, p3, .05))
> > >   asig += vco2(.25, p4 * 0.997934234, 12)
> > >
> > >   asig = zdf_ladder(asig, cpsoct(linseg:a(13.4, .1, 10, 1, 5, p3, 4)), 0.5)
> > >
> > >   ;; BODY SOUND
> > >   a1 = reson(asig, 800, 160) * 0.05
> > >   a2 = reson(asig, 2000, 400) * 0.05
> > >   a3 = reson(asig, 3000, 650) * 0.05
> > >
> > >   asig += a1 + a2 + a3
> > >
> > >   asig = dcblock2(asig)
> > >   asig *= linen:a(.15 * p5, .001, p3, .01)
> > >
> > >   pan_verb_mix(asig, 0.5, 0.1)
> > > endin
> > >
> > > (replace pan_verb_mix without out(asig,asig) if testing locally)
> > >
> > > Cheers!
> > > Steven
> > >
> > > 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

Date2020-10-07 22:07
FromOliver Larkin <000000992b40b7cd-dmarc-request@LISTSERV.HEANET.IE>
SubjectRe: [Csnd] Code Share: Synthetic Harp
very nice steven!

On Wed, Oct 7, 2020 at 3:55 PM Steven Yi <stevenyi@gmail.com> wrote:
Hi Pete,

(For some reason your message went into my spam folder so I didn't see
the message until now. Hopefully will be fixed now!)

I don't think there's anything original about the filtering for a
plucked string? I think the effect makes sense and karplus-strong
string plucks have a similar spectral evolution in attenuating the
higher frequencies faster than the lower ones.   I use linen alot for
declicking and sometimes to soften attacks if most of the sound
shaping is done through the filter cutoff. (I just tried with .03 for
linen rise time and got a sort of wineglass rub sound, fun!)

Cheers!
Steven

On Tue, Oct 6, 2020 at 10:17 PM Pete Goodeve <pete.goodeve@computer.org> wrote:
>
> Hi Steven,
>
> I have a question, too!  You seem to have created the pluck sound by using
> the zdf_ladder to sweep the filter frequency against the fixed-frequency
> source tones.  I initially assumed that the linen envelope at the end was
> doing it, but I removed that envelope (with a suitable volume adjustment)
> and I hear little difference!
>
> Is this a common technique, or is it original here?
>
> Thanks,
>         -- Pete --
>
> On Tue, Oct 06, 2020 at 09:27:05PM -0400, Dave Seidel wrote:
> > Hi Steven,
> >
> > How did you choose the frequency and bandwidth values for the reson bank?
> >
> > - Dave
> >
> > On Sun, Oct 4, 2020 at 11:18 PM Steven Yi <stevenyi@gmail.com> wrote:
> >
> > > Hi All,
> > >
> > > I thought I'd share a synthetic harp patch that's loosely
> > > physically-inspired.  There's subtractive synthesis used for a string
> > > pluck sound and a reson bank for a (perhaps overly!) resonant body:
> > >
> > > https://ide.csound.com/editor/G6ksxg6mOp0T9qB1HCd6
> > >
> > > The project above has a melodic pattern generating for testing purposes.
> > >
> > > Code body for instrument is as follows:
> > >
> > > instr Harp
> > >
> > >   ;; STRING SOUND
> > >   asig = vco2(.5, p4, 2, .45)
> > >   asig += vco2(.25, p4 * 2, 2, linseg(.5, .1, .05, p3, .05))
> > >   asig += vco2(.25, p4 * 0.997934234, 12)
> > >
> > >   asig = zdf_ladder(asig, cpsoct(linseg:a(13.4, .1, 10, 1, 5, p3, 4)), 0.5)
> > >
> > >   ;; BODY SOUND
> > >   a1 = reson(asig, 800, 160) * 0.05
> > >   a2 = reson(asig, 2000, 400) * 0.05
> > >   a3 = reson(asig, 3000, 650) * 0.05
> > >
> > >   asig += a1 + a2 + a3
> > >
> > >   asig = dcblock2(asig)
> > >   asig *= linen:a(.15 * p5, .001, p3, .01)
> > >
> > >   pan_verb_mix(asig, 0.5, 0.1)
> > > endin
> > >
> > > (replace pan_verb_mix without out(asig,asig) if testing locally)
> > >
> > > Cheers!
> > > Steven
> > >
> > > 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
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