[Csnd] Opcode for randomly opening a gate with window function

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Csnd] Opcode for randomly opening a gate with window function

Anton Kholomiov
I'm looking for an opcode that creates an envelope.
It's mostly zero, but sometimes when trigger happens 
it produces a window function of some length in seconds.

Is there such an opcode?


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
|  
Report Content as Inappropriate

Re: [Csnd] Opcode for randomly opening a gate with window function

Anton Kholomiov
It's something like a phasor but it reads only one cycle when trigger happens
and then remains silent waiting for the next trigger. 

2017-03-04 20:57 GMT+03:00 Anton Kholomiov <[hidden email]>:
I'm looking for an opcode that creates an envelope.
It's mostly zero, but sometimes when trigger happens 
it produces a window function of some length in seconds.

Is there such an opcode?



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
|  
Report Content as Inappropriate

Re: [Csnd] Opcode for randomly opening a gate with window function

joachim-3
In reply to this post by Anton Kholomiov
it produces a window function or uses a window function?


On 04/03/17 18:57, Anton Kholomiov wrote:

> I'm looking for an opcode that creates an envelope.
> It's mostly zero, but sometimes when trigger happens
> it produces a window function of some length in seconds.
>
> Is there such an opcode?
>
>
> Csound mailing list [hidden email]
> <mailto:[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
|  
Report Content as Inappropriate

Re: [Csnd] Opcode for randomly opening a gate with window function

Victor Lazzarini
In reply to this post by Anton Kholomiov
A combination of lineto and tablei  could do the job.

ktrig init 0

kndx lineto ktrig, kdur
kenv tablei kndx, itab, 1


make ktrig 1 and it runs the envelope to the end in kdur secs. Set kdur and ktrig to 0 to reset.
(not tested)

========================
Prof. 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 4 Mar 2017, at 17:58, Anton Kholomiov <[hidden email]> wrote:
>
> It's something like a phasor but it reads only one cycle when trigger happens
> and then remains silent waiting for the next trigger.
>
> 2017-03-04 20:57 GMT+03:00 Anton Kholomiov <[hidden email]>:
> I'm looking for an opcode that creates an envelope.
> It's mostly zero, but sometimes when trigger happens
> it produces a window function of some length in seconds.
>
> Is there such an opcode?
>
>
>
> 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
|  
Report Content as Inappropriate

Re: [Csnd] Opcode for randomly opening a gate with window function

Anton Kholomiov
Thanks Victor, your ideas are very helpful as  usual.
Here is the solution if someone is interested in such a function:

~~~
opcode TrigTab k,kki

ktrig, kdur, ifn xin

kDelayedTrig delay1 ktrig
kPointer lineto ktrig, kDelayedTrig * kdur
kres tablei kPointer, ifn, 1

xout kres

endop
~~~

It can be useful with monophonic synthesizers. To schedule an envelope on trigger and also
for ambient music to create random slow envelopes.

Anton



2017-03-04 21:12 GMT+03:00 Victor Lazzarini <[hidden email]>:
A combination of lineto and tablei  could do the job.

ktrig init 0

kndx lineto ktrig, kdur
kenv tablei kndx, itab, 1


make ktrig 1 and it runs the envelope to the end in kdur secs. Set kdur and ktrig to 0 to reset.
(not tested)

========================
Prof. 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 4 Mar 2017, at 17:58, Anton Kholomiov <[hidden email]> wrote:
>
> It's something like a phasor but it reads only one cycle when trigger happens
> and then remains silent waiting for the next trigger.
>
> 2017-03-04 20:57 GMT+03:00 Anton Kholomiov <[hidden email]>:
> I'm looking for an opcode that creates an envelope.
> It's mostly zero, but sometimes when trigger happens
> it produces a window function of some length in seconds.
>
> Is there such an opcode?
>
>
>
> 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
Loading...