Csound Csound-dev Csound-tekno Search About

[Csnd] scanned synthesis ihold not working

Date2022-01-05 16:27
FromGerard Rodríguez
Subject[Csnd] scanned synthesis ihold not working
Hello list,

<CsoundSynthesizer>
<CsOptions>
; Select audio/midi flags here according to platform
; Audio out   Audio in    No messages
-odac      ;     -iadc     -d     ;;;RT audio I/O
; For Non-realtime ouput leave only the line below:
; -o scans.wav -W ;;; for file output any platform
</CsOptions>
<CsInstruments>
    sr =   44100
    ksmps =   32
    nchnls =   1

    instr 1
        a0 = 0
;       scanu init, irate, ifnvel, ifnmass, ifnstif, ifncentr, ifndamp, kmass, kstif, kcentr, kdamp, ileft, iright, kpos, kstrngth, ain, idisp, id
        scanu 1,     .01,    6,       2,       3,     4,        5,       2,     .1,    .1,     -.01,  .1,    .5,     0,    0,        a0,  1,     2
;ar     scans       kamp,      kfreq,      ifntraj, id
        a1  scans ampdb(p5), cpsmidinn(p4), 7,       2
        ihold
        outs a1,a1
    endin
</CsInstruments>
<CsScore>
f1 0 128 -7 0 128 0 ; Initial condition
f2 0 128 -7 1 128 1 ; uniform masses
f3 0 16384 -23 "string-128.matrxB" ; Spring matrices
f4 0 128 -7 0 128 0  ; no force ; Centering force
f5 0 128 -7 0 128 0 ; no damping ; Damping
f6 0 128 -7 0 128 0 ; Initial velocity
f7 0 128 -7 0 128 127 ; linear Trajectories

; Note list
f 1 0 128 -7 -1 128 1 0 ; sawtooth
i1 0 1000 69.00 75
e
</CsScore>
</CsoundSynthesizer>

In this very simple scanned synthesis instrument, either using ihold or a negative p3 doesn't work. (csound just exits immediately).

I need the note to be held to simulate rehammering the string *without* resetting the state of the masses.
I was going to do some hack like this:

while indx < 128 do
    k1,k2 xscanmap 2, 1, 1, indx
    kvel table indx,1
    tablew k1+kvel,indx,1
    tablew k2,indx,6
od

to add the hammer waveform over the current state of the vibrating system but I can't do that without the note being held.

Thank you in advance.
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

Date2022-01-05 18:18
FromVictor Lazzarini
SubjectRe: [Csnd] [EXTERNAL] [Csnd] scanned synthesis ihold not working
To keep Csound open use

f 0 z

that'll keep it going beyond our lifetimes

Prof. Victor Lazzarini
Maynooth University
Ireland

On 5 Jan 2022, at 16:28, Gerard Rodríguez <binbiniqegabenik@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.

Hello list,

<CsoundSynthesizer>
<CsOptions>
; Select audio/midi flags here according to platform
; Audio out   Audio in    No messages
-odac      ;     -iadc     -d     ;;;RT audio I/O
; For Non-realtime ouput leave only the line below:
; -o scans.wav -W ;;; for file output any platform
</CsOptions>
<CsInstruments>
    sr =   44100
    ksmps =   32
    nchnls =   1

    instr 1
        a0 = 0
;       scanu init, irate, ifnvel, ifnmass, ifnstif, ifncentr, ifndamp, kmass, kstif, kcentr, kdamp, ileft, iright, kpos, kstrngth, ain, idisp, id
        scanu 1,     .01,    6,       2,       3,     4,        5,       2,     .1,    .1,     -.01,  .1,    .5,     0,    0,        a0,  1,     2
;ar     scans       kamp,      kfreq,      ifntraj, id
        a1  scans ampdb(p5), cpsmidinn(p4), 7,       2
        ihold
        outs a1,a1
    endin
</CsInstruments>
<CsScore>
f1 0 128 -7 0 128 0 ; Initial condition
f2 0 128 -7 1 128 1 ; uniform masses
f3 0 16384 -23 "string-128.matrxB" ; Spring matrices
f4 0 128 -7 0 128 0  ; no force ; Centering force
f5 0 128 -7 0 128 0 ; no damping ; Damping
f6 0 128 -7 0 128 0 ; Initial velocity
f7 0 128 -7 0 128 127 ; linear Trajectories

; Note list
f 1 0 128 -7 -1 128 1 0 ; sawtooth
i1 0 1000 69.00 75
e
</CsScore>
</CsoundSynthesizer>

In this very simple scanned synthesis instrument, either using ihold or a negative p3 doesn't work. (csound just exits immediately).

