| Run to completion for me when writing an output file. I had to fake your
input file. What should I expect? #i ran with -v so i could see the
activity.
On Wed, 10 Oct 2018, Francesco Porta wrote:
> Hello All,
> i use an intrument that trigger new notes from live input.
> Then it start some pvs instruments. Because every instrument
> do pvs analysis i think that maybe should be better to have
> a single instrument doing analysis and then other instruments
> will use that.
>
> 1 - is this correct? Or analysis is not so computational expensive?
>
> Then i tried to use array of fsig (see my csd test) but it is not working.
> What am i doing wrong?
>
> Thanks,
> ciao,
> francesco.
>
>
>
> -odac -d -m0
>
>
>
> sr = 44100
> ksmps = 32
> nchnls = 2
> 0dbfs = 1
>
> gaInput init 0
>
> ; durata della registrazione della nota
> giNoteDur = 3
> gkNoteNumber init 0
>
> ; array delle tavole e degli fsig
> gfsig[] init 100
>
>
> ; intervallo tra i triggers di almeno giNoteDur sec.
> opcode Trigger, kk, a
>
> ainput xin
> iThresh = 0.1
> iWait = kr*giNoteDur
> kTimer init kr*giNoteDur + 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, 0, 1
> ktrig, knote Trigger gaInput
>
> ; start pvs analysis
> schedkwhen ktrig, 0, 0, 40, 0, giNoteDur, knote
> ;outs gaInput*0.1, gaInput*0.1
> endin
>
> instr 40
>
> iTableNum = p4
>
> fsig pvsanal gaInput, 1024, 256, 1024, 1
>
> gfsig[iTableNum] = fsig
>
> ; start pvs resynthesis
> event_i "i", 41, 0, giNoteDur, iTableNum
> endin
>
> instr 41
>
> aout pvsynth gfsig[p4]
> outs aout, aout
> endin
>
>
>
>
> i 10 0 360
>
>
>
>
>
>
> 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 |