| No, not event_i, that one is i-time only.
========================
Dr Victor Lazzarini
Dean of Arts, Celtic Studies and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952
> On 18 Aug 2015, at 10:11, Richard wrote:
>
> Yes, tried it with event_i too now. Instrument 4 is always started
> (should not happen), but
>
> printk2 gkAI
>
> is only executed when the level is exceeded.
> It's a mystery to me....
>
> Richard
>
>
>
> On 18/08/15 10:23, Victor Lazzarini wrote:
>> Did you try event as suggested? There might be a chance that schedkwhen is running at both i and k time.
>>
>> Victor Lazzarini
>> Dean of Arts, Celtic Studies, and Philosophy
>> Maynooth University
>> Ireland
>>
>>> On 18 Aug 2015, at 08:59, Richard wrote:
>>>
>>> Yes, it must be something like this. Changed it accoring a McCurdy
>>> sample, but still not doing what I want.
>>> Instrument 4 is always started.
>>> Here's the csd
>>>
>>> ;
>>> ; autoRec: automatically record a sound file when signal is above a
>>> treshold
>>> ;
>>>
>>>
>>> ;CHANGE YOUR INPUT AND OUTPUT DEVICE NUMBER HERE IF NECESSARY!
>>> -i adc0 -o dac0 -B 1024 -b 512
>>>
>>>
>>> sr = 11025 ;set sample rate
>>> ksmps = 32 ;number of samples per control cycle
>>> nchnls = 1 ;use one audio channel
>>> 0dbfs = 1 ;set maximum level as 1
>>>
>>> gkInLvl init 0.05
>>> gkDuration init 10
>>> gaI init 0
>>>
>>> instr 1
>>> gaI inch 1
>>> gkAI rms gaI
>>> endin
>>>
>>> instr 2
>>> if gkAI > gkInLvl then
>>> printk2 gkAI
>>> ;SCHEDKWHEN KTRIGGER, KMINTIM, KMAXNUM, KINSNUM, KWHEN, KDUR
>>> schedkwhen 1, 0, 1, 4, 0, -1
>>> ;TRIGGER RECORD
>>> turnoff
>>> endif
>>> endin
>>>
>>> instr 4 ;RECORD
>>> ain inch 1 ;READ AUDIO FROM MONO INPUT
>>> fout "out.wav", 4, ain ;WRITE MONO AUDIO TO A 16 BIT WAV (TYPE:4)
>>> gkrecdur line 0,1,1 ;REGISTER THE DURATION OF THE
>>> CURRENTLY RECORDED FILE
>>> ;printk2 gkrecdur
>>> if gkrecdur >gkDuration then
>>> turnoff
>>> endif
>>> endin
>>>
>>>
>>>
>>> i 1 0 30
>>> i 2 0 30
>>>
>>>
>>>
>>>> On 18/08/15 09:25, mskala@ansuz.sooke.bc.ca wrote:
>>>>> On Tue, 18 Aug 2015, Richard wrote:
>>>>> if kAI > gkInLvl then
>>>>> printk2 kAI
>>>>> turnon 4
>>>>> endif
>>>> turnon runs at i-time, and putting it inside a k-time if statement is
>>>> probably not going to have the effect you want. You may be able to make
>>>> it work using event or scoreline instead of turnon, but you'll have to
>>>> give some attention to making sure it doesn't start a new note on *every*
>>>> k-cycle for which the condition holds. It looks like you want it to only
>>>> start a new note on the first such k-cycle.
>>>
>>> ------------------------------------------------------------------------------
>>> _______________________________________________
>>> Csound-users mailing list
>>> Csound-users@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/csound-users
>>> Send bugs reports to
>>> https://github.com/csound/csound/issues
>>> Discussions of bugs and features can be posted here
>> ------------------------------------------------------------------------------
>> _______________________________________________
>> Csound-users mailing list
>> Csound-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-users
>> Send bugs reports to
>> https://github.com/csound/csound/issues
>> Discussions of bugs and features can be posted here
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Csound-users mailing list
> Csound-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-users
> Send bugs reports to
> https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here
------------------------------------------------------------------------------
_______________________________________________
Csound-users mailing list
Csound-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-users
Send bugs reports to
https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here |