[Csnd] Two instances of PrePiano?

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

[Csnd] Two instances of PrePiano?

fauveboy
With the program below, I was expecting two instances of prepiano to play
simultaneously. Why does it only play the second note? I hoping to play a
chord from the instrument?

Many thanks


<CsoundSynthesizer>
<CsOptions>
; Select audio/midi flags here according to platform
-odac     ;;;realtime audio out
;-iadc    ;;;uncomment -iadc if real audio input is needed too
; For Non-realtime ouput leave only the line below:
; -o prepiano.wav -W ;;; for file output any platform
</CsOptions>
<CsInstruments>

sr = 44100
ksmps = 32
nchnls = 2
0dbfs  = 1

instr 1

ifreq = cpspch(p4)
iamp = p5




;;            
FRQ4|NO.STR5|DTUN6|STIF7|DCAY8|HIFRQ9|MASS10|HMFQ11|HMPOS|STPOS| VEL  |sFRQ
| scn |
aa, ab prepiano ifreq,  p6,  p7, p8,   p9,   p10,    p11,   p12,   p13,  
p14, p15,  p16,    p17, p18, p19


      outs aa*3.5, ab*3.5

endin
</CsInstruments>
<CsScore>
;f10 0 8 2 1 0.6 10 100 0.001 ;; 1 rattle
;f11 0 8 2 1 0.7 50 500 1000  ;; 1 rubber

; INS STR DUR ;FRQ4 AMP5
i 1 1 1   8.12 5

                ;NO.STR6 DTUN7 STIF8 DCAY9 HIFQDCAY10
                3 10 1 3 0.002
               
                ;MAS11 HMFQ12 HMPOS13 STRPOS14 VEL15
                2 2 1 5000 -0.01
               
                ;SCFRQ SCREAD RATTLE RUBBER
                0.09 40 0 0.5
               
               
               
                ; INS STR DUR ;FRQ4 AMP5
i 1 1 1   6.12 5

                ;NO.STR6 DTUN7 STIF8 DCAY9 HIFQDCAY10
                3 10 1 3 0.002
               
                ;MAS11 HMFQ12 HMPOS13 STRPOS14 VEL15
                2 2 1 5000 -0.01
               
                ;SCFRQ SCREAD RATTLE RUBBER
                0.09 40 0 0.5

               
               

e
</CsScore>
</CsoundSynthesizer>




--
Sent from: http://csound.1045644.n5.nabble.com/Csound-General-f1093014.html

Csound mailing list
[hidden email]
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
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] Two instances of PrePiano?

Victor Lazzarini-2
Both instances are playing here. It’s hard to hear because they’re the same pitch class, but
if you change it to an interval other than the octave you will hear it
========================
Prof. Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952

> On 11 Oct 2018, at 14:00, fauveboy <[hidden email]> wrote:
>
> With the program below, I was expecting two instances of prepiano to play
> simultaneously. Why does it only play the second note? I hoping to play a
> chord from the instrument?
>
> Many thanks
>
>
> <CsoundSynthesizer>
> <CsOptions>
> ; Select audio/midi flags here according to platform
> -odac     ;;;realtime audio out
> ;-iadc    ;;;uncomment -iadc if real audio input is needed too
> ; For Non-realtime ouput leave only the line below:
> ; -o prepiano.wav -W ;;; for file output any platform
> </CsOptions>
> <CsInstruments>
>
> sr = 44100
> ksmps = 32
> nchnls = 2
> 0dbfs  = 1
>
> instr 1
>
> ifreq = cpspch(p4)
> iamp = p5
>
>
>
>
> ;;            
> FRQ4|NO.STR5|DTUN6|STIF7|DCAY8|HIFRQ9|MASS10|HMFQ11|HMPOS|STPOS| VEL  |sFRQ
> | scn |
> aa, ab prepiano ifreq,  p6,  p7, p8,   p9,   p10,    p11,   p12,   p13,  
> p14, p15,  p16,    p17, p18, p19
>
>
>      outs aa*3.5, ab*3.5
>
> endin
> </CsInstruments>
> <CsScore>
> ;f10 0 8 2 1 0.6 10 100 0.001 ;; 1 rattle
> ;f11 0 8 2 1 0.7 50 500 1000  ;; 1 rubber
>
> ; INS STR DUR ;FRQ4 AMP5
> i 1 1 1   8.12 5
>
> ;NO.STR6 DTUN7 STIF8 DCAY9 HIFQDCAY10
> 3 10 1 3 0.002
>
> ;MAS11 HMFQ12 HMPOS13 STRPOS14 VEL15
> 2 2 1 5000 -0.01
>
> ;SCFRQ SCREAD RATTLE RUBBER
> 0.09 40 0 0.5
>
>
>
> ; INS STR DUR ;FRQ4 AMP5
> i 1 1 1   6.12 5
>
> ;NO.STR6 DTUN7 STIF8 DCAY9 HIFQDCAY10
> 3 10 1 3 0.002
>
> ;MAS11 HMFQ12 HMPOS13 STRPOS14 VEL15
> 2 2 1 5000 -0.01
>
> ;SCFRQ SCREAD RATTLE RUBBER
> 0.09 40 0 0.5
>
>
>
>
> e
> </CsScore>
> </CsoundSynthesizer>
>
>
>
>
> --
> Sent from: http://csound.1045644.n5.nabble.com/Csound-General-f1093014.html
>
> Csound mailing list
> [hidden email]
> 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
[hidden email]
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
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] Two instances of PrePiano?

