[Csnd] monitor opcode and -j command line option

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

[Csnd] monitor opcode and -j command line option

Francesco Porta
Hello All,
i'm using monitor opcode to recording a performance but
if i use -j option in command line monitor is not working
(using it with fout give me a blank audio file).
It is right or i'm wronging somethings?

Thanks,
ciao,
francesco.

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] monitor opcode and -j command line option

Francois PINOT
Could you please append a csd?
François

Le dim. 30 sept. 2018 à 11:48, Francesco Porta <[hidden email]> a écrit :
Hello All,
i'm using monitor opcode to recording a performance but
if i use -j option in command line monitor is not working
(using it with fout give me a blank audio file).
It is right or i'm wronging somethings?

Thanks,
ciao,
francesco.

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] monitor opcode and -j command line option

Francesco Porta
yes thank you.
Attached is a more simplified version of my csd.
Also it is at bottom.
If i comment out the -j2 option it is working.

Thanks,
ciao,
francesco.


<CsoundSynthesizer>
<CsOptions>
-odac -iadc -+rtaudio=jack -d -m0 -j2
</CsOptions>
<CsInstruments>
sr = 44100
ksmps = 256
nchnls = 2
0dbfs  = 1

; GLOBALI
gaInput init 0
gaR init 0
gaL init 0
gamincer init 0

; durata della registrazione della nota
giNoteDur = 3
gkNoteNumber init 0
giTableLen = sr*giNoteDur

; tavola per il tempo di mincer
gifntime ftgen 0, 0, 4096, -7, giNoteDur*0.3, 2048, giNoteDur*0.9, 2048,
giNoteDur*0.3

; REVERB
gkReverbLevel chnexport "ReverbLevel", 1
gkReverbLevel init 0.5
gkReverbTime chnexport "ReverbTime", 1
gkReverbTime init 0.5

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; UDO
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

; intervallo tra i triggers di almeno giNoteDur sec.
opcode Trigger, kk, a

ainput xin
iThresh = 0.1
iWait = kr*giNoteDur
kTimer init 1
kRms rms ainput, 20
iSampTim = 0.01
kRmsPrev delayk kRms, iSampTim
kChange = kRms - kRmsPrev

if(kTimer>iWait) then
     if kChange > iThresh then
         kTrig = 1
         gkNoteNumber += 1
     else
         kTrig = 0
     endif
     kTimer = kTrig == 1 ? 0 : kTimer
else
     kTimer += 1
     kTrig = 0
endif
xout kTrig, gkNoteNumber
endop

instr 10

gaInput diskin2 "guitar_C.wav", 1
endin

instr 11

ktrig, knote Trigger gaInput
; numero della tavola dell'audio uguale al numero di drone
schedkwhen ktrig, 0, 0, 12, 0, giNoteDur, knote
endin

instr 12

iTableNum = p4

; crea una tavola per l'audio
iTable ftgen  iTableNum, 0, giTableLen, 2, 0

andx line 0, p3, giTableLen
tablew gaInput, andx, iTable

; fa partire drone
event_i "i", 20, 0, 30, iTable
endin

; MINCER
instr 20

ifn = p4
ilock = 0

atime poscil 1, 0.03, gifntime
audio mincer atime, 1, 1, ifn, ilock
kenv linsegr 0, 6, 1, p3 - 6, 1, 10, 0
gamincer += audio*kenv
endin

; PUNTO DI RACCOLTA AUDIO PRIMA DI INVIARLO AL REVERB
instr 500

; mincer
iGain1 = 2
amincer = gamincer*iGain1
kpan1 init 0.5
kpan1 randomh 1, 0.05, 0.1
kpan1 port kpan1, 4
gaL, gaR pan2 amincer, kpan1
gamincer = 0
endin

; OUTPUT DEL DRONE CON REVERB
instr 1000

al, ar reverbsc gaL, gaR, gkReverbTime, 10000
al = gaL*(1-gkReverbLevel) + al*gkReverbLevel
ar = gaR*(1-gkReverbLevel) + ar*gkReverbLevel
outs    al, ar
gaL = 0
gaR = 0
endin

; RECORD
instr 1200

aoutl, aoutr monitor
Sname strget p4
fout Sname, 6, aoutl, aoutr
endin

</CsInstruments>
<CsScore>

i 10 4 10
i 11 0 30
i 500 0 30
i 1000 0 30
i 1200 0 30 "test1.wav"

</CsScore>
</CsoundSynthesizer>



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

simple1.csd (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] monitor opcode and -j command line option

Francois PINOT
There's the same kind of problem with the monitor.csd example of the manual (https://csound.com/docs/manual/monitor.html). When running the example with the command csound -j1 monitor.csd, everything is OK. When running csound -jn monitor.csd with n >= 2 the output signal is distorted. I'll file an issue.

