Csound Csound-dev Csound-tekno Search About

[Csnd] monitor opcode and -j command line option

Date2018-09-30 10:48
FromFrancesco Porta
Subject[Csnd] monitor opcode and -j command line option
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
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

Date2018-09-30 10:57
FromFrancois PINOT
SubjectRe: [Csnd] monitor opcode and -j command line option
Could you please append a csd?
François

Le dim. 30 sept. 2018 à 11:48, Francesco Porta <francescoarmandoporta@gmail.com> 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
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

Date2018-09-30 11:29
Fromfra
SubjectRe: [Csnd] monitor opcode and -j command line option
Attachmentssimple1.csd  
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.




-odac -iadc -+rtaudio=jack -d -m0 -j2


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




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






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

Date2018-09-30 13:02
FromFrancois PINOT
SubjectRe: [Csnd] monitor opcode and -j command line option
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 <francescoarmandoporta@gmail.com> 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
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

Date2018-09-30 16:00
Fromjpff
SubjectRe: [Csnd] monitor opcode and -j command line option
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  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.
> 
>
>       
>       
>       -odac -iadc -+rtaudio=jack -d -m0 -j2
>       
>       
>       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
>
>       
>       
>
>       i 10 4 10
>       i 11 0 30
>       i 500 0 30
>       i 1000 0 30
>       i 1200 0 30 "test1.wav"
>
>       
>       
> 
> 
>
>       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

Date2018-10-01 08:00
FromFrancois PINOT
SubjectRe: [Csnd] monitor opcode and -j command line option
I confirm. It's fixed. Thanks John.

Le dim. 30 sept. 2018 à 17:01, jpff <jpff@codemist.co.uk> 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 <francescoarmandoporta@gmail.com> 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
>       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