I need the note to be held to simulate rehammering the string *without* resetting the state of the masses.
I was going to do some hack like this:

while indx < 128 do
    k1,k2 xscanmap 2, 1, 1, indx
    kvel table indx,1
    tablew k1+kvel,indx,1
    tablew k2,indx,6
od

to add the hammer waveform over the current state of the vibrating system but I can't do that without the note being held.

Thank you in advance.
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

Date2022-01-05 18:53
FromGerard Rodríguez
SubjectRe: [Csnd] [EXTERNAL] [Csnd] scanned synthesis ihold not working
Hello Victor,

Simple solution, thank you very much!
On the same topic, am I going about this the right way?, it seems a bit of a hacky solution and maybe something that should be integrated into scan/u to be able to retrigger it.

Missatge de Victor Lazzarini <Victor.Lazzarini@mu.ie> del dia dc., 5 de gen. 2022 a les 19:18:
To keep Csound open use

f 0 z

that'll keep it going beyond our lifetimes

Prof. Victor Lazzarini
Maynooth University
Ireland

On 5 Jan 2022, at 16:28, Gerard Rodríguez <binbiniqegabenik@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.

Hello list,

<CsoundSynthesizer>
<CsOptions>
; Select audio/midi flags here according to platform
; Audio out   Audio in    No messages
-odac      ;     -iadc     -d     ;;;RT audio I/O
; For Non-realtime ouput leave only the line below:
; -o scans.wav -W ;;; for file output any platform
</CsOptions>
<CsInstruments>
    sr =   44100
    ksmps =   32
    nchnls =   1

    instr 1
        a0 = 0
;       scanu init, irate, ifnvel, ifnmass, ifnstif, ifncentr, ifndamp, kmass, kstif, kcentr, kdamp, ileft, iright, kpos, kstrngth, ain, idisp, id
        scanu 1,     .01,    6,       2,       3,     4,        5,       2,     .1,    .1,     -.01,  .1,    .5,     0,    0,        a0,  1,     2
;ar     scans       kamp,      kfreq,      ifntraj, id
        a1  scans ampdb(p5), cpsmidinn(p4), 7,       2
        ihold
        outs a1,a1
    endin
</CsInstruments>
<CsScore>
f1 0 128 -7 0 128 0 ; Initial condition
f2 0 128 -7 1 128 1 ; uniform masses
f3 0 16384 -23 "string-128.matrxB" ; Spring matrices
f4 0 128 -7 0 128 0  ; no force ; Centering force
f5 0 128 -7 0 128 0 ; no damping ; Damping
f6 0 128 -7 0 128 0 ; Initial velocity
f7 0 128 -7 0 128 127 ; linear Trajectories

; Note list
f 1 0 128 -7 -1 128 1 0 ; sawtooth
i1 0 1000 69.00 75
e
</CsScore>
</CsoundSynthesizer>

In this very simple scanned synthesis instrument, either using ihold or a negative p3 doesn't work. (csound just exits immediately).

I need the note to be held to simulate rehammering the string *without* resetting the state of the masses.
I was going to do some hack like this:

while indx < 128 do
    k1,k2 xscanmap 2, 1, 1, indx
    kvel table indx,1
    tablew k1+kvel,indx,1
    tablew k2,indx,6
od

to add the hammer waveform over the current state of the vibrating system but I can't do that without the note being held.

Thank you in advance.
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

Date2022-01-05 19:02
FromGerard Rodríguez
SubjectRe: [Csnd] [EXTERNAL] [Csnd] scanned synthesis ihold not working
for a bit more context what I'm trying to do is a scanned synthesis instrument with a behaviour similar to sympathetic resonance.
I'm modelling 2 "strings" for now as the 2 halves of a 128 string and a hammer shape to hit one half or the other. This induces some vibration on the other end.
The idea would be to model all of the strings of an instrument like that, so I need to be able to retrigger the instrument with different hammer shapes while keeping the internal state of the spring simulation to simulate plucking/hammering each string.

Missatge de Victor Lazzarini <Victor.Lazzarini@mu.ie> del dia dc., 5 de gen. 2022 a les 19:18:
To keep Csound open use

f 0 z

that'll keep it going beyond our lifetimes

Prof. Victor Lazzarini
Maynooth University
Ireland

On 5 Jan 2022, at 16:28, Gerard Rodríguez <binbiniqegabenik@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.

Hello list,