fauveboy
Ah, thats true but I realised I need to show you this combination of
instruments where the original problem is occurring still:

<CsoundSynthesizer>
<CsOptions>
; Select audio/midi flags here according to platform
-odac     ;;;realtime audio out
;-iadc    ;;;uncomment -iadc if real audio input is needed too
; For Non-realtime ouput leave only the line below:
; -o prepiano.wav -W ;;; for file output any platform
</CsOptions>
<CsInstruments>

sr = 44100
ksmps = 32
nchnls = 2
0dbfs  = 1

zakinit 10, 10

        instr 1

ifreq = cpspch(p4)
iamp = p5

iamp1 = p20
iamp2 = p21

izout1 = p22
izout2 = p23




;;            
FRQ4|NO.STR5|DTUN6|STIF7|DCAY8|HIFRQ9|MASS10|HMFQ11|HMPOS|STPOS| VEL  |sFRQ
| scn |
aa, ab prepiano ifreq,  p6,  p7, p8,   p9,   p10,    p11,   p12,   p13,  
p14, p15,  p16,    p17, p18, p19


     
      zaw aa*iamp1, izout1
      zaw ab*iamp2, izout2

        endin
       
       
        instr 2
       

asig1 zar p4

kgl1 = p5*(p6)
kgr1 = p5*(1-p6)

asig2 zar p7

kgl2 = p8*(p9)
kgr2 = p8*(1-p9)

asig1 = asig1*kgl1+asig2*kgl2
asig2 = asig1*kgl1+asig2*kgl2

        outs asig1,asig2
       
        zacl 0, 10


        endin
       
       
</CsInstruments>
<CsScore>
;f10 0 8 2 1 0.6 10 100 0.001 ;; 1 rattle
;f11 0 8 2 1 0.7 50 500 1000  ;; 1 rubber

; INS STR DUR ;FRQ4 AMP5
i 1 1 1   8.12 5

                ;NO.STR6 DTUN7 STIF8 DCAY9 HIFQDCAY10
                3 10 1 3 0.002
               
                ;MAS11 HMFQ12 HMPOS13 STRPOS14 VEL15
                2 2 1 5000 -0.01
               
                ;SCFRQ SCREAD RATTLE RUBBER
                0.09 40 0 0.5
               
                ;AMP1 AMP1
                0.0 0.7
               
                ;CH1 CH2
                1 2
                 
               
               
; INS STR DUR ;FRQ4 AMP5
i 1 1 1   6.12 5

                ;NO.STR6 DTUN7 STIF8 DCAY9 HIFQDCAY10
                3 10 1 3 0.002
               
                ;MAS11 HMFQ12 HMPOS13 STRPOS14 VEL15
                2 2 1 5000 -0.0
               
                ;SCFRQ SCREAD RATTLE RUBBER
                0.09 40 0 0.5
               
               
                ;AMP1 AMP1
                0.1 0.0
       
