Csound Csound-dev Csound-tekno Search About

problem with repluck and midi

Date2016-03-20 17:45
FromStefan Thomas
Subjectproblem with repluck and midi
Dear community,
I have a problem with the following patch. It doesn't produce any sound.Could it be possible, that midi and repluck dont't work well together?
I'm asking because my machine can produce sound with midi, when I'm using other opcodes.
Or did I overlook something which is quite obvious?
Here's my patch:

<CsoundSynthesizer>
<CsOptions>
-+rtaudio=jack -odac -+rtmidi=portmidi -Ma
</CsOptions>
; ==============================================
<CsInstruments>

sr    =    48000
ksmps     =     100
nchnls    =    2
0dbfs    =    1
massign 0,101
alwayson 101
instr 101
    idur = 7
    iamp ampmidi 0.4
    iton cpsmidi
    kenv linsegr 0,0.1,1,idur,0,0.1,0
    ipluck = 0.4
    krefl = 0.1
    anoise rand    iamp
    anoise butterhp anoise,3000
    knoisehuell linseg 1,0.01,0
    axcite = knoisehuell*anoise
    apluck     repluck    ipluck,iamp,iton,0.088,krefl,axcite   
    apluck = kenv*apluck
    outs apluck,apluck
endin

</CsInstruments>
; ==============================================
<CsScore>


</CsScore>
</CsoundSynthesizer>



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

Date2016-03-20 18:36
FromVictor Lazzarini
SubjectRe: problem with repluck and midi
Why alwayson ?

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

On 20 Mar 2016, at 17:45, Stefan Thomas <kontrapunktstefan@GMAIL.COM> wrote:

Dear community,
I have a problem with the following patch. It doesn't produce any sound.Could it be possible, that midi and repluck dont't work well together?
I'm asking because my machine can produce sound with midi, when I'm using other opcodes.
Or did I overlook something which is quite obvious?
Here's my patch:

<CsoundSynthesizer>
<CsOptions>
-+rtaudio=jack -odac -+rtmidi=portmidi -Ma
</CsOptions>
; ==============================================
<CsInstruments>

sr    =    48000
ksmps     =     100
nchnls    =    2
0dbfs    =    1
massign 0,101
alwayson 101
instr 101
    idur = 7
    iamp ampmidi 0.4
    iton cpsmidi
    kenv linsegr 0,0.1,1,idur,0,0.1,0
    ipluck = 0.4
    krefl = 0.1
    anoise rand    iamp
    anoise butterhp anoise,3000
    knoisehuell linseg 1,0.01,0
    axcite = knoisehuell*anoise
    apluck     repluck    ipluck,iamp,iton,0.088,krefl,axcite   
    apluck = kenv*apluck
    outs apluck,apluck
endin

</CsInstruments>
; ==============================================
<CsScore>


</CsScore>
</CsoundSynthesizer>



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

Date2016-03-20 19:49
FromStefan Thomas
SubjectRe: problem with repluck and midi
Dear Victor,
I thought alwyason would be necessery to activate the instrument.  But why does it prohibit the instrument to produce sound?

2016-03-20 19:36 GMT+01:00 Victor Lazzarini <Victor.Lazzarini@nuim.ie>:
Why alwayson ?

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

On 20 Mar 2016, at 17:45, Stefan Thomas <kontrapunktstefan@GMAIL.COM> wrote:

Dear community,
I have a problem with the following patch. It doesn't produce any sound.Could it be possible, that midi and repluck dont't work well together?
I'm asking because my machine can produce sound with midi, when I'm using other opcodes.
Or did I overlook something which is quite obvious?
Here's my patch:

<CsoundSynthesizer>
<CsOptions>
-+rtaudio=jack -odac -+rtmidi=portmidi -Ma
</CsOptions>
; ==============================================
<CsInstruments>

sr    =    48000
ksmps     =     100
nchnls    =    2
0dbfs    =    1
massign 0,101
alwayson 101
instr 101
    idur = 7
    iamp ampmidi 0.4
    iton cpsmidi
    kenv linsegr 0,0.1,1,idur,0,0.1,0
    ipluck = 0.4
    krefl = 0.1
    anoise rand    iamp
    anoise butterhp anoise,3000
    knoisehuell linseg 1,0.01,0
    axcite = knoisehuell*anoise
    apluck     repluck    ipluck,iamp,iton,0.088,krefl,axcite   
    apluck = kenv*apluck
    outs apluck,apluck
endin

</CsInstruments>
; ==============================================
<CsScore>


