Csound Csound-dev Csound-tekno Search About

Opcode for randomly opening a gate with window function

Date2017-03-04 17:57
FromAnton Kholomiov
SubjectOpcode for randomly opening a gate with window function
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 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

Date2017-03-04 17:58
FromAnton Kholomiov
SubjectRe: Opcode for randomly opening a gate with window function
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 <anton.kholomiov@gmail.com>:
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 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

Date2017-03-04 18:04
Fromjoachim heintz
SubjectRe: Opcode for randomly opening a gate with window function
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 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

Date2017-03-04 18:12
FromVictor Lazzarini
SubjectRe: Opcode for randomly opening a gate with window function
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  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 :
> 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 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

Date2017-03-14 08:55
FromAnton Kholomiov
SubjectRe: Opcode for randomly opening a gate with window function
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 <Victor.Lazzarini@nuim.ie>:
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 <anton.kholomiov@gmail.com> 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 <anton.kholomiov@gmail.com>:
> 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 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