<CsoundSynthesizer>
<CsOptions>
; Select audio/midi flags here according to platform
; Audio out   Audio in    No messages
-odac      ;     -iadc     -d     ;;;RT audio I/O
; For Non-realtime ouput leave only the line below:
; -o scans.wav -W ;;; for file output any platform
</CsOptions>
<CsInstruments>
    sr =   44100
    ksmps =   32
    nchnls =   1

    instr 1
        a0 = 0
;       scanu init, irate, ifnvel, ifnmass, ifnstif, ifncentr, ifndamp, kmass, kstif, kcentr, kdamp, ileft, iright, kpos, kstrngth, ain, idisp, id
        scanu 1,     .01,    6,       2,       3,     4,        5,       2,     .1,    .1,     -.01,  .1,    .5,     0,    0,        a0,  1,     2
;ar     scans       kamp,      kfreq,      ifntraj, id
        a1  scans ampdb(p5), cpsmidinn(p4), 7,       2
        ihold
        outs a1,a1
    endin
</CsInstruments>
<CsScore>
f1 0 128 -7 0 128 0 ; Initial condition
f2 0 128 -7 1 128 1 ; uniform masses
f3 0 16384 -23 "string-128.matrxB" ; Spring matrices
f4 0 128 -7 0 128 0  ; no force ; Centering force
f5 0 128 -7 0 128 0 ; no damping ; Damping
f6 0 128 -7 0 128 0 ; Initial velocity
f7 0 128 -7 0 128 127 ; linear Trajectories

; Note list
f 1 0 128 -7 -1 128 1 0 ; sawtooth
i1 0 1000 69.00 75
e
</CsScore>
</CsoundSynthesizer>

In this very simple scanned synthesis instrument, either using ihold or a negative p3 doesn't work. (csound just exits immediately).

I need the note to be held to simulate rehammering the string *without* resetting the state of the masses.
I was going to do some hack like this:

while indx < 128 do
    k1,k2 xscanmap 2, 1, 1, indx
    kvel table indx,1
    tablew k1+kvel,indx,1
    tablew k2,indx,6
od

to add the hammer waveform over the current state of the vibrating system but I can't do that without the note being held.

Thank you in advance.
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

Date2022-01-06 12:49
FromGerard Rodríguez
SubjectRe: [Csnd] [EXTERNAL] [Csnd] scanned synthesis ihold not working
I'm quite lost, nothing I try works.

1. I've tried to hammer the instrument using ain:

    I create an instrument to generate the audio waveform to strike the spring with table 1. This should generate a very short burst and stay at 0 afterwards

    instr 2
        kamp linseg 1, 0.0001, 0, 50, 0
        a1 oscil 1, cpsmidinn(p4), 1
        zaw a1*kamp, 1
    endin

    and read it on the scanned synthesis instrument

    instr 1
        a0 zar 1
;       scanu init, irate, ifnvel, ifnmass, ifnstif, ifncentr, ifndamp, kmass, kstif, kcentr, kdamp, ileft, iright, kpos, kstrngth, ain, idisp, id
        scanu 1,     .01,    6,       2,       3,     4,        5,       2, .1,    .1,     -.01,  .1,    .5,     0,    0,        a0,  1,     2
;ar     scans       kamp,      kfreq,      ifntraj, id
       a1  scans ampdb(75), cpsmidinn(p4), 7,       2
        outs a1,a1
    endin

my intention is that this generates exactly the same excitation that it would by starting with table 1

f1 0 128 -7 0 128 0; empty table
i1 0 -1 69.00 ; trigger instrument forever
f 1 1 128 -7 0 120 0 0 1 8 1 ;  line hammer
i2 1 10; Hammer it!

ftable 1: 128 points, scalemax 1.000
                                                            ____









________________________________________________________________



This should be the starting  shape that the excitation takes, however this is what happens:

Mass displacement 128 points, scalemax 0.208
       _
      .
     .



                                                       ._
                                                         '


________________________________________________________________