</CsScore>
</CsoundSynthesizer>



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

Date2016-03-20 21:03
FromVictor Lazzarini
SubjectRe: problem with repluck and midi
The instr is activated by midi, alwayson is not needed, but the issue might be elsewhere.

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

On 20 Mar 2016, at 19:49, Stefan Thomas <kontrapunktstefan@GMAIL.COM> wrote:

Dear Victor,
I thought alwyason would be necessery to activate the instrument.  But why does it prohibit the instrument to produce sound?

2016-03-20 19:36 GMT+01:00 Victor Lazzarini <Victor.Lazzarini@nuim.ie>:
Why alwayson ?

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

On 20 Mar 2016, at 17:45, Stefan Thomas <kontrapunktstefan@GMAIL.COM> wrote:

Dear community,
I have a problem with the following patch. It doesn't produce any sound.Could it be possible, that midi and repluck dont't work well together?
I'm asking because my machine can produce sound with midi, when I'm using other opcodes.
Or did I overlook something which is quite obvious?
Here's my patch:

<CsoundSynthesizer>
<CsOptions>
-+rtaudio=jack -odac -+rtmidi=portmidi -Ma
</CsOptions>
; ==============================================
<CsInstruments>

sr    =    48000
ksmps     =     100
nchnls    =    2
0dbfs    =    1
massign 0,101
alwayson 101
instr 101
    idur = 7
    iamp ampmidi 0.4
    iton cpsmidi
    kenv linsegr 0,0.1,1,idur,0,0.1,0
    ipluck = 0.4
    krefl = 0.1
    anoise rand    iamp
    anoise butterhp anoise,3000
    knoisehuell linseg 1,0.01,0
    axcite = knoisehuell*anoise
    apluck     repluck    ipluck,iamp,iton,0.088,krefl,axcite   
    apluck = kenv*apluck
    outs apluck,apluck
endin

</CsInstruments>
; ==============================================
<CsScore>


</CsScore>
</CsoundSynthesizer>



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

Date2016-03-20 21:16
FromIain McCurdy
SubjectRe: problem with repluck and midi
As Victor hints, removing the alwayson will allow your instrument to work. MIDI notes will activate your instrument when needed so no other activation is necessary. It used to be that we needed to have some sort of dummy score event to prevent Csound from exiting, when it assumed performance had completed, but we don't even need to do that anymore.
Your alwayson on was starting a held note within which iton (pluck frequency) was zero (not a midi note so cpsmidi output is zero). This was causing a large DC offset that was preventing the audio from subsequent MIDI activated notes from begin representable in Csound's output signal.
Hope this helps
Iain.


Date: Sun, 20 Mar 2016 20:49:13 +0100
From: kontrapunktstefan@GMAIL.COM
Subject: Re: [Csnd] problem with repluck and midi
To: CSOUND@LISTSERV.HEANET.IE

Dear Victor,
I thought alwyason would be necessery to activate the instrument.  But why does it prohibit the instrument to produce sound?

2016-03-20 19:36 GMT+01:00 Victor Lazzarini <Victor.Lazzarini@nuim.ie>:
Why alwayson ?

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

On 20 Mar 2016, at 17:45, Stefan Thomas <kontrapunktstefan@GMAIL.COM> wrote:

Dear community,
I have a problem with the following patch. It doesn't produce any sound.Could it be possible, that midi and repluck dont't work well together?
I'm asking because my machine can produce sound with midi, when I'm using other opcodes.
Or did I overlook something which is quite obvious?
Here's my patch:

<CsoundSynthesizer>
<CsOptions>
-+rtaudio=jack -odac -+rtmidi=portmidi -Ma
</CsOptions>
; ==============================================
<CsInstruments>

sr    =    48000
ksmps     =     100
nchnls    =    2
0dbfs    =    1
massign 0,101
alwayson 101
instr 101
    idur = 7
    iamp ampmidi 0.4
    iton cpsmidi
    kenv linsegr 0,0.1,1,idur,0,0.1,0
    ipluck = 0.4
    krefl = 0.1
    anoise rand    iamp
    anoise butterhp anoise,3000
    knoisehuell linseg 1,0.01,0
    axcite = knoisehuell*anoise
    apluck     repluck    ipluck,iamp,iton,0.088,krefl,axcite   
    apluck = kenv*apluck
    outs apluck,apluck
endin

</CsInstruments>
; ==============================================
<CsScore>


</CsScore>
</CsoundSynthesizer>



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