;MIXER INST ST DUR
i 2 0 4

                ;CHN1[IN] GAIN PAN
                1 1 0.9
               
                ;CHN2[IN] GAIN PAN
                2 1 0.1
                       
       

e
</CsScore>
</CsoundSynthesizer>




--
Sent from: http://csound.1045644.n5.nabble.com/Csound-General-f1093014.html

Csound mailing list
[hidden email]
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
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] Two instances of PrePiano?

fauveboy
we this score you can here the first note get cut off by the second:

<CsoundSynthesizer>
<CsOptions>
; Select audio/midi flags here according to platform
-odac     ;;;realtime audio out
;-iadc    ;;;uncomment -iadc if real audio input is needed too
; For Non-realtime ouput leave only the line below:
; -o prepiano.wav -W ;;; for file output any platform
</CsOptions>
<CsInstruments>

sr = 44100
ksmps = 32
nchnls = 2
0dbfs  = 1

zakinit 10, 10

        instr 1

ifreq = cpspch(p4)
iamp = p5

iamp1 = p20
iamp2 = p21

izout1 = p22
izout2 = p23




;;            
FRQ4|NO.STR5|DTUN6|STIF7|DCAY8|HIFRQ9|MASS10|HMFQ11|HMPOS|STPOS| VEL  |sFRQ
| scn |
aa, ab prepiano ifreq,  p6,  p7, p8,   p9,   p10,    p11,   p12,   p13,  
p14, p15,  p16,    p17, p18, p19


     
      zaw aa*iamp1, izout1
      zaw ab*iamp2, izout2

        endin
       
       
        instr 2
       

asig1 zar p4

kgl1 = p5*(p6)
kgr1 = p5*(1-p6)

asig2 zar p7

kgl2 = p8*(p9)
kgr2 = p8*(1-p9)

asig1 = asig1*kgl1+asig2*kgl2
asig2 = asig1*kgl1+asig2*kgl2

        outs asig1,asig2
       
        zacl 0, 10


        endin
       
       
</CsInstruments>
<CsScore>
;f10 0 8 2 1 0.6 10 100 0.001 ;; 1 rattle
;f11 0 8 2 1 0.7 50 500 1000  ;; 1 rubber

; INS STR DUR ;FRQ4 AMP5
i 1 0.9 1   8.12 5

                ;NO.STR6 DTUN7 STIF8 DCAY9 HIFQDCAY10
                3 10 1 3 0.002
               
                ;MAS11 HMFQ12 HMPOS13 STRPOS14 VEL15
                2 2 1 5000 -0.01
               
                ;SCFRQ SCREAD RATTLE RUBBER
                0.09 40 0 0.5
               
                ;AMP1 AMP1
                0.0 0.9
               
                ;CH1 CH2
                1 2
                 
               
               
; INS STR DUR ;FRQ4 AMP5
i 1 1 1   6.12 5

                ;NO.STR6 DTUN7 STIF8 DCAY9 HIFQDCAY10
                3 10 1 3 0.002
               
                ;MAS11 HMFQ12 HMPOS13 STRPOS14 VEL15
                2 2 1 5000 -0.0
               
                ;SCFRQ SCREAD RATTLE RUBBER
                0.09 40 0 0.5
               
               
                ;AMP1 AMP1
                0.5 0.0
       
;MIXER INST ST DUR
i 2 0 4

                ;CHN1[IN] GAIN PAN
                1 1 0.5
               
                ;CHN2[IN] GAIN PAN
                2 1 0.5
                       
       

e
</CsScore>
</CsoundSynthesizer>




--
Sent from: http://csound.1045644.n5.nabble.com/Csound-General-f1093014.html

Csound mailing list
[hidden email]
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
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] Two instances of PrePiano?

jpff
Cc both noted write to the same Zak location without adding the signals

Sent from TypeApp
On 11 Oct 2018, at 16:50, fauveboy <[hidden email]> wrote:
we this score you can here the first note get cut off by the second:

<CsoundSynthesizer>
<CsOptions>
; Select audio/midi flags here according to platform
-odac ;;;realtime audio out
;-iadc ;;;uncomment -iadc if real audio input is needed too
; For Non-realtime ouput leave only the line below:
; -o prepiano.wav -W ;;; for file output any platform
</CsOptions>
<CsInstruments>

sr = 44100
ksmps = 32
nchnls = 2
0dbfs = 1

zakinit 10, 10

instr 1

ifreq = cpspch(p4)
iamp = p5

iamp1 = p20
iamp2 = p21

izout1 = p22
izout2 = p23




;;
FRQ4|NO.STR5|DTUN6|STIF7|DCAY8|HIFRQ9|MASS10|HMFQ11|HMPOS|STPOS| VEL |sFRQ
| scn |
aa, ab prepiano ifreq, p6, p7, p8, p9, p10, p11, p12, p13,
p14, p15, p16, p17, p18, p19



zaw aa*iamp1, izout1
zaw ab*iamp2, izout2

endin


instr 2


asig1 zar p4

kgl1 = p5*(p6)
kgr1 = p5*(1-p6)

asig2 zar p7

kgl2 = p8*(p9)
kgr2 = p8*(1-p9)

asig1 = asig1*kgl1+asig2*kgl2
asig2 = asig1*kgl1+asig2*kgl2

outs asig1,asig2

zacl 0, 10


endin


</CsInstruments>
<CsScore>
;f10 0 8 2 1 0.6 10 100 0.001 ;; 1 rattle
;f11 0 8 2 1 0.7 50 500 1000 ;; 1 rubber

; INS STR DUR ;FRQ4 AMP5
i 1 0.9 1 8.12 5

;NO.STR6 DTUN7 STIF8 DCAY9 HIFQDCAY10
3 10 1 3 0.002

;MAS11 HMFQ12 HMPOS13 STRPOS14 VEL15
2 2 1 5000 -0.01

;SCFRQ SCREAD RATTLE RUBBER
0.09 40 0 0.5

;AMP1 AMP1
0.0 0.9

;CH1 CH2
1 2



; INS STR DUR ;FRQ4 AMP5
i 1 1 1 6.12 5

;NO.STR6 DTUN7 STIF8 DCAY9 HIFQDCAY10
3 10 1 3 0.002

;MAS11 HMFQ12 HMPOS13 STRPOS14 VEL15
2 2 1 5000 -0.0

;SCFRQ SCREAD RATTLE RUBBER
0.09 40 0 0.5


;AMP1 AMP1
0.5 0.0

;MIXER INST ST DUR
i 2 0 4

;CHN1[IN] GAIN PAN
1 1 0.5

;CHN2[IN] GAIN PAN
2 1 0.5



e
</CsScore>
</CsoundSynthesizer>




--
Sent from: http://csound.1045644.n5.nabble.com/Csound-General-f1093014.html

Csound mailing list
[hidden email]
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 [hidden email] 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
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] Two instances of PrePiano?

fauveboy
is there a way to add the signals?



--
Sent from: http://csound.1045644.n5.nabble.com/Csound-General-f1093014.html

Csound mailing list
[hidden email]
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
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] Two instances of PrePiano?

hlolli
Did you try zar first and zaw the mixed signals? If you use chn istead of the zak system, then you can mix them with chnmix and as a bonus you don't need to initialize them, you can directly call chnset (not sure with chnmix, I tend to read and write for mixing).

On Wed, 17 Oct 2018 at 15:41, fauveboy <[hidden email]> wrote:
is there a way to add the signals?



--
Sent from: http://csound.1045644.n5.nabble.com/Csound-General-f1093014.html

Csound mailing list
[hidden email]
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 [hidden email] 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
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] Two instances of PrePiano?

jpff
In reply to this post by fauveboy
zawm opcode is what you need


On Wed, 17 Oct 2018, fauveboy wrote:

> is there a way to add the signals?
>
>
>
> --
> Sent from: http://csound.1045644.n5.nabble.com/Csound-General-f1093014.html
>
> Csound mailing list
> [hidden email]
> 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
[hidden email]
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