What is this?? why are there 2 peaks and not just the line to the right? Furthermore, as time goes on, it seems to get louder, but the audio being sent to the scanned instrument should be 0! (I tried this by giving giant values to the masses so that it doesn't move at all)

2.

I've tried saving the state of the springs with scanmap:

    indx = 0
    while indx < 128 do
        k1,k2 scanmap 2, 1, 1, indx
        tablew k1,indx,11
        tablew k2,indx,66
        indx = indx + 1
    od

however this seems to yield 2 empty tables

Missatge de Gerard Rodríguez <binbiniqegabenik@gmail.com> del dia dc., 5 de gen. 2022 a les 20:02:
for a bit more context what I'm trying to do is a scanned synthesis instrument with a behaviour similar to sympathetic resonance.
I'm modelling 2 "strings" for now as the 2 halves of a 128 string and a hammer shape to hit one half or the other. This induces some vibration on the other end.
The idea would be to model all of the strings of an instrument like that, so I need to be able to retrigger the instrument with different hammer shapes while keeping the internal state of the spring simulation to simulate plucking/hammering each string.

Missatge de Victor Lazzarini <Victor.Lazzarini@mu.ie> del dia dc., 5 de gen. 2022 a les 19:18:
To keep Csound open use

f 0 z

that'll keep it going beyond our lifetimes

Prof. Victor Lazzarini
Maynooth University
Ireland

On 5 Jan 2022, at 16:28, Gerard Rodríguez <binbiniqegabenik@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.

Hello list,

<CsoundSynthesizer>
<CsOptions>
; Select audio/midi flags here according to platform
; Audio out   Audio in    No messages
-odac      ;     -iadc     -d     ;;;RT audio I/O
; For Non-realtime ouput leave only the line below:
; -o scans.wav -W ;;; for file output any platform
</CsOptions>
<CsInstruments>
    sr =   44100
    ksmps =   32
    nchnls =   1

    instr 1
        a0 = 0
;       scanu init, irate, ifnvel, ifnmass, ifnstif, ifncentr, ifndamp, kmass, kstif, kcentr, kdamp, ileft, iright, kpos, kstrngth, ain, idisp, id
        scanu 1,     .01,    6,       2,       3,     4,        5,       2,     .1,    .1,     -.01,  .1,    .5,     0,    0,        a0,  1,     2
;ar     scans       kamp,      kfreq,      ifntraj, id
        a1  scans ampdb(p5), cpsmidinn(p4), 7,       2
        ihold
        outs a1,a1
    endin
</CsInstruments>
<CsScore>
f1 0 128 -7 0 128 0 ; Initial condition
f2 0 128 -7 1 128 1 ; uniform masses
f3 0 16384 -23 "string-128.matrxB" ; Spring matrices
f4 0 128 -7 0 128 0  ; no force ; Centering force
f5 0 128 -7 0 128 0 ; no damping ; Damping
f6 0 128 -7 0 128 0 ; Initial velocity
f7 0 128 -7 0 128 127 ; linear Trajectories

; Note list
f 1 0 128 -7 -1 128 1 0 ; sawtooth
i1 0 1000 69.00 75
e
</CsScore>
</CsoundSynthesizer>

In this very simple scanned synthesis instrument, either using ihold or a negative p3 doesn't work. (csound just exits immediately).

I need the note to be held to simulate rehammering the string *without* resetting the state of the masses.
I was going to do some hack like this:

while indx < 128 do
    k1,k2 xscanmap 2, 1, 1, indx
    kvel table indx,1
    tablew k1+kvel,indx,1
    tablew k2,indx,6
od

to add the hammer waveform over the current state of the vibrating system but I can't do that without the note being held.

Thank you in advance.
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

Date2022-01-06 14:08
FromGerard Rodríguez
SubjectRe: [Csnd] [EXTERNAL] [Csnd] scanned synthesis ihold not working
So, I think I completely misunderstood what feeding audio does. Of course it can't feed the 128 samples at once into each of the springs (which is what I want). Instead it's probably feeding each sample at once to all of the springs (although it seems it's scaled for each mass)

Mass displacement 128 points, scalemax 6902.736
                                _
                    _..---'''''' ''''''--..__
               _.-''                         '--._
           _.-'                                   '-._
        _-'                                           -._
      .'                                                 -_
    .'                                                     -_
  _'                                                         -
 _                                                            -
                                                               -
________________________________________________________________


This is feeding just 1 as ain. I think this should be documented.

> ain -- audio input that adds to the velocity of the masses. Amplitude should not be too great.

Adds it how? and where?

Missatge de Gerard Rodríguez <binbiniqegabenik@gmail.com> del dia dj., 6 de gen. 2022 a les 13:49:
I'm quite lost, nothing I try works.

1. I've tried to hammer the instrument using ain:

    I create an instrument to generate the audio waveform to strike the spring with table 1. This should generate a very short burst and stay at 0 afterwards

    instr 2
        kamp linseg 1, 0.0001, 0, 50, 0
        a1 oscil 1, cpsmidinn(p4), 1
        zaw a1*kamp, 1
    endin

    and read it on the scanned synthesis instrument

    instr 1
        a0 zar 1
;       scanu init, irate, ifnvel, ifnmass, ifnstif, ifncentr, ifndamp, kmass, kstif, kcentr, kdamp, ileft, iright, kpos, kstrngth, ain, idisp, id
        scanu 1,     .01,    6,       2,       3,     4,        5,       2, .1,    .1,     -.01,  .1,    .5,     0,    0,        a0,  1,     2
;ar     scans       kamp,      kfreq,      ifntraj, id
       a1  scans ampdb(75), cpsmidinn(p4), 7,       2
        outs a1,a1
    endin

my intention is that this generates exactly the same excitation that it would by starting with table 1

f1 0 128 -7 0 128 0; empty table
i1 0 -1 69.00 ; trigger instrument forever
f 1 1 128 -7 0 120 0 0 1 8 1 ;  line hammer
i2 1 10; Hammer it!

ftable 1: 128 points, scalemax 1.000
                                                            ____









________________________________________________________________



This should be the starting  shape that the excitation takes, however this is what happens:

Mass displacement 128 points, scalemax 0.208
       _
      .
     .



                                                       ._
                                                         '


________________________________________________________________


What is this?? why are there 2 peaks and not just the line to the right? Furthermore, as time goes on, it seems to get louder, but the audio being sent to the scanned instrument should be 0! (I tried this by giving giant values to the masses so that it doesn't move at all)

2.

I've tried saving the state of the springs with scanmap:

    indx = 0
    while indx < 128 do
        k1,k2 scanmap 2, 1, 1, indx
        tablew k1,indx,11
        tablew k2,indx,66
        indx = indx + 1
    od

however this seems to yield 2 empty tables

Missatge de Gerard Rodríguez <binbiniqegabenik@gmail.com> del dia dc., 5 de gen. 2022 a les 20:02:
for a bit more context what I'm trying to do is a scanned synthesis instrument with a behaviour similar to sympathetic resonance.
I'm modelling 2 "strings" for now as the 2 halves of a 128 string and a hammer shape to hit one half or the other. This induces some vibration on the other end.
The idea would be to model all of the strings of an instrument like that, so I need to be able to retrigger the instrument with different hammer shapes while keeping the internal state of the spring simulation to simulate plucking/hammering each string.

Missatge de Victor Lazzarini <Victor.Lazzarini@mu.ie> del dia dc., 5 de gen. 2022 a les 19:18:
To keep Csound open use

f 0 z

that'll keep it going beyond our lifetimes

Prof. Victor Lazzarini
Maynooth University
Ireland

On 5 Jan 2022, at 16:28, Gerard Rodríguez <binbiniqegabenik@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.

Hello list,

<CsoundSynthesizer>
<CsOptions>
; Select audio/midi flags here according to platform
; Audio out   Audio in    No messages
-odac      ;     -iadc     -d     ;;;RT audio I/O
; For Non-realtime ouput leave only the line below:
; -o scans.wav -W ;;; for file output any platform
</CsOptions>
<CsInstruments>
    sr =   44100
    ksmps =   32
    nchnls =   1

    instr 1
        a0 = 0
;       scanu init, irate, ifnvel, ifnmass, ifnstif, ifncentr, ifndamp, kmass, kstif, kcentr, kdamp, ileft, iright, kpos, kstrngth, ain, idisp, id
        scanu 1,     .01,    6,       2,       3,     4,        5,       2,     .1,    .1,     -.01,  .1,    .5,     0,    0,        a0,  1,     2
;ar     scans       kamp,      kfreq,      ifntraj, id
        a1  scans ampdb(p5), cpsmidinn(p4), 7,       2
        ihold
        outs a1,a1
    endin
</CsInstruments>
<CsScore>
f1 0 128 -7 0 128 0 ; Initial condition
f2 0 128 -7 1 128 1 ; uniform masses
f3 0 16384 -23 "string-128.matrxB" ; Spring matrices
f4 0 128 -7 0 128 0  ; no force ; Centering force
f5 0 128 -7 0 128 0 ; no damping ; Damping
f6 0 128 -7 0 128 0 ; Initial velocity
f7 0 128 -7 0 128 127 ; linear Trajectories

; Note list
f 1 0 128 -7 -1 128 1 0 ; sawtooth
i1 0 1000 69.00 75
e
</CsScore>
</CsoundSynthesizer>

In this very simple scanned synthesis instrument, either using ihold or a negative p3 doesn't work. (csound just exits immediately).

I need the note to be held to simulate rehammering the string *without* resetting the state of the masses.
I was going to do some hack like this:

while indx < 128 do
    k1,k2 xscanmap 2, 1, 1, indx
    kvel table indx,1
    tablew k1+kvel,indx,1
    tablew k2,indx,6
od

to add the hammer waveform over the current state of the vibrating system but I can't do that without the note being held.

Thank you in advance.
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