[Csnd] turnoff2 misbehavior?
Date | 2012-09-04 22:55 |
From | Takahiko Tsuchiya |
Subject | [Csnd] turnoff2 misbehavior? |
Hi all, (This is a repost from a few days ago... it somehow didn't reach the list? although I see it on the nabble archive.) I am making a MIDI instrument with a voice allocation limit, using the [turnoff2] to kill the oldest voice if there is more than 3 active voices. It works as expected when the release mode is set to 0 = immediate cut off, but when it’s set to allow the note release, all the active voice gets turned off. Is this a bug? (Csound v5.17.1)
<CsoundSynthesizer> <CsOptions> </CsOptions> <CsInstruments> sr = 44100 ksmps = 10 nchnls = 2 0dbfs = 1.0
gisine ftgen 1, 0, 4096, 10, 1 instr 1 kactive active 1 if kactive > 3 then ireleaseMode = p5 turnoff2 1, 1, ireleaseMode
endif iampgain = .3 kampenv madsr .01, 0, 1, 1 kamp = iampgain * kampenv ifrq = cpspch(p4) asig oscil kamp, ifrq, 1 outs asig, asig
endin </CsInstruments> <CsScore> t 0 120 i1 0 5 8.00 0 i. 1 . 8.04 . i. 2 . 8.07 . i. 3 . 8.11 .
i. 4 . 8.14 . s t 0 120 i1 0 5 8.00 1 i. 1 . 8.03 . i. 2 . 8.07 . i. 3 . 8.10 . i. 4 . 8.14 . e </CsScore>
</CsoundSynthesizer>
|