François

Le dim. 30 sept. 2018 à 12:29, fra <[hidden email]> a écrit :
yes thank you.
Attached is a more simplified version of my csd.
Also it is at bottom.
If i comment out the -j2 option it is working.

Thanks,
ciao,
francesco.


<CsoundSynthesizer>
<CsOptions>
-odac -iadc -+rtaudio=jack -d -m0 -j2
</CsOptions>
<CsInstruments>
sr = 44100
ksmps = 256
nchnls = 2
0dbfs  = 1

; GLOBALI
gaInput init 0
gaR init 0
gaL init 0
gamincer init 0

; durata della registrazione della nota
giNoteDur = 3
gkNoteNumber init 0
giTableLen = sr*giNoteDur

; tavola per il tempo di mincer
gifntime ftgen 0, 0, 4096, -7, giNoteDur*0.3, 2048, giNoteDur*0.9, 2048,
giNoteDur*0.3

; REVERB
gkReverbLevel chnexport "ReverbLevel", 1
gkReverbLevel init 0.5
gkReverbTime chnexport "ReverbTime", 1
gkReverbTime init 0.5

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; UDO
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

; intervallo tra i triggers di almeno giNoteDur sec.
opcode Trigger, kk, a

ainput xin
iThresh = 0.1
iWait = kr*giNoteDur
kTimer init 1
kRms rms ainput, 20
iSampTim = 0.01
kRmsPrev delayk kRms, iSampTim
kChange = kRms - kRmsPrev

if(kTimer>iWait) then
     if kChange > iThresh then
         kTrig = 1
         gkNoteNumber += 1
     else
         kTrig = 0
     endif
     kTimer = kTrig == 1 ? 0 : kTimer
else
     kTimer += 1
     kTrig = 0
endif
xout kTrig, gkNoteNumber
endop

instr 10

gaInput diskin2 "guitar_C.wav", 1
endin

instr 11

ktrig, knote Trigger gaInput
; numero della tavola dell'audio uguale al numero di drone
schedkwhen ktrig, 0, 0, 12, 0, giNoteDur, knote
endin

instr 12

iTableNum = p4

; crea una tavola per l'audio
iTable ftgen  iTableNum, 0, giTableLen, 2, 0

andx line 0, p3, giTableLen
tablew gaInput, andx, iTable

; fa partire drone
event_i "i", 20, 0, 30, iTable
endin

; MINCER
instr 20

ifn = p4
ilock = 0

atime poscil 1, 0.03, gifntime
audio mincer atime, 1, 1, ifn, ilock
kenv linsegr 0, 6, 1, p3 - 6, 1, 10, 0
gamincer += audio*kenv
endin

; PUNTO DI RACCOLTA AUDIO PRIMA DI INVIARLO AL REVERB
instr 500

; mincer
iGain1 = 2
amincer = gamincer*iGain1
kpan1 init 0.5
kpan1 randomh 1, 0.05, 0.1
kpan1 port kpan1, 4
gaL, gaR pan2 amincer, kpan1
gamincer = 0
endin

; OUTPUT DEL DRONE CON REVERB
instr 1000

al, ar reverbsc gaL, gaR, gkReverbTime, 10000
al = gaL*(1-gkReverbLevel) + al*gkReverbLevel
ar = gaR*(1-gkReverbLevel) + ar*gkReverbLevel
outs    al, ar
gaL = 0
gaR = 0
endin

; RECORD
instr 1200

aoutl, aoutr monitor
Sname strget p4
fout Sname, 6, aoutl, aoutr
endin

</CsInstruments>
<CsScore>

i 10 4 10
i 11 0 30
i 500 0 30
i 1000 0 30
i 1200 0 30 "test1.wav"

</CsScore>
</CsoundSynthesizer>



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] monitor opcode and -j command line option

jpff
Believed fixed


On Sun, 30 Sep 2018, Francois PINOT wrote:

> There's the same kind of problem with the monitor.csd example of the manual
> (https://csound.com/docs/manual/monitor.html). When running the example with
> the command csound -j1 monitor.csd, everything is OK. When running csound -jn
> monitor.csd with n >= 2 the output signal is distorted. I'll file an issue.
>
> François
>
> Le dim. 30 sept. 2018 à 12:29, fra <[hidden email]> a écrit :
>       yes thank you.
>       Attached is a more simplified version of my csd.
>       Also it is at bottom.
>       If i comment out the -j2 option it is working.
>
>       Thanks,
>       ciao,
>       francesco.
>
>
>       <CsoundSynthesizer>
>       <CsOptions>
>       -odac -iadc -+rtaudio=jack -d -m0 -j2
>       </CsOptions>
>       <CsInstruments>
>       sr = 44100
>       ksmps = 256
>       nchnls = 2
>       0dbfs  = 1
>
>       ; GLOBALI
>       gaInput init 0
>       gaR init 0
>       gaL init 0
>       gamincer init 0
>
>       ; durata della registrazione della nota
>       giNoteDur = 3
>       gkNoteNumber init 0
>       giTableLen = sr*giNoteDur
>
>       ; tavola per il tempo di mincer
>       gifntime ftgen 0, 0, 4096, -7, giNoteDur*0.3, 2048, giNoteDur*0.9,
>       2048,
>       giNoteDur*0.3
>
>       ; REVERB
>       gkReverbLevel chnexport "ReverbLevel", 1
>       gkReverbLevel init 0.5
>       gkReverbTime chnexport "ReverbTime", 1
>       gkReverbTime init 0.5
>
>       ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
>       ;; UDO
>       ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
>
>       ; intervallo tra i triggers di almeno giNoteDur sec.
>       opcode Trigger, kk, a
>
>       ainput xin
>       iThresh = 0.1
>       iWait = kr*giNoteDur
>       kTimer init 1
>       kRms rms ainput, 20
>       iSampTim = 0.01
>       kRmsPrev delayk kRms, iSampTim
>       kChange = kRms - kRmsPrev
>
>       if(kTimer>iWait) then
>            if kChange > iThresh then
>                kTrig = 1
>                gkNoteNumber += 1
>            else
>                kTrig = 0
>            endif
>            kTimer = kTrig == 1 ? 0 : kTimer
>       else
>            kTimer += 1
>            kTrig = 0
>       endif
>       xout kTrig, gkNoteNumber
>       endop
>
>       instr 10
>
>       gaInput diskin2 "guitar_C.wav", 1
>       endin
>
>       instr 11
>
>       ktrig, knote Trigger gaInput
>       ; numero della tavola dell'audio uguale al numero di drone
>       schedkwhen ktrig, 0, 0, 12, 0, giNoteDur, knote
>       endin
>
>       instr 12
>
>       iTableNum = p4
>
>       ; crea una tavola per l'audio
>       iTable ftgen  iTableNum, 0, giTableLen, 2, 0
>
>       andx line 0, p3, giTableLen
>       tablew gaInput, andx, iTable
>
>       ; fa partire drone
>       event_i "i", 20, 0, 30, iTable
>       endin
>
>       ; MINCER
>       instr 20
>
>       ifn = p4
>       ilock = 0
>
>       atime poscil 1, 0.03, gifntime
>       audio mincer atime, 1, 1, ifn, ilock
>       kenv linsegr 0, 6, 1, p3 - 6, 1, 10, 0
>       gamincer += audio*kenv
>       endin
>
>       ; PUNTO DI RACCOLTA AUDIO PRIMA DI INVIARLO AL REVERB
>       instr 500
>
>       ; mincer
>       iGain1 = 2
>       amincer = gamincer*iGain1
>       kpan1 init 0.5
>       kpan1 randomh 1, 0.05, 0.1
>       kpan1 port kpan1, 4
>       gaL, gaR pan2 amincer, kpan1
>       gamincer = 0
>       endin
>
>       ; OUTPUT DEL DRONE CON REVERB
>       instr 1000
>
>       al, ar reverbsc gaL, gaR, gkReverbTime, 10000
>       al = gaL*(1-gkReverbLevel) + al*gkReverbLevel
>       ar = gaR*(1-gkReverbLevel) + ar*gkReverbLevel
>       outs    al, ar
>       gaL = 0
>       gaR = 0
>       endin
>
>       ; RECORD
>       instr 1200
>
>       aoutl, aoutr monitor
>       Sname strget p4
>       fout Sname, 6, aoutl, aoutr
>       endin
>
>       </CsInstruments>
>       <CsScore>
>
>       i 10 4 10
>       i 11 0 30
>       i 500 0 30
>       i 1000 0 30
>       i 1200 0 30 "test1.wav"
>
>       </CsScore>
>       </CsoundSynthesizer>
>
>
>
>       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
>
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] monitor opcode and -j command line option

Francois PINOT
I confirm. It's fixed. Thanks John.

Le dim. 30 sept. 2018 à 17:01, jpff <[hidden email]> a écrit :
Believed fixed


On Sun, 30 Sep 2018, Francois PINOT wrote:

> There's the same kind of problem with the monitor.csd example of the manual
> (https://csound.com/docs/manual/monitor.html). When running the example with
> the command csound -j1 monitor.csd, everything is OK. When running csound -jn
> monitor.csd with n >= 2 the output signal is distorted. I'll file an issue.
>
> François
>
> Le dim. 30 sept. 2018 à 12:29, fra <[hidden email]> a écrit :
>       yes thank you.
>       Attached is a more simplified version of my csd.
>       Also it is at bottom.
>       If i comment out the -j2 option it is working.
>
>       Thanks,
>       ciao,
>       francesco.
>
>
>       <CsoundSynthesizer>
>       <CsOptions>
>       -odac -iadc -+rtaudio=jack -d -m0 -j2
>       </CsOptions>
>       <CsInstruments>
>       sr = 44100
>       ksmps = 256
>       nchnls = 2
>       0dbfs  = 1
>
>       ; GLOBALI
>       gaInput init 0
>       gaR init 0
>       gaL init 0
>       gamincer init 0
>
>       ; durata della registrazione della nota
>       giNoteDur = 3
>       gkNoteNumber init 0
>       giTableLen = sr*giNoteDur
>
>       ; tavola per il tempo di mincer
>       gifntime ftgen 0, 0, 4096, -7, giNoteDur*0.3, 2048, giNoteDur*0.9,
>       2048,
>       giNoteDur*0.3
>
>       ; REVERB
>       gkReverbLevel chnexport "ReverbLevel", 1
>       gkReverbLevel init 0.5
>       gkReverbTime chnexport "ReverbTime", 1
>       gkReverbTime init 0.5
>
>       ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
>       ;; UDO
>       ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
>
>       ; intervallo tra i triggers di almeno giNoteDur sec.
>       opcode Trigger, kk, a
>
>       ainput xin
>       iThresh = 0.1
>       iWait = kr*giNoteDur
>       kTimer init 1
>       kRms rms ainput, 20
>       iSampTim = 0.01
>       kRmsPrev delayk kRms, iSampTim
>       kChange = kRms - kRmsPrev
>
>       if(kTimer>iWait) then
>            if kChange > iThresh then
>                kTrig = 1
>                gkNoteNumber += 1
>            else
>                kTrig = 0
>            endif
>            kTimer = kTrig == 1 ? 0 : kTimer
>       else
>            kTimer += 1
>            kTrig = 0
>       endif
>       xout kTrig, gkNoteNumber
>       endop
>
>       instr 10
>
>       gaInput diskin2 "guitar_C.wav", 1
>       endin
>
>       instr 11
>
>       ktrig, knote Trigger gaInput
>       ; numero della tavola dell'audio uguale al numero di drone
>       schedkwhen ktrig, 0, 0, 12, 0, giNoteDur, knote
>       endin
>
>       instr 12
>
>       iTableNum = p4
>
>       ; crea una tavola per l'audio
>       iTable ftgen  iTableNum, 0, giTableLen, 2, 0
>
>       andx line 0, p3, giTableLen
>       tablew gaInput, andx, iTable
>
>       ; fa partire drone
>       event_i "i", 20, 0, 30, iTable
>       endin
>
>       ; MINCER
>       instr 20
>
>       ifn = p4
>       ilock = 0
>
>       atime poscil 1, 0.03, gifntime
>       audio mincer atime, 1, 1, ifn, ilock
>       kenv linsegr 0, 6, 1, p3 - 6, 1, 10, 0
>       gamincer += audio*kenv
>       endin
>
>       ; PUNTO DI RACCOLTA AUDIO PRIMA DI INVIARLO AL REVERB
>       instr 500
>
>       ; mincer
>       iGain1 = 2
>       amincer = gamincer*iGain1
>       kpan1 init 0.5
>       kpan1 randomh 1, 0.05, 0.1
>       kpan1 port kpan1, 4
>       gaL, gaR pan2 amincer, kpan1
>       gamincer = 0
>       endin
>
>       ; OUTPUT DEL DRONE CON REVERB
>       instr 1000
>
>       al, ar reverbsc gaL, gaR, gkReverbTime, 10000
>       al = gaL*(1-gkReverbLevel) + al*gkReverbLevel
>       ar = gaR*(1-gkReverbLevel) + ar*gkReverbLevel
>       outs    al, ar
>       gaL = 0
>       gaR = 0
>       endin
>
>       ; RECORD
>       instr 1200
>
>       aoutl, aoutr monitor
>       Sname strget p4
>       fout Sname, 6, aoutl, aoutr
>       endin
>
>       </CsInstruments>
>       <CsScore>
>
>       i 10 4 10
>       i 11 0 30
>       i 500 0 30
>       i 1000 0 30
>       i 1200 0 30 "test1.wav"
>
>       </CsScore>
>       </CsoundSynthesizer>
>
>
>
>       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
>

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