Csound Csound-dev Csound-tekno Search About

[ANN] pattern_sequencer

Date2016-08-25 21:18
FromSteven Yi
Subject[ANN] pattern_sequencer
Hi All,

I've put together a pattern_sequencer UDO available at:

https://github.com/kunstmusik/libsyi/blob/master/pattern_sequencer.udo

The current test file is at:

https://github.com/kunstmusik/libsyi/blob/master/tests/gate.csd

The pattern_sequencer is modeled loosely on the Doepfer Schaltwerk
modular sequencer (http://www.doepfer.de/sw_e.htm).  It uses a single
global k-array to hold 128 patterns, with each pattern holding 8
sequences of 16 values. The array is global to avoid array copying
when passing arguments in UDOs.

Some comments;

* set_pat_seq_instr is an instrument for setting patterns.  It's done
this way because arrays have some quirks in assuming array get/set are
k-rate if the array is holding k-values.  This means that array sets
can not happen in instr 0 space without Csound complaining of an
error, which was not good for live coding.  The instrument turns
itself off after the init pass to get this to work.  Another UDO,
set_pattern_seq, wraps calling set_pat_seq_instr.  The arguments to
the UDO are the pattern number, sequence number, and the 16 values to
use for the sequence.

* Regarding the gate.csd, the primary things are the gatempo and
gaclock.  gaclock is driven by an mpulse opcode. gatempo is used for
the frequency of the clock as well as lfo frequencies.  clock_div is
used to slow the main gaclock; for example, in the sequencer
instrument, a clock_div with 16 means it will generate a pulse every
16 times that the main clock ticks.  That clock_div pulse is used to
tick the seqsig that reads from gk_songpattern every 4 measures (16
ticks).  The songpattern is very simple in this version and reads as
"play pattern 0 3 times, then pattern 1, then alternate pattern 0 and
1 for four measures".  As seqsig will loop, that song structure will
repeat.  The example currently just sets the pattern to use for the
bass_drum instrument.  Values in the pattern may be anything, so it
could be used for pitch values or trigger values.

* A known issue is that the pattern index is k-rate as are some other
values. I will be modifying the code to use a-rate so that everything
aligns correctly for the pattern_sequencer changes.

* I'm not sure I mentioned it before, but the gate.udo reads in a
trigger signal and then holds a 1 value for a given duration in
seconds.  This can be used to drive the adsr140 envelope generator or
whatever else one would want.

* On the whole, I'm basing these UDOs on various modular synthesizer
modules.  I have on my list to implement an arpeggiator module as well
as something similar to the 4ms Rotating Clock Divider
(http://www.4mspedals.com/rcd.php).  If anyone has a request for a
module, please feel free to email here or file an issue in the libsyi
project on Github.

Thanks and enjoy!
steven

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

Date2016-08-26 07:21
From"Dr. Richard Boulanger"
SubjectRe: [ANN] pattern_sequencer
Steven,

This work is awesome,  inspiring,  and will be a great help in my teaching at Berklee, where we now have a ton of modular synths in the classrooms and the curriculum.

On Thu, Aug 25, 2016 at 4:18 PM, Steven Yi <stevenyi@gmail.com> wrote:
Hi All,

I've put together a pattern_sequencer UDO available at:

https://github.com/kunstmusik/libsyi/blob/master/pattern_sequencer.udo

The current test file is at:

https://github.com/kunstmusik/libsyi/blob/master/tests/gate.csd

The pattern_sequencer is modeled loosely on the Doepfer Schaltwerk
modular sequencer (http://www.doepfer.de/sw_e.htm).  It uses a single
global k-array to hold 128 patterns, with each pattern holding 8
sequences of 16 values. The array is global to avoid array copying
when passing arguments in UDOs.

Some comments;

* set_pat_seq_instr is an instrument for setting patterns.  It's done
this way because arrays have some quirks in assuming array get/set are
k-rate if the array is holding k-values.  This means that array sets
can not happen in instr 0 space without Csound complaining of an
error, which was not good for live coding.  The instrument turns
itself off after the init pass to get this to work.  Another UDO,
set_pattern_seq, wraps calling set_pat_seq_instr.  The arguments to
the UDO are the pattern number, sequence number, and the 16 values to
use for the sequence.

* Regarding the gate.csd, the primary things are the gatempo and
gaclock.  gaclock is driven by an mpulse opcode. gatempo is used for
the frequency of the clock as well as lfo frequencies.  clock_div is
used to slow the main gaclock; for example, in the sequencer
instrument, a clock_div with 16 means it will generate a pulse every
16 times that the main clock ticks.  That clock_div pulse is used to
tick the seqsig that reads from gk_songpattern every 4 measures (16
ticks).  The songpattern is very simple in this version and reads as
"play pattern 0 3 times, then pattern 1, then alternate pattern 0 and
1 for four measures".  As seqsig will loop, that song structure will
repeat.  The example currently just sets the pattern to use for the
bass_drum instrument.  Values in the pattern may be anything, so it
could be used for pitch values or trigger values.

* A known issue is that the pattern index is k-rate as are some other
values. I will be modifying the code to use a-rate so that everything
aligns correctly for the pattern_sequencer changes.

* I'm not sure I mentioned it before, but the gate.udo reads in a
trigger signal and then holds a 1 value for a given duration in
seconds.  This can be used to drive the adsr140 envelope generator or
whatever else one would want.

* On the whole, I'm basing these UDOs on various modular synthesizer
modules.  I have on my list to implement an arpeggiator module as well
as something similar to the 4ms Rotating Clock Divider
(http://www.4mspedals.com/rcd.php).  If anyone has a request for a
module, please feel free to email here or file an issue in the libsyi
project on Github.

Thanks and enjoy!
steven

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



--
_____________________________________________
Dr. Richard Boulanger
Professor of Electronic Production and Design
Professional Writing and Music Technology Division
Berklee College of Music
______________________________________________
President of Boulanger Labs - http://boulangerlabs.com
Author & Editor of The Csound Book - http://mitpress.mit.edu/books/csound-book
Author & Editor of The Audio Programming Book - http://mitpress.mit.edu/books/audio-programming-book
______________________________________________
about: http://www.boulangerlabs.com/about/richardboulanger/
about: http://www.csounds.com/community/developers/dr-richard-boulanger/
music: http://www.csounds.com/community/developers/dr-richard-boulanger/dr-richard-boulanger-music/

______________________________________________
email: rboulanger@berklee.edu
facebook: https://www.facebook.com/richard.boulanger.58
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

Date2016-08-26 08:09
FromHlöðver Sigurðsson
SubjectRe: [ANN] pattern_sequencer
Very neat, the gate should be ideal for a dubstep bass if someone is interested in such a music :)

2016-08-26 8:21 GMT+02:00 Dr. Richard Boulanger <rboulanger@berklee.edu>:
Steven,

This work is awesome,  inspiring,  and will be a great help in my teaching at Berklee, where we now have a ton of modular synths in the classrooms and the curriculum.

On Thu, Aug 25, 2016 at 4:18 PM, Steven Yi <stevenyi@gmail.com> wrote:
Hi All,

I've put together a pattern_sequencer UDO available at:

https://github.com/kunstmusik/libsyi/blob/master/pattern_sequencer.udo

The current test file is at:

https://github.com/kunstmusik/libsyi/blob/master/tests/gate.csd

The pattern_sequencer is modeled loosely on the Doepfer Schaltwerk
modular sequencer (http://www.doepfer.de/sw_e.htm).  It uses a single
global k-array to hold 128 patterns, with each pattern holding 8
sequences of 16 values. The array is global to avoid array copying
when passing arguments in UDOs.

Some comments;

* set_pat_seq_instr is an instrument for setting patterns.  It's done
this way because arrays have some quirks in assuming array get/set are
k-rate if the array is holding k-values.  This means that array sets
can not happen in instr 0 space without Csound complaining of an
error, which was not good for live coding.  The instrument turns
itself off after the init pass to get this to work.  Another UDO,
set_pattern_seq, wraps calling set_pat_seq_instr.  The arguments to
the UDO are the pattern number, sequence number, and the 16 values to
use for the sequence.

* Regarding the gate.csd, the primary things are the gatempo and
gaclock.  gaclock is driven by an mpulse opcode. gatempo is used for
the frequency of the clock as well as lfo frequencies.  clock_div is
used to slow the main gaclock; for example, in the sequencer
instrument, a clock_div with 16 means it will generate a pulse every
16 times that the main clock ticks.  That clock_div pulse is used to
tick the seqsig that reads from gk_songpattern every 4 measures (16
ticks).  The songpattern is very simple in this version and reads as
"play pattern 0 3 times, then pattern 1, then alternate pattern 0 and
1 for four measures".  As seqsig will loop, that song structure will
repeat.  The example currently just sets the pattern to use for the
bass_drum instrument.  Values in the pattern may be anything, so it
could be used for pitch values or trigger values.

* A known issue is that the pattern index is k-rate as are some other
values. I will be modifying the code to use a-rate so that everything
aligns correctly for the pattern_sequencer changes.

* I'm not sure I mentioned it before, but the gate.udo reads in a
trigger signal and then holds a 1 value for a given duration in
seconds.  This can be used to drive the adsr140 envelope generator or
whatever else one would want.

* On the whole, I'm basing these UDOs on various modular synthesizer
modules.  I have on my list to implement an arpeggiator module as well
as something similar to the 4ms Rotating Clock Divider
(http://www.4mspedals.com/rcd.php).  If anyone has a request for a
module, please feel free to email here or file an issue in the libsyi
project on Github.

Thanks and enjoy!
steven

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



--
_____________________________________________
Dr. Richard Boulanger
Professor of Electronic Production and Design
Professional Writing and Music Technology Division
Berklee College of Music
______________________________________________
President of Boulanger Labs - http://boulangerlabs.com
Author & Editor of The Csound Book - http://mitpress.mit.edu/books/csound-book
Author & Editor of The Audio Programming Book - http://mitpress.mit.edu/books/audio-programming-book
______________________________________________
about: http://www.boulangerlabs.com/about/richardboulanger/
about: http://www.csounds.com/community/developers/dr-richard-boulanger/
music: http://www.csounds.com/community/developers/dr-richard-boulanger/dr-richard-boulanger-music/

______________________________________________
email: rboulanger@berklee.edu
facebook: https://www.facebook.com/richard.boulanger.58
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

Date2016-08-26 13:18
FromSteven Yi
SubjectRe: [ANN] pattern_sequencer
Thanks Dr. B!  I'm enjoying exploring all of this and learning a lot
as I go along. I imagine if I had a budget I'd rather enjoy using a
physical modular synthesizer, but this suits what I'm looking for
rather nicely.  A few more modules on my list, then some synth
programming and testing out within Blue, and I think I'll be pretty
good to go for some live and composed work ideas I wanted to try out.
Hope others find these useful!

On Fri, Aug 26, 2016 at 2:21 AM, Dr. Richard Boulanger
 wrote:
> Steven,
>
> This work is awesome,  inspiring,  and will be a great help in my teaching
> at Berklee, where we now have a ton of modular synths in the classrooms and
> the curriculum.
>
> On Thu, Aug 25, 2016 at 4:18 PM, Steven Yi  wrote:
>>
>> Hi All,
>>
>> I've put together a pattern_sequencer UDO available at:
>>
>> https://github.com/kunstmusik/libsyi/blob/master/pattern_sequencer.udo
>>
>> The current test file is at:
>>
>> https://github.com/kunstmusik/libsyi/blob/master/tests/gate.csd
>>
>> The pattern_sequencer is modeled loosely on the Doepfer Schaltwerk
>> modular sequencer (http://www.doepfer.de/sw_e.htm).  It uses a single
>> global k-array to hold 128 patterns, with each pattern holding 8
>> sequences of 16 values. The array is global to avoid array copying
>> when passing arguments in UDOs.
>>
>> Some comments;
>>
>> * set_pat_seq_instr is an instrument for setting patterns.  It's done
>> this way because arrays have some quirks in assuming array get/set are
>> k-rate if the array is holding k-values.  This means that array sets
>> can not happen in instr 0 space without Csound complaining of an
>> error, which was not good for live coding.  The instrument turns
>> itself off after the init pass to get this to work.  Another UDO,
>> set_pattern_seq, wraps calling set_pat_seq_instr.  The arguments to
>> the UDO are the pattern number, sequence number, and the 16 values to
>> use for the sequence.
>>
>> * Regarding the gate.csd, the primary things are the gatempo and
>> gaclock.  gaclock is driven by an mpulse opcode. gatempo is used for
>> the frequency of the clock as well as lfo frequencies.  clock_div is
>> used to slow the main gaclock; for example, in the sequencer
>> instrument, a clock_div with 16 means it will generate a pulse every
>> 16 times that the main clock ticks.  That clock_div pulse is used to
>> tick the seqsig that reads from gk_songpattern every 4 measures (16
>> ticks).  The songpattern is very simple in this version and reads as
>> "play pattern 0 3 times, then pattern 1, then alternate pattern 0 and
>> 1 for four measures".  As seqsig will loop, that song structure will
>> repeat.  The example currently just sets the pattern to use for the
>> bass_drum instrument.  Values in the pattern may be anything, so it
>> could be used for pitch values or trigger values.
>>
>> * A known issue is that the pattern index is k-rate as are some other
>> values. I will be modifying the code to use a-rate so that everything
>> aligns correctly for the pattern_sequencer changes.
>>
>> * I'm not sure I mentioned it before, but the gate.udo reads in a
>> trigger signal and then holds a 1 value for a given duration in
>> seconds.  This can be used to drive the adsr140 envelope generator or
>> whatever else one would want.
>>
>> * On the whole, I'm basing these UDOs on various modular synthesizer
>> modules.  I have on my list to implement an arpeggiator module as well
>> as something similar to the 4ms Rotating Clock Divider
>> (http://www.4mspedals.com/rcd.php).  If anyone has a request for a
>> module, please feel free to email here or file an issue in the libsyi
>> project on Github.
>>
>> Thanks and enjoy!
>> steven
>>
>> 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
>
>
>
>
> --
> _____________________________________________
> Dr. Richard Boulanger
> Professor of Electronic Production and Design
> Professional Writing and Music Technology Division
> Berklee College of Music
> ______________________________________________
> President of Boulanger Labs - http://boulangerlabs.com
> Author & Editor of The Csound Book -
> http://mitpress.mit.edu/books/csound-book
> Author & Editor of The Audio Programming Book -
> http://mitpress.mit.edu/books/audio-programming-book
> ______________________________________________
> about: http://www.boulangerlabs.com/about/richardboulanger/
> about: http://www.csounds.com/community/developers/dr-richard-boulanger/
> music:
> http://www.csounds.com/community/developers/dr-richard-boulanger/dr-richard-boulanger-music/
> ______________________________________________
> email: rboulanger@berklee.edu
> facebook: https://www.facebook.com/richard.boulanger.58
> 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

Date2016-08-26 14:19
FromJohn DeBlase
SubjectRe: [ANN] pattern_sequencer
Thanks Steven! Looking forward to trying this out

> On Aug 26, 2016, at 8:18 AM, Steven Yi  wrote:
> 
> Thanks Dr. B!  I'm enjoying exploring all of this and learning a lot
> as I go along. I imagine if I had a budget I'd rather enjoy using a
> physical modular synthesizer, but this suits what I'm looking for
> rather nicely.  A few more modules on my list, then some synth
> programming and testing out within Blue, and I think I'll be pretty
> good to go for some live and composed work ideas I wanted to try out.
> Hope others find these useful!
> 
> On Fri, Aug 26, 2016 at 2:21 AM, Dr. Richard Boulanger
>  wrote:
>> Steven,
>> 
>> This work is awesome,  inspiring,  and will be a great help in my teaching
>> at Berklee, where we now have a ton of modular synths in the classrooms and
>> the curriculum.
>> 
>>> On Thu, Aug 25, 2016 at 4:18 PM, Steven Yi  wrote:
>>> 
>>> Hi All,
>>> 
>>> I've put together a pattern_sequencer UDO available at:
>>> 
>>> https://github.com/kunstmusik/libsyi/blob/master/pattern_sequencer.udo
>>> 
>>> The current test file is at:
>>> 
>>> https://github.com/kunstmusik/libsyi/blob/master/tests/gate.csd
>>> 
>>> The pattern_sequencer is modeled loosely on the Doepfer Schaltwerk
>>> modular sequencer (http://www.doepfer.de/sw_e.htm).  It uses a single
>>> global k-array to hold 128 patterns, with each pattern holding 8
>>> sequences of 16 values. The array is global to avoid array copying
>>> when passing arguments in UDOs.
>>> 
>>> Some comments;
>>> 
>>> * set_pat_seq_instr is an instrument for setting patterns.  It's done
>>> this way because arrays have some quirks in assuming array get/set are
>>> k-rate if the array is holding k-values.  This means that array sets
>>> can not happen in instr 0 space without Csound complaining of an
>>> error, which was not good for live coding.  The instrument turns
>>> itself off after the init pass to get this to work.  Another UDO,
>>> set_pattern_seq, wraps calling set_pat_seq_instr.  The arguments to
>>> the UDO are the pattern number, sequence number, and the 16 values to
>>> use for the sequence.
>>> 
>>> * Regarding the gate.csd, the primary things are the gatempo and
>>> gaclock.  gaclock is driven by an mpulse opcode. gatempo is used for
>>> the frequency of the clock as well as lfo frequencies.  clock_div is
>>> used to slow the main gaclock; for example, in the sequencer
>>> instrument, a clock_div with 16 means it will generate a pulse every
>>> 16 times that the main clock ticks.  That clock_div pulse is used to
>>> tick the seqsig that reads from gk_songpattern every 4 measures (16
>>> ticks).  The songpattern is very simple in this version and reads as
>>> "play pattern 0 3 times, then pattern 1, then alternate pattern 0 and
>>> 1 for four measures".  As seqsig will loop, that song structure will
>>> repeat.  The example currently just sets the pattern to use for the
>>> bass_drum instrument.  Values in the pattern may be anything, so it
>>> could be used for pitch values or trigger values.
>>> 
>>> * A known issue is that the pattern index is k-rate as are some other
>>> values. I will be modifying the code to use a-rate so that everything
>>> aligns correctly for the pattern_sequencer changes.
>>> 
>>> * I'm not sure I mentioned it before, but the gate.udo reads in a
>>> trigger signal and then holds a 1 value for a given duration in
>>> seconds.  This can be used to drive the adsr140 envelope generator or
>>> whatever else one would want.
>>> 
>>> * On the whole, I'm basing these UDOs on various modular synthesizer
>>> modules.  I have on my list to implement an arpeggiator module as well
>>> as something similar to the 4ms Rotating Clock Divider
>>> (http://www.4mspedals.com/rcd.php).  If anyone has a request for a
>>> module, please feel free to email here or file an issue in the libsyi
>>> project on Github.
>>> 
>>> Thanks and enjoy!
>>> steven
>>> 
>>> 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
>> 
>> 
>> 
>> 
>> --
>> _____________________________________________
>> Dr. Richard Boulanger
>> Professor of Electronic Production and Design
>> Professional Writing and Music Technology Division
>> Berklee College of Music
>> ______________________________________________
>> President of Boulanger Labs - http://boulangerlabs.com
>> Author & Editor of The Csound Book -
>> http://mitpress.mit.edu/books/csound-book
>> Author & Editor of The Audio Programming Book -
>> http://mitpress.mit.edu/books/audio-programming-book
>> ______________________________________________
>> about: http://www.boulangerlabs.com/about/richardboulanger/
>> about: http://www.csounds.com/community/developers/dr-richard-boulanger/
>> music:
>> http://www.csounds.com/community/developers/dr-richard-boulanger/dr-richard-boulanger-music/
>> ______________________________________________
>> email: rboulanger@berklee.edu
>> facebook: https://www.facebook.com/richard.boulanger.58
>> 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

Date2016-08-27 18:12
FromHlöðver Sigurðsson
SubjectRe: [ANN] pattern_sequencer
Hey Steven, Im now playing your step sequencer in pnacl in cljs. I'm trying to visually represent the steps, but I need to get the indicies. I already changed the seqsig opcode to accept karrlen as parameter (since dynamically allocated arrays are afaik not possible), now this part of the opcode

 while (kindx < ksmps) do
    if(agate[kindx] == 1) then 
      kpatindx = (kpatindx + 1) % karrlen
    endif
    aout[kindx] = kpattern[kpatindx]
    kpatindxout = kpatindx
    kindx += 1
  od
  xout aout, kpatindxout

lacks some way to output the current patindxout. Just wondering out loud if you know of any trick to fetch the current step within a given pattern of given length?

Best, Hlodver

2016-08-26 15:19 GMT+02:00 John DeBlase <bsnacks000@gmail.com>:
Thanks Steven! Looking forward to trying this out

> On Aug 26, 2016, at 8:18 AM, Steven Yi <stevenyi@GMAIL.COM> wrote:
>
> Thanks Dr. B!  I'm enjoying exploring all of this and learning a lot
> as I go along. I imagine if I had a budget I'd rather enjoy using a
> physical modular synthesizer, but this suits what I'm looking for
> rather nicely.  A few more modules on my list, then some synth
> programming and testing out within Blue, and I think I'll be pretty
> good to go for some live and composed work ideas I wanted to try out.
> Hope others find these useful!
>
> On Fri, Aug 26, 2016 at 2:21 AM, Dr. Richard Boulanger
> <rboulanger@berklee.edu> wrote:
>> Steven,
>>
>> This work is awesome,  inspiring,  and will be a great help in my teaching
>> at Berklee, where we now have a ton of modular synths in the classrooms and
>> the curriculum.
>>
>>> On Thu, Aug 25, 2016 at 4:18 PM, Steven Yi <stevenyi@gmail.com> wrote:
>>>
>>> Hi All,
>>>
>>> I've put together a pattern_sequencer UDO available at:
>>>
>>> https://github.com/kunstmusik/libsyi/blob/master/pattern_sequencer.udo
>>>
>>> The current test file is at:
>>>
>>> https://github.com/kunstmusik/libsyi/blob/master/tests/gate.csd
>>>
>>> The pattern_sequencer is modeled loosely on the Doepfer Schaltwerk
>>> modular sequencer (http://www.doepfer.de/sw_e.htm).  It uses a single
>>> global k-array to hold 128 patterns, with each pattern holding 8
>>> sequences of 16 values. The array is global to avoid array copying
>>> when passing arguments in UDOs.
>>>
>>> Some comments;
>>>
>>> * set_pat_seq_instr is an instrument for setting patterns.  It's done
>>> this way because arrays have some quirks in assuming array get/set are
>>> k-rate if the array is holding k-values.  This means that array sets
>>> can not happen in instr 0 space without Csound complaining of an
>>> error, which was not good for live coding.  The instrument turns
>>> itself off after the init pass to get this to work.  Another UDO,
>>> set_pattern_seq, wraps calling set_pat_seq_instr.  The arguments to
>>> the UDO are the pattern number, sequence number, and the 16 values to
>>> use for the sequence.
>>>
>>> * Regarding the gate.csd, the primary things are the gatempo and
>>> gaclock.  gaclock is driven by an mpulse opcode. gatempo is used for
>>> the frequency of the clock as well as lfo frequencies.  clock_div is
>>> used to slow the main gaclock; for example, in the sequencer
>>> instrument, a clock_div with 16 means it will generate a pulse every
>>> 16 times that the main clock ticks.  That clock_div pulse is used to
>>> tick the seqsig that reads from gk_songpattern every 4 measures (16
>>> ticks).  The songpattern is very simple in this version and reads as
>>> "play pattern 0 3 times, then pattern 1, then alternate pattern 0 and
>>> 1 for four measures".  As seqsig will loop, that song structure will
>>> repeat.  The example currently just sets the pattern to use for the
>>> bass_drum instrument.  Values in the pattern may be anything, so it
>>> could be used for pitch values or trigger values.
>>>
>>> * A known issue is that the pattern index is k-rate as are some other
>>> values. I will be modifying the code to use a-rate so that everything
>>> aligns correctly for the pattern_sequencer changes.
>>>
>>> * I'm not sure I mentioned it before, but the gate.udo reads in a
>>> trigger signal and then holds a 1 value for a given duration in
>>> seconds.  This can be used to drive the adsr140 envelope generator or
>>> whatever else one would want.
>>>
>>> * On the whole, I'm basing these UDOs on various modular synthesizer
>>> modules.  I have on my list to implement an arpeggiator module as well
>>> as something similar to the 4ms Rotating Clock Divider
>>> (http://www.4mspedals.com/rcd.php).  If anyone has a request for a
>>> module, please feel free to email here or file an issue in the libsyi
>>> project on Github.
>>>
>>> Thanks and enjoy!
>>> steven
>>>
>>> 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
>>
>>
>>
>>
>> --
>> _____________________________________________
>> Dr. Richard Boulanger
>> Professor of Electronic Production and Design
>> Professional Writing and Music Technology Division
>> Berklee College of Music
>> ______________________________________________
>> President of Boulanger Labs - http://boulangerlabs.com
>> Author & Editor of The Csound Book -
>> http://mitpress.mit.edu/books/csound-book
>> Author & Editor of The Audio Programming Book -
>> http://mitpress.mit.edu/books/audio-programming-book
>> ______________________________________________
>> about: http://www.boulangerlabs.com/about/richardboulanger/
>> about: http://www.csounds.com/community/developers/dr-richard-boulanger/
>> music:
>> http://www.csounds.com/community/developers/dr-richard-boulanger/dr-richard-boulanger-music/
>> ______________________________________________
>> email: rboulanger@berklee.edu
>> facebook: https://www.facebook.com/richard.boulanger.58
>> 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

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

Date2016-08-27 20:39
FromSteven Yi
SubjectRe: [ANN] pattern_sequencer
Hi Hloover,

I'm not quite sure I understand, but you should be able to just output
kpatindx, no?  That should be the current index for the sequence,
given that it's being % with the array length. Or am I missing
something? (Maybe posting fuller code would help illustrate?)

BTW: I'm looking forward to seeing what kind of UI you come up with as
well as looking at the cljs code if you open source it. :)

steven

On Sat, Aug 27, 2016 at 1:12 PM, Hlöðver Sigurðsson  wrote:
> Hey Steven, Im now playing your step sequencer in pnacl in cljs. I'm trying
> to visually represent the steps, but I need to get the indicies. I already
> changed the seqsig opcode to accept karrlen as parameter (since dynamically
> allocated arrays are afaik not possible), now this part of the opcode
>
>  while (kindx < ksmps) do
>     if(agate[kindx] == 1) then
>       kpatindx = (kpatindx + 1) % karrlen
>     endif
>     aout[kindx] = kpattern[kpatindx]
>     kpatindxout = kpatindx
>     kindx += 1
>   od
>   xout aout, kpatindxout
>
> lacks some way to output the current patindxout. Just wondering out loud if
> you know of any trick to fetch the current step within a given pattern of
> given length?
>
> Best, Hlodver
>
> 2016-08-26 15:19 GMT+02:00 John DeBlase :
>>
>> Thanks Steven! Looking forward to trying this out
>>
>> > On Aug 26, 2016, at 8:18 AM, Steven Yi  wrote:
>> >
>> > Thanks Dr. B!  I'm enjoying exploring all of this and learning a lot
>> > as I go along. I imagine if I had a budget I'd rather enjoy using a
>> > physical modular synthesizer, but this suits what I'm looking for
>> > rather nicely.  A few more modules on my list, then some synth
>> > programming and testing out within Blue, and I think I'll be pretty
>> > good to go for some live and composed work ideas I wanted to try out.
>> > Hope others find these useful!
>> >
>> > On Fri, Aug 26, 2016 at 2:21 AM, Dr. Richard Boulanger
>> >  wrote:
>> >> Steven,
>> >>
>> >> This work is awesome,  inspiring,  and will be a great help in my
>> >> teaching
>> >> at Berklee, where we now have a ton of modular synths in the classrooms
>> >> and
>> >> the curriculum.
>> >>
>> >>> On Thu, Aug 25, 2016 at 4:18 PM, Steven Yi  wrote:
>> >>>
>> >>> Hi All,
>> >>>
>> >>> I've put together a pattern_sequencer UDO available at:
>> >>>
>> >>> https://github.com/kunstmusik/libsyi/blob/master/pattern_sequencer.udo
>> >>>
>> >>> The current test file is at:
>> >>>
>> >>> https://github.com/kunstmusik/libsyi/blob/master/tests/gate.csd
>> >>>
>> >>> The pattern_sequencer is modeled loosely on the Doepfer Schaltwerk
>> >>> modular sequencer (http://www.doepfer.de/sw_e.htm).  It uses a single
>> >>> global k-array to hold 128 patterns, with each pattern holding 8
>> >>> sequences of 16 values. The array is global to avoid array copying
>> >>> when passing arguments in UDOs.
>> >>>
>> >>> Some comments;
>> >>>
>> >>> * set_pat_seq_instr is an instrument for setting patterns.  It's done
>> >>> this way because arrays have some quirks in assuming array get/set are
>> >>> k-rate if the array is holding k-values.  This means that array sets
>> >>> can not happen in instr 0 space without Csound complaining of an
>> >>> error, which was not good for live coding.  The instrument turns
>> >>> itself off after the init pass to get this to work.  Another UDO,
>> >>> set_pattern_seq, wraps calling set_pat_seq_instr.  The arguments to
>> >>> the UDO are the pattern number, sequence number, and the 16 values to
>> >>> use for the sequence.
>> >>>
>> >>> * Regarding the gate.csd, the primary things are the gatempo and
>> >>> gaclock.  gaclock is driven by an mpulse opcode. gatempo is used for
>> >>> the frequency of the clock as well as lfo frequencies.  clock_div is
>> >>> used to slow the main gaclock; for example, in the sequencer
>> >>> instrument, a clock_div with 16 means it will generate a pulse every
>> >>> 16 times that the main clock ticks.  That clock_div pulse is used to
>> >>> tick the seqsig that reads from gk_songpattern every 4 measures (16
>> >>> ticks).  The songpattern is very simple in this version and reads as
>> >>> "play pattern 0 3 times, then pattern 1, then alternate pattern 0 and
>> >>> 1 for four measures".  As seqsig will loop, that song structure will
>> >>> repeat.  The example currently just sets the pattern to use for the
>> >>> bass_drum instrument.  Values in the pattern may be anything, so it
>> >>> could be used for pitch values or trigger values.
>> >>>
>> >>> * A known issue is that the pattern index is k-rate as are some other
>> >>> values. I will be modifying the code to use a-rate so that everything
>> >>> aligns correctly for the pattern_sequencer changes.
>> >>>
>> >>> * I'm not sure I mentioned it before, but the gate.udo reads in a
>> >>> trigger signal and then holds a 1 value for a given duration in
>> >>> seconds.  This can be used to drive the adsr140 envelope generator or
>> >>> whatever else one would want.
>> >>>
>> >>> * On the whole, I'm basing these UDOs on various modular synthesizer
>> >>> modules.  I have on my list to implement an arpeggiator module as well
>> >>> as something similar to the 4ms Rotating Clock Divider
>> >>> (http://www.4mspedals.com/rcd.php).  If anyone has a request for a
>> >>> module, please feel free to email here or file an issue in the libsyi
>> >>> project on Github.
>> >>>
>> >>> Thanks and enjoy!
>> >>> steven
>> >>>
>> >>> 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
>> >>
>> >>
>> >>
>> >>
>> >> --
>> >> _____________________________________________
>> >> Dr. Richard Boulanger
>> >> Professor of Electronic Production and Design
>> >> Professional Writing and Music Technology Division
>> >> Berklee College of Music
>> >> ______________________________________________
>> >> President of Boulanger Labs - http://boulangerlabs.com
>> >> Author & Editor of The Csound Book -
>> >> http://mitpress.mit.edu/books/csound-book
>> >> Author & Editor of The Audio Programming Book -
>> >> http://mitpress.mit.edu/books/audio-programming-book
>> >> ______________________________________________
>> >> about: http://www.boulangerlabs.com/about/richardboulanger/
>> >> about:
>> >> http://www.csounds.com/community/developers/dr-richard-boulanger/
>> >> music:
>> >>
>> >> http://www.csounds.com/community/developers/dr-richard-boulanger/dr-richard-boulanger-music/
>> >> ______________________________________________
>> >> email: rboulanger@berklee.edu
>> >> facebook: https://www.facebook.com/richard.boulanger.58
>> >> 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
>
>
> 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

Date2016-08-28 17:30
FromHlöðver Sigurðsson
SubjectRe: [ANN] pattern_sequencer
Ok Steven,

this is my prototype

code here

I plan to do more in close future, just need more instruments, and add sliders etc.

What happens on my laptop is that when the bass drum and synth play on the same beat, I get crackling sound, but Im curious if that happens to others as well.

Also I have not error handling if the user is opening the page from an unsupported pnacl client (in case someone wants to open this page, it requires google chrome).

2016-08-27 21:39 GMT+02:00 Steven Yi <stevenyi@gmail.com>:
Hi Hloover,

I'm not quite sure I understand, but you should be able to just output
kpatindx, no?  That should be the current index for the sequence,
given that it's being % with the array length. Or am I missing
something? (Maybe posting fuller code would help illustrate?)

BTW: I'm looking forward to seeing what kind of UI you come up with as
well as looking at the cljs code if you open source it. :)

steven

On Sat, Aug 27, 2016 at 1:12 PM, Hlöðver Sigurðsson <hlolli@gmail.com> wrote:
> Hey Steven, Im now playing your step sequencer in pnacl in cljs. I'm trying
> to visually represent the steps, but I need to get the indicies. I already
> changed the seqsig opcode to accept karrlen as parameter (since dynamically
> allocated arrays are afaik not possible), now this part of the opcode
>
>  while (kindx < ksmps) do
>     if(agate[kindx] == 1) then
>       kpatindx = (kpatindx + 1) % karrlen
>     endif
>     aout[kindx] = kpattern[kpatindx]
>     kpatindxout = kpatindx
>     kindx += 1
>   od
>   xout aout, kpatindxout
>
> lacks some way to output the current patindxout. Just wondering out loud if
> you know of any trick to fetch the current step within a given pattern of
> given length?
>
> Best, Hlodver
>
> 2016-08-26 15:19 GMT+02:00 John DeBlase <bsnacks000@gmail.com>:
>>
>> Thanks Steven! Looking forward to trying this out
>>
>> > On Aug 26, 2016, at 8:18 AM, Steven Yi <stevenyi@GMAIL.COM> wrote:
>> >
>> > Thanks Dr. B!  I'm enjoying exploring all of this and learning a lot
>> > as I go along. I imagine if I had a budget I'd rather enjoy using a
>> > physical modular synthesizer, but this suits what I'm looking for
>> > rather nicely.  A few more modules on my list, then some synth
>> > programming and testing out within Blue, and I think I'll be pretty
>> > good to go for some live and composed work ideas I wanted to try out.
>> > Hope others find these useful!
>> >
>> > On Fri, Aug 26, 2016 at 2:21 AM, Dr. Richard Boulanger
>> > <rboulanger@berklee.edu> wrote:
>> >> Steven,
>> >>
>> >> This work is awesome,  inspiring,  and will be a great help in my
>> >> teaching
>> >> at Berklee, where we now have a ton of modular synths in the classrooms
>> >> and
>> >> the curriculum.
>> >>
>> >>> On Thu, Aug 25, 2016 at 4:18 PM, Steven Yi <stevenyi@gmail.com> wrote:
>> >>>
>> >>> Hi All,
>> >>>
>> >>> I've put together a pattern_sequencer UDO available at:
>> >>>
>> >>> https://github.com/kunstmusik/libsyi/blob/master/pattern_sequencer.udo
>> >>>
>> >>> The current test file is at:
>> >>>
>> >>> https://github.com/kunstmusik/libsyi/blob/master/tests/gate.csd
>> >>>
>> >>> The pattern_sequencer is modeled loosely on the Doepfer Schaltwerk
>> >>> modular sequencer (http://www.doepfer.de/sw_e.htm).  It uses a single
>> >>> global k-array to hold 128 patterns, with each pattern holding 8
>> >>> sequences of 16 values. The array is global to avoid array copying
>> >>> when passing arguments in UDOs.
>> >>>
>> >>> Some comments;
>> >>>
>> >>> * set_pat_seq_instr is an instrument for setting patterns.  It's done
>> >>> this way because arrays have some quirks in assuming array get/set are
>> >>> k-rate if the array is holding k-values.  This means that array sets
>> >>> can not happen in instr 0 space without Csound complaining of an
>> >>> error, which was not good for live coding.  The instrument turns
>> >>> itself off after the init pass to get this to work.  Another UDO,
>> >>> set_pattern_seq, wraps calling set_pat_seq_instr.  The arguments to
>> >>> the UDO are the pattern number, sequence number, and the 16 values to
>> >>> use for the sequence.
>> >>>
>> >>> * Regarding the gate.csd, the primary things are the gatempo and
>> >>> gaclock.  gaclock is driven by an mpulse opcode. gatempo is used for
>> >>> the frequency of the clock as well as lfo frequencies.  clock_div is
>> >>> used to slow the main gaclock; for example, in the sequencer
>> >>> instrument, a clock_div with 16 means it will generate a pulse every
>> >>> 16 times that the main clock ticks.  That clock_div pulse is used to
>> >>> tick the seqsig that reads from gk_songpattern every 4 measures (16
>> >>> ticks).  The songpattern is very simple in this version and reads as
>> >>> "play pattern 0 3 times, then pattern 1, then alternate pattern 0 and
>> >>> 1 for four measures".  As seqsig will loop, that song structure will
>> >>> repeat.  The example currently just sets the pattern to use for the
>> >>> bass_drum instrument.  Values in the pattern may be anything, so it
>> >>> could be used for pitch values or trigger values.
>> >>>
>> >>> * A known issue is that the pattern index is k-rate as are some other
>> >>> values. I will be modifying the code to use a-rate so that everything
>> >>> aligns correctly for the pattern_sequencer changes.
>> >>>
>> >>> * I'm not sure I mentioned it before, but the gate.udo reads in a
>> >>> trigger signal and then holds a 1 value for a given duration in
>> >>> seconds.  This can be used to drive the adsr140 envelope generator or
>> >>> whatever else one would want.
>> >>>
>> >>> * On the whole, I'm basing these UDOs on various modular synthesizer
>> >>> modules.  I have on my list to implement an arpeggiator module as well
>> >>> as something similar to the 4ms Rotating Clock Divider
>> >>> (http://www.4mspedals.com/rcd.php).  If anyone has a request for a
>> >>> module, please feel free to email here or file an issue in the libsyi
>> >>> project on Github.
>> >>>
>> >>> Thanks and enjoy!
>> >>> steven
>> >>>
>> >>> 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
>> >>
>> >>
>> >>
>> >>
>> >> --
>> >> _____________________________________________
>> >> Dr. Richard Boulanger
>> >> Professor of Electronic Production and Design
>> >> Professional Writing and Music Technology Division
>> >> Berklee College of Music
>> >> ______________________________________________
>> >> President of Boulanger Labs - http://boulangerlabs.com
>> >> Author & Editor of The Csound Book -
>> >> http://mitpress.mit.edu/books/csound-book
>> >> Author & Editor of The Audio Programming Book -
>> >> http://mitpress.mit.edu/books/audio-programming-book
>> >> ______________________________________________
>> >> about: http://www.boulangerlabs.com/about/richardboulanger/
>> >> about:
>> >> http://www.csounds.com/community/developers/dr-richard-boulanger/
>> >> music:
>> >>
>> >> http://www.csounds.com/community/developers/dr-richard-boulanger/dr-richard-boulanger-music/
>> >> ______________________________________________
>> >> email: rboulanger@berklee.edu
>> >> facebook: https://www.facebook.com/richard.boulanger.58
>> >> 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
>
>
> 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

Date2016-08-28 17:34
FromHlöðver Sigurðsson
SubjectRe: [ANN] pattern_sequencer
Also I discovered a bug pnacl, when I use string channel, if the string starts with 0, that 0 will be dismissed. So for that reason I represent 1 as no-beat and 2 as beat.

2016-08-28 18:30 GMT+02:00 Hlöðver Sigurðsson <hlolli@gmail.com>:
Ok Steven,

this is my prototype

code here

I plan to do more in close future, just need more instruments, and add sliders etc.

What happens on my laptop is that when the bass drum and synth play on the same beat, I get crackling sound, but Im curious if that happens to others as well.

Also I have not error handling if the user is opening the page from an unsupported pnacl client (in case someone wants to open this page, it requires google chrome).

2016-08-27 21:39 GMT+02:00 Steven Yi <stevenyi@gmail.com>:
Hi Hloover,

I'm not quite sure I understand, but you should be able to just output
kpatindx, no?  That should be the current index for the sequence,
given that it's being % with the array length. Or am I missing
something? (Maybe posting fuller code would help illustrate?)

BTW: I'm looking forward to seeing what kind of UI you come up with as
well as looking at the cljs code if you open source it. :)

steven

On Sat, Aug 27, 2016 at 1:12 PM, Hlöðver Sigurðsson <hlolli@gmail.com> wrote:
> Hey Steven, Im now playing your step sequencer in pnacl in cljs. I'm trying
> to visually represent the steps, but I need to get the indicies. I already
> changed the seqsig opcode to accept karrlen as parameter (since dynamically
> allocated arrays are afaik not possible), now this part of the opcode
>
>  while (kindx < ksmps) do
>     if(agate[kindx] == 1) then
>       kpatindx = (kpatindx + 1) % karrlen
>     endif
>     aout[kindx] = kpattern[kpatindx]
>     kpatindxout = kpatindx
>     kindx += 1
>   od
>   xout aout, kpatindxout
>
> lacks some way to output the current patindxout. Just wondering out loud if
> you know of any trick to fetch the current step within a given pattern of
> given length?
>
> Best, Hlodver
>
> 2016-08-26 15:19 GMT+02:00 John DeBlase <bsnacks000@gmail.com>:
>>
>> Thanks Steven! Looking forward to trying this out
>>
>> > On Aug 26, 2016, at 8:18 AM, Steven Yi <stevenyi@GMAIL.COM> wrote:
>> >
>> > Thanks Dr. B!  I'm enjoying exploring all of this and learning a lot
>> > as I go along. I imagine if I had a budget I'd rather enjoy using a
>> > physical modular synthesizer, but this suits what I'm looking for
>> > rather nicely.  A few more modules on my list, then some synth
>> > programming and testing out within Blue, and I think I'll be pretty
>> > good to go for some live and composed work ideas I wanted to try out.
>> > Hope others find these useful!
>> >
>> > On Fri, Aug 26, 2016 at 2:21 AM, Dr. Richard Boulanger
>> > <rboulanger@berklee.edu> wrote:
>> >> Steven,
>> >>
>> >> This work is awesome,  inspiring,  and will be a great help in my
>> >> teaching
>> >> at Berklee, where we now have a ton of modular synths in the classrooms
>> >> and
>> >> the curriculum.
>> >>
>> >>> On Thu, Aug 25, 2016 at 4:18 PM, Steven Yi <stevenyi@gmail.com> wrote:
>> >>>
>> >>> Hi All,
>> >>>
>> >>> I've put together a pattern_sequencer UDO available at:
>> >>>
>> >>> https://github.com/kunstmusik/libsyi/blob/master/pattern_sequencer.udo
>> >>>
>> >>> The current test file is at:
>> >>>
>> >>> https://github.com/kunstmusik/libsyi/blob/master/tests/gate.csd
>> >>>
>> >>> The pattern_sequencer is modeled loosely on the Doepfer Schaltwerk
>> >>> modular sequencer (http://www.doepfer.de/sw_e.htm).  It uses a single
>> >>> global k-array to hold 128 patterns, with each pattern holding 8
>> >>> sequences of 16 values. The array is global to avoid array copying
>> >>> when passing arguments in UDOs.
>> >>>
>> >>> Some comments;
>> >>>
>> >>> * set_pat_seq_instr is an instrument for setting patterns.  It's done
>> >>> this way because arrays have some quirks in assuming array get/set are
>> >>> k-rate if the array is holding k-values.  This means that array sets
>> >>> can not happen in instr 0 space without Csound complaining of an
>> >>> error, which was not good for live coding.  The instrument turns
>> >>> itself off after the init pass to get this to work.  Another UDO,
>> >>> set_pattern_seq, wraps calling set_pat_seq_instr.  The arguments to
>> >>> the UDO are the pattern number, sequence number, and the 16 values to
>> >>> use for the sequence.
>> >>>
>> >>> * Regarding the gate.csd, the primary things are the gatempo and
>> >>> gaclock.  gaclock is driven by an mpulse opcode. gatempo is used for
>> >>> the frequency of the clock as well as lfo frequencies.  clock_div is
>> >>> used to slow the main gaclock; for example, in the sequencer
>> >>> instrument, a clock_div with 16 means it will generate a pulse every
>> >>> 16 times that the main clock ticks.  That clock_div pulse is used to
>> >>> tick the seqsig that reads from gk_songpattern every 4 measures (16
>> >>> ticks).  The songpattern is very simple in this version and reads as
>> >>> "play pattern 0 3 times, then pattern 1, then alternate pattern 0 and
>> >>> 1 for four measures".  As seqsig will loop, that song structure will
>> >>> repeat.  The example currently just sets the pattern to use for the
>> >>> bass_drum instrument.  Values in the pattern may be anything, so it
>> >>> could be used for pitch values or trigger values.
>> >>>
>> >>> * A known issue is that the pattern index is k-rate as are some other
>> >>> values. I will be modifying the code to use a-rate so that everything
>> >>> aligns correctly for the pattern_sequencer changes.
>> >>>
>> >>> * I'm not sure I mentioned it before, but the gate.udo reads in a
>> >>> trigger signal and then holds a 1 value for a given duration in
>> >>> seconds.  This can be used to drive the adsr140 envelope generator or
>> >>> whatever else one would want.
>> >>>
>> >>> * On the whole, I'm basing these UDOs on various modular synthesizer
>> >>> modules.  I have on my list to implement an arpeggiator module as well
>> >>> as something similar to the 4ms Rotating Clock Divider
>> >>> (http://www.4mspedals.com/rcd.php).  If anyone has a request for a
>> >>> module, please feel free to email here or file an issue in the libsyi
>> >>> project on Github.
>> >>>
>> >>> Thanks and enjoy!
>> >>> steven
>> >>>
>> >>> 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
>> >>
>> >>
>> >>
>> >>
>> >> --
>> >> _____________________________________________
>> >> Dr. Richard Boulanger
>> >> Professor of Electronic Production and Design
>> >> Professional Writing and Music Technology Division
>> >> Berklee College of Music
>> >> ______________________________________________
>> >> President of Boulanger Labs - http://boulangerlabs.com
>> >> Author & Editor of The Csound Book -
>> >> http://mitpress.mit.edu/books/csound-book
>> >> Author & Editor of The Audio Programming Book -
>> >> http://mitpress.mit.edu/books/audio-programming-book
>> >> ______________________________________________
>> >> about: http://www.boulangerlabs.com/about/richardboulanger/
>> >> about:
>> >> http://www.csounds.com/community/developers/dr-richard-boulanger/
>> >> music:
>> >>
>> >> http://www.csounds.com/community/developers/dr-richard-boulanger/dr-richard-boulanger-music/
>> >> ______________________________________________
>> >> email: rboulanger@berklee.edu
>> >> facebook: https://www.facebook.com/richard.boulanger.58
>> >> 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
>
>
> 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

Date2016-08-28 17:50
FromSteven Yi
SubjectRe: [ANN] pattern_sequencer
Hi Hloover,

NIce!  I do get a crackle here too.  A couple of things:

1.I found a typo in the pattern copying code that I've fixed in libsyi. 
2. I would check if vco is receiving a 0 pitch. I used a limit with .001 I think to get around this in some sketching. (Check the latest tests/gate.csd in my project)

Hope that helps!
Steven

On Sun, Aug 28, 2016 at 12:30 PM, Hlöðver Sigurðsson <hlolli@gmail.com> wrote:
> Ok Steven,
>
> this is my prototype
> https://hlolli.github.io/
>
> code here
> https://github.com/hlolli/csound-pnacl
>
> I plan to do more in close future, just need more instruments, and add
> sliders etc.
>
> What happens on my laptop is that when the bass drum and synth play on the
> same beat, I get crackling sound, but Im curious if that happens to others
> as well.
>
> Also I have not error handling if the user is opening the page from an
> unsupported pnacl client (in case someone wants to open this page, it
> requires google chrome).
>
> 2016-08-27 21:39 GMT+02:00 Steven Yi <stevenyi@gmail.com>:
>>
>> Hi Hloover,
>>
>> I'm not quite sure I understand, but you should be able to just output
>> kpatindx, no?  That should be the current index for the sequence,
>> given that it's being % with the array length. Or am I missing
>> something? (Maybe posting fuller code would help illustrate?)
>>
>> BTW: I'm looking forward to seeing what kind of UI you come up with as
>> well as looking at the cljs code if you open source it. :)
>>
>> steven
>>
>> On Sat, Aug 27, 2016 at 1:12 PM, Hlöðver Sigurðsson <hlolli@gmail.com>
>> wrote:
>> > Hey Steven, Im now playing your step sequencer in pnacl in cljs. I'm
>> > trying
>> > to visually represent the steps, but I need to get the indicies. I
>> > already
>> > changed the seqsig opcode to accept karrlen as parameter (since
>> > dynamically
>> > allocated arrays are afaik not possible), now this part of the opcode
>> >
>> >  while (kindx < ksmps) do
>> >     if(agate[kindx] == 1) then
>> >       kpatindx = (kpatindx + 1) % karrlen
>> >     endif
>> >     aout[kindx] = kpattern[kpatindx]
>> >     kpatindxout = kpatindx
>> >     kindx += 1
>> >   od
>> >   xout aout, kpatindxout
>> >
>> > lacks some way to output the current patindxout. Just wondering out loud
>> > if
>> > you know of any trick to fetch the current step within a given pattern
>> > of
>> > given length?
>> >
>> > Best, Hlodver
>> >
>> > 2016-08-26 15:19 GMT+02:00 John DeBlase <bsnacks000@gmail.com>:
>> >>
>> >> Thanks Steven! Looking forward to trying this out
>> >>
>> >> > On Aug 26, 2016, at 8:18 AM, Steven Yi <stevenyi@GMAIL.COM> wrote:
>> >> >
>> >> > Thanks Dr. B!  I'm enjoying exploring all of this and learning a lot
>> >> > as I go along. I imagine if I had a budget I'd rather enjoy using a
>> >> > physical modular synthesizer, but this suits what I'm looking for
>> >> > rather nicely.  A few more modules on my list, then some synth
>> >> > programming and testing out within Blue, and I think I'll be pretty
>> >> > good to go for some live and composed work ideas I wanted to try out.
>> >> > Hope others find these useful!
>> >> >
>> >> > On Fri, Aug 26, 2016 at 2:21 AM, Dr. Richard Boulanger
>> >> > <rboulanger@berklee.edu> wrote:
>> >> >> Steven,
>> >> >>
>> >> >> This work is awesome,  inspiring,  and will be a great help in my
>> >> >> teaching
>> >> >> at Berklee, where we now have a ton of modular synths in the
>> >> >> classrooms
>> >> >> and
>> >> >> the curriculum.
>> >> >>
>> >> >>> On Thu, Aug 25, 2016 at 4:18 PM, Steven Yi <stevenyi@gmail.com>
>> >> >>> wrote:
>> >> >>>
>> >> >>> Hi All,
>> >> >>>
>> >> >>> I've put together a pattern_sequencer UDO available at:
>> >> >>>
>> >> >>>
>> >> >>> https://github.com/kunstmusik/libsyi/blob/master/pattern_sequencer.udo
>> >> >>>
>> >> >>> The current test file is at:
>> >> >>>
>> >> >>> https://github.com/kunstmusik/libsyi/blob/master/tests/gate.csd
>> >> >>>
>> >> >>> The pattern_sequencer is modeled loosely on the Doepfer Schaltwerk
>> >> >>> modular sequencer (http://www.doepfer.de/sw_e.htm).  It uses a
>> >> >>> single
>> >> >>> global k-array to hold 128 patterns, with each pattern holding 8
>> >> >>> sequences of 16 values. The array is global to avoid array copying
>> >> >>> when passing arguments in UDOs.
>> >> >>>
>> >> >>> Some comments;
>> >> >>>
>> >> >>> * set_pat_seq_instr is an instrument for setting patterns.  It's
>> >> >>> done
>> >> >>> this way because arrays have some quirks in assuming array get/set
>> >> >>> are
>> >> >>> k-rate if the array is holding k-values.  This means that array
>> >> >>> sets
>> >> >>> can not happen in instr 0 space without Csound complaining of an
>> >> >>> error, which was not good for live coding.  The instrument turns
>> >> >>> itself off after the init pass to get this to work.  Another UDO,
>> >> >>> set_pattern_seq, wraps calling set_pat_seq_instr.  The arguments to
>> >> >>> the UDO are the pattern number, sequence number, and the 16 values
>> >> >>> to
>> >> >>> use for the sequence.
>> >> >>>
>> >> >>> * Regarding the gate.csd, the primary things are the gatempo and
>> >> >>> gaclock.  gaclock is driven by an mpulse opcode. gatempo is used
>> >> >>> for
>> >> >>> the frequency of the clock as well as lfo frequencies.  clock_div
>> >> >>> is
>> >> >>> used to slow the main gaclock; for example, in the sequencer
>> >> >>> instrument, a clock_div with 16 means it will generate a pulse
>> >> >>> every
>> >> >>> 16 times that the main clock ticks.  That clock_div pulse is used
>> >> >>> to
>> >> >>> tick the seqsig that reads from gk_songpattern every 4 measures (16
>> >> >>> ticks).  The songpattern is very simple in this version and reads
>> >> >>> as
>> >> >>> "play pattern 0 3 times, then pattern 1, then alternate pattern 0
>> >> >>> and
>> >> >>> 1 for four measures".  As seqsig will loop, that song structure
>> >> >>> will
>> >> >>> repeat.  The example currently just sets the pattern to use for the
>> >> >>> bass_drum instrument.  Values in the pattern may be anything, so it
>> >> >>> could be used for pitch values or trigger values.
>> >> >>>
>> >> >>> * A known issue is that the pattern index is k-rate as are some
>> >> >>> other
>> >> >>> values. I will be modifying the code to use a-rate so that
>> >> >>> everything
>> >> >>> aligns correctly for the pattern_sequencer changes.
>> >> >>>
>> >> >>> * I'm not sure I mentioned it before, but the gate.udo reads in a
>> >> >>> trigger signal and then holds a 1 value for a given duration in
>> >> >>> seconds.  This can be used to drive the adsr140 envelope generator
>> >> >>> or
>> >> >>> whatever else one would want.
>> >> >>>
>> >> >>> * On the whole, I'm basing these UDOs on various modular
>> >> >>> synthesizer
>> >> >>> modules.  I have on my list to implement an arpeggiator module as
>> >> >>> well
>> >> >>> as something similar to the 4ms Rotating Clock Divider
>> >> >>> (http://www.4mspedals.com/rcd.php).  If anyone has a request for a
>> >> >>> module, please feel free to email here or file an issue in the
>> >> >>> libsyi
>> >> >>> project on Github.
>> >> >>>
>> >> >>> Thanks and enjoy!
>> >> >>> steven
>> >> >>>
>> >> >>> 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
>> >> >>
>> >> >>
>> >> >>
>> >> >>
>> >> >> --
>> >> >> _____________________________________________
>> >> >> Dr. Richard Boulanger
>> >> >> Professor of Electronic Production and Design
>> >> >> Professional Writing and Music Technology Division
>> >> >> Berklee College of Music
>> >> >> ______________________________________________
>> >> >> President of Boulanger Labs - http://boulangerlabs.com
>> >> >> Author & Editor of The Csound Book -
>> >> >> http://mitpress.mit.edu/books/csound-book
>> >> >> Author & Editor of The Audio Programming Book -
>> >> >> http://mitpress.mit.edu/books/audio-programming-book
>> >> >> ______________________________________________
>> >> >> about: http://www.boulangerlabs.com/about/richardboulanger/
>> >> >> about:
>> >> >> http://www.csounds.com/community/developers/dr-richard-boulanger/
>> >> >> music:
>> >> >>
>> >> >>
>> >> >> http://www.csounds.com/community/developers/dr-richard-boulanger/dr-richard-boulanger-music/
>> >> >> ______________________________________________
>> >> >> email: rboulanger@berklee.edu
>> >> >> facebook: https://www.facebook.com/richard.boulanger.58
>> >> >> 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
>> >
>> >
>> > 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

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

Date2016-08-28 20:59
FromSteven Yi
SubjectRe: [ANN] pattern_sequencer
Hi Hloover,

Took me a while to figure out my figwheel wasn't reloading resources,
but I found the issue had to do with the adsr140 calls with a release
of 0.0001.  Here's a diff:

diff --git a/src/cljs/ui/core.cljs b/src/cljs/ui/core.cljs
index eac13a1..8e6afba 100644
--- a/src/cljs/ui/core.cljs
+++ b/src/cljs/ui/core.cljs
@@ -93,7 +93,7 @@
   kcut = lfo(0.4, kcps , 1) + 0.6
   ;; aout moogladder aout, (200 * (1 + (kcut * 2))) * (1 + aenv * 8), 0.8
   aout zdf_ladder aout, (200 * (1 + (kcut * 1.8))) * (1 + aenv * 8), a(0.6)
-  aout *= aenv
+  aout *= aenv * 0.5
   al, ar pan2 aout, 0.4
   outc al, ar
   endin
@@ -108,8 +108,8 @@
   kpattern PatStringToArray Spattern, kpattern
   atrg, kindx seqsig gaclock, karrlen, kpattern
   printks2 \"pat2:%d\", kindx
-  aenv adsr140 agate * atrg, aretrig, 0.01, 0.25, 0.0001, 0.0001
-  avcoenv adsr140 agate * atrg, aretrig, 0.001, 0.15, 0.0001, 0.0001
+  aenv adsr140 agate * atrg, aretrig, 0.01, 0.25, 0.0001, 0.25
+  avcoenv adsr140 agate * atrg, aretrig, 0.001, 0.15, 0.0001, 0.15

That seems to have removed the clicks here.

On Sun, Aug 28, 2016 at 12:50 PM, Steven Yi  wrote:
> Hi Hloover,
>
> NIce!  I do get a crackle here too.  A couple of things:
>
> 1.I found a typo in the pattern copying code that I've fixed in libsyi.
> 2. I would check if vco is receiving a 0 pitch. I used a limit with .001 I
> think to get around this in some sketching. (Check the latest tests/gate.csd
> in my project)
>
> Hope that helps!
> Steven
>
>
> On Sun, Aug 28, 2016 at 12:30 PM, Hlöðver Sigurðsson 
> wrote:
>> Ok Steven,
>>
>> this is my prototype
>> https://hlolli.github.io/
>>
>> code here
>> https://github.com/hlolli/csound-pnacl
>>
>> I plan to do more in close future, just need more instruments, and add
>> sliders etc.
>>
>> What happens on my laptop is that when the bass drum and synth play on the
>> same beat, I get crackling sound, but Im curious if that happens to others
>> as well.
>>
>> Also I have not error handling if the user is opening the page from an
>> unsupported pnacl client (in case someone wants to open this page, it
>> requires google chrome).
>>
>> 2016-08-27 21:39 GMT+02:00 Steven Yi :
>>>
>>> Hi Hloover,
>>>
>>> I'm not quite sure I understand, but you should be able to just output
>>> kpatindx, no?  That should be the current index for the sequence,
>>> given that it's being % with the array length. Or am I missing
>>> something? (Maybe posting fuller code would help illustrate?)
>>>
>>> BTW: I'm looking forward to seeing what kind of UI you come up with as
>>> well as looking at the cljs code if you open source it. :)
>>>
>>> steven
>>>
>>> On Sat, Aug 27, 2016 at 1:12 PM, Hlöðver Sigurðsson 
>>> wrote:
>>> > Hey Steven, Im now playing your step sequencer in pnacl in cljs. I'm
>>> > trying
>>> > to visually represent the steps, but I need to get the indicies. I
>>> > already
>>> > changed the seqsig opcode to accept karrlen as parameter (since
>>> > dynamically
>>> > allocated arrays are afaik not possible), now this part of the opcode
>>> >
>>> >  while (kindx < ksmps) do
>>> >     if(agate[kindx] == 1) then
>>> >       kpatindx = (kpatindx + 1) % karrlen
>>> >     endif
>>> >     aout[kindx] = kpattern[kpatindx]
>>> >     kpatindxout = kpatindx
>>> >     kindx += 1
>>> >   od
>>> >   xout aout, kpatindxout
>>> >
>>> > lacks some way to output the current patindxout. Just wondering out
>>> > loud
>>> > if
>>> > you know of any trick to fetch the current step within a given pattern
>>> > of
>>> > given length?
>>> >
>>> > Best, Hlodver
>>> >
>>> > 2016-08-26 15:19 GMT+02:00 John DeBlase :
>>> >>
>>> >> Thanks Steven! Looking forward to trying this out
>>> >>
>>> >> > On Aug 26, 2016, at 8:18 AM, Steven Yi  wrote:
>>> >> >
>>> >> > Thanks Dr. B!  I'm enjoying exploring all of this and learning a lot
>>> >> > as I go along. I imagine if I had a budget I'd rather enjoy using a
>>> >> > physical modular synthesizer, but this suits what I'm looking for
>>> >> > rather nicely.  A few more modules on my list, then some synth
>>> >> > programming and testing out within Blue, and I think I'll be pretty
>>> >> > good to go for some live and composed work ideas I wanted to try
>>> >> > out.
>>> >> > Hope others find these useful!
>>> >> >
>>> >> > On Fri, Aug 26, 2016 at 2:21 AM, Dr. Richard Boulanger
>>> >> >  wrote:
>>> >> >> Steven,
>>> >> >>
>>> >> >> This work is awesome,  inspiring,  and will be a great help in my
>>> >> >> teaching
>>> >> >> at Berklee, where we now have a ton of modular synths in the
>>> >> >> classrooms
>>> >> >> and
>>> >> >> the curriculum.
>>> >> >>
>>> >> >>> On Thu, Aug 25, 2016 at 4:18 PM, Steven Yi 
>>> >> >>> wrote:
>>> >> >>>
>>> >> >>> Hi All,
>>> >> >>>
>>> >> >>> I've put together a pattern_sequencer UDO available at:
>>> >> >>>
>>> >> >>>
>>> >> >>>
>>> >> >>> https://github.com/kunstmusik/libsyi/blob/master/pattern_sequencer.udo
>>> >> >>>
>>> >> >>> The current test file is at:
>>> >> >>>
>>> >> >>> https://github.com/kunstmusik/libsyi/blob/master/tests/gate.csd
>>> >> >>>
>>> >> >>> The pattern_sequencer is modeled loosely on the Doepfer Schaltwerk
>>> >> >>> modular sequencer (http://www.doepfer.de/sw_e.htm).  It uses a
>>> >> >>> single
>>> >> >>> global k-array to hold 128 patterns, with each pattern holding 8
>>> >> >>> sequences of 16 values. The array is global to avoid array copying
>>> >> >>> when passing arguments in UDOs.
>>> >> >>>
>>> >> >>> Some comments;
>>> >> >>>
>>> >> >>> * set_pat_seq_instr is an instrument for setting patterns.  It's
>>> >> >>> done
>>> >> >>> this way because arrays have some quirks in assuming array get/set
>>> >> >>> are
>>> >> >>> k-rate if the array is holding k-values.  This means that array
>>> >> >>> sets
>>> >> >>> can not happen in instr 0 space without Csound complaining of an
>>> >> >>> error, which was not good for live coding.  The instrument turns
>>> >> >>> itself off after the init pass to get this to work.  Another UDO,
>>> >> >>> set_pattern_seq, wraps calling set_pat_seq_instr.  The arguments
>>> >> >>> to
>>> >> >>> the UDO are the pattern number, sequence number, and the 16 values
>>> >> >>> to
>>> >> >>> use for the sequence.
>>> >> >>>
>>> >> >>> * Regarding the gate.csd, the primary things are the gatempo and
>>> >> >>> gaclock.  gaclock is driven by an mpulse opcode. gatempo is used
>>> >> >>> for
>>> >> >>> the frequency of the clock as well as lfo frequencies.  clock_div
>>> >> >>> is
>>> >> >>> used to slow the main gaclock; for example, in the sequencer
>>> >> >>> instrument, a clock_div with 16 means it will generate a pulse
>>> >> >>> every
>>> >> >>> 16 times that the main clock ticks.  That clock_div pulse is used
>>> >> >>> to
>>> >> >>> tick the seqsig that reads from gk_songpattern every 4 measures
>>> >> >>> (16
>>> >> >>> ticks).  The songpattern is very simple in this version and reads
>>> >> >>> as
>>> >> >>> "play pattern 0 3 times, then pattern 1, then alternate pattern 0
>>> >> >>> and
>>> >> >>> 1 for four measures".  As seqsig will loop, that song structure
>>> >> >>> will
>>> >> >>> repeat.  The example currently just sets the pattern to use for
>>> >> >>> the
>>> >> >>> bass_drum instrument.  Values in the pattern may be anything, so
>>> >> >>> it
>>> >> >>> could be used for pitch values or trigger values.
>>> >> >>>
>>> >> >>> * A known issue is that the pattern index is k-rate as are some
>>> >> >>> other
>>> >> >>> values. I will be modifying the code to use a-rate so that
>>> >> >>> everything
>>> >> >>> aligns correctly for the pattern_sequencer changes.
>>> >> >>>
>>> >> >>> * I'm not sure I mentioned it before, but the gate.udo reads in a
>>> >> >>> trigger signal and then holds a 1 value for a given duration in
>>> >> >>> seconds.  This can be used to drive the adsr140 envelope generator
>>> >> >>> or
>>> >> >>> whatever else one would want.
>>> >> >>>
>>> >> >>> * On the whole, I'm basing these UDOs on various modular
>>> >> >>> synthesizer
>>> >> >>> modules.  I have on my list to implement an arpeggiator module as
>>> >> >>> well
>>> >> >>> as something similar to the 4ms Rotating Clock Divider
>>> >> >>> (http://www.4mspedals.com/rcd.php).  If anyone has a request for a
>>> >> >>> module, please feel free to email here or file an issue in the
>>> >> >>> libsyi
>>> >> >>> project on Github.
>>> >> >>>
>>> >> >>> Thanks and enjoy!
>>> >> >>> steven
>>> >> >>>
>>> >> >>> 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
>>> >> >>
>>> >> >>
>>> >> >>
>>> >> >>
>>> >> >> --
>>> >> >> _____________________________________________
>>> >> >> Dr. Richard Boulanger
>>> >> >> Professor of Electronic Production and Design
>>> >> >> Professional Writing and Music Technology Division
>>> >> >> Berklee College of Music
>>> >> >> ______________________________________________
>>> >> >> President of Boulanger Labs - http://boulangerlabs.com
>>> >> >> Author & Editor of The Csound Book -
>>> >> >> http://mitpress.mit.edu/books/csound-book
>>> >> >> Author & Editor of The Audio Programming Book -
>>> >> >> http://mitpress.mit.edu/books/audio-programming-book
>>> >> >> ______________________________________________
>>> >> >> about: http://www.boulangerlabs.com/about/richardboulanger/
>>> >> >> about:
>>> >> >> http://www.csounds.com/community/developers/dr-richard-boulanger/
>>> >> >> music:
>>> >> >>
>>> >> >>
>>> >> >>
>>> >> >> http://www.csounds.com/community/developers/dr-richard-boulanger/dr-richard-boulanger-music/
>>> >> >> ______________________________________________
>>> >> >> email: rboulanger@berklee.edu
>>> >> >> facebook: https://www.facebook.com/richard.boulanger.58
>>> >> >> 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
>>> >
>>> >
>>> > 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
>

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

Date2016-08-28 21:10
FromHlöðver Sigurðsson
SubjectRe: [ANN] pattern_sequencer
Yes I experimented as well and found some parameters that got rid of it, bit weak bass so I went wild. I will try the diffs still. Yes I should put it in the readme, you need to load the figwheel script, this way the backend handler and fighwheel are all in one, enabling autoreload on backend (but in this case i dont use the backend at all). What I realized developing with figwheel and csound is that the hot-reload is actually great for csound development. I see potentials, making node.js or something. Also interesting is the clojurescript bootstrap, for me I see potential live-codeing in the browser in csound with clojure code (even bootstraped cljs is already existing, some specific om.next bootstraps may come available https://anmonteiro.com/2016/08/om-next-and-bootstrapped-clojurescript/ ). But these are dreams that require great amount of time.

To get the best out of your patches, I think piano grid popup could make this sequencer sweet, I may also decide to have only one +/- keys for all patterns in synchrony, its bit too algorithmic but it may be a cool effect still.

Also glad you got the figwheel running, as you see, embedding pnacl is very easy (took me a while to understand that csound.js is actually much much simpler than I previously tought).

2016-08-28 21:59 GMT+02:00 Steven Yi <stevenyi@gmail.com>:
Hi Hloover,

Took me a while to figure out my figwheel wasn't reloading resources,
but I found the issue had to do with the adsr140 calls with a release
of 0.0001.  Here's a diff:

diff --git a/src/cljs/ui/core.cljs b/src/cljs/ui/core.cljs
index eac13a1..8e6afba 100644
--- a/src/cljs/ui/core.cljs
+++ b/src/cljs/ui/core.cljs
@@ -93,7 +93,7 @@
   kcut = lfo(0.4, kcps , 1) + 0.6
   ;; aout moogladder aout, (200 * (1 + (kcut * 2))) * (1 + aenv * 8), 0.8
   aout zdf_ladder aout, (200 * (1 + (kcut * 1.8))) * (1 + aenv * 8), a(0.6)
-  aout *= aenv
+  aout *= aenv * 0.5
   al, ar pan2 aout, 0.4
   outc al, ar
   endin
@@ -108,8 +108,8 @@
   kpattern PatStringToArray Spattern, kpattern
   atrg, kindx seqsig gaclock, karrlen, kpattern
   printks2 \"pat2:%d\", kindx
-  aenv adsr140 agate * atrg, aretrig, 0.01, 0.25, 0.0001, 0.0001
-  avcoenv adsr140 agate * atrg, aretrig, 0.001, 0.15, 0.0001, 0.0001
+  aenv adsr140 agate * atrg, aretrig, 0.01, 0.25, 0.0001, 0.25
+  avcoenv adsr140 agate * atrg, aretrig, 0.001, 0.15, 0.0001, 0.15

That seems to have removed the clicks here.

On Sun, Aug 28, 2016 at 12:50 PM, Steven Yi <stevenyi@gmail.com> wrote:
> Hi Hloover,
>
> NIce!  I do get a crackle here too.  A couple of things:
>
> 1.I found a typo in the pattern copying code that I've fixed in libsyi.
> 2. I would check if vco is receiving a 0 pitch. I used a limit with .001 I
> think to get around this in some sketching. (Check the latest tests/gate.csd
> in my project)
>
> Hope that helps!
> Steven
>
>
> On Sun, Aug 28, 2016 at 12:30 PM, Hlöðver Sigurðsson <hlolli@gmail.com>
> wrote:
>> Ok Steven,
>>
>> this is my prototype
>> https://hlolli.github.io/
>>
>> code here
>> https://github.com/hlolli/csound-pnacl
>>
>> I plan to do more in close future, just need more instruments, and add
>> sliders etc.
>>
>> What happens on my laptop is that when the bass drum and synth play on the
>> same beat, I get crackling sound, but Im curious if that happens to others
>> as well.
>>
>> Also I have not error handling if the user is opening the page from an
>> unsupported pnacl client (in case someone wants to open this page, it
>> requires google chrome).
>>
>> 2016-08-27 21:39 GMT+02:00 Steven Yi <stevenyi@gmail.com>:
>>>
>>> Hi Hloover,
>>>
>>> I'm not quite sure I understand, but you should be able to just output
>>> kpatindx, no?  That should be the current index for the sequence,
>>> given that it's being % with the array length. Or am I missing
>>> something? (Maybe posting fuller code would help illustrate?)
>>>
>>> BTW: I'm looking forward to seeing what kind of UI you come up with as
>>> well as looking at the cljs code if you open source it. :)
>>>
>>> steven
>>>
>>> On Sat, Aug 27, 2016 at 1:12 PM, Hlöðver Sigurðsson <hlolli@gmail.com>
>>> wrote:
>>> > Hey Steven, Im now playing your step sequencer in pnacl in cljs. I'm
>>> > trying
>>> > to visually represent the steps, but I need to get the indicies. I
>>> > already
>>> > changed the seqsig opcode to accept karrlen as parameter (since
>>> > dynamically
>>> > allocated arrays are afaik not possible), now this part of the opcode
>>> >
>>> >  while (kindx < ksmps) do
>>> >     if(agate[kindx] == 1) then
>>> >       kpatindx = (kpatindx + 1) % karrlen
>>> >     endif
>>> >     aout[kindx] = kpattern[kpatindx]
>>> >     kpatindxout = kpatindx
>>> >     kindx += 1
>>> >   od
>>> >   xout aout, kpatindxout
>>> >
>>> > lacks some way to output the current patindxout. Just wondering out
>>> > loud
>>> > if
>>> > you know of any trick to fetch the current step within a given pattern
>>> > of
>>> > given length?
>>> >
>>> > Best, Hlodver
>>> >
>>> > 2016-08-26 15:19 GMT+02:00 John DeBlase <bsnacks000@gmail.com>:
>>> >>
>>> >> Thanks Steven! Looking forward to trying this out
>>> >>
>>> >> > On Aug 26, 2016, at 8:18 AM, Steven Yi <stevenyi@GMAIL.COM> wrote:
>>> >> >
>>> >> > Thanks Dr. B!  I'm enjoying exploring all of this and learning a lot
>>> >> > as I go along. I imagine if I had a budget I'd rather enjoy using a
>>> >> > physical modular synthesizer, but this suits what I'm looking for
>>> >> > rather nicely.  A few more modules on my list, then some synth
>>> >> > programming and testing out within Blue, and I think I'll be pretty
>>> >> > good to go for some live and composed work ideas I wanted to try
>>> >> > out.
>>> >> > Hope others find these useful!
>>> >> >
>>> >> > On Fri, Aug 26, 2016 at 2:21 AM, Dr. Richard Boulanger
>>> >> > <rboulanger@berklee.edu> wrote:
>>> >> >> Steven,
>>> >> >>
>>> >> >> This work is awesome,  inspiring,  and will be a great help in my
>>> >> >> teaching
>>> >> >> at Berklee, where we now have a ton of modular synths in the
>>> >> >> classrooms
>>> >> >> and
>>> >> >> the curriculum.
>>> >> >>
>>> >> >>> On Thu, Aug 25, 2016 at 4:18 PM, Steven Yi <stevenyi@gmail.com>
>>> >> >>> wrote:
>>> >> >>>
>>> >> >>> Hi All,
>>> >> >>>
>>> >> >>> I've put together a pattern_sequencer UDO available at:
>>> >> >>>
>>> >> >>>
>>> >> >>>
>>> >> >>> https://github.com/kunstmusik/libsyi/blob/master/pattern_sequencer.udo
>>> >> >>>
>>> >> >>> The current test file is at:
>>> >> >>>
>>> >> >>> https://github.com/kunstmusik/libsyi/blob/master/tests/gate.csd
>>> >> >>>
>>> >> >>> The pattern_sequencer is modeled loosely on the Doepfer Schaltwerk
>>> >> >>> modular sequencer (http://www.doepfer.de/sw_e.htm).  It uses a
>>> >> >>> single
>>> >> >>> global k-array to hold 128 patterns, with each pattern holding 8
>>> >> >>> sequences of 16 values. The array is global to avoid array copying
>>> >> >>> when passing arguments in UDOs.
>>> >> >>>
>>> >> >>> Some comments;
>>> >> >>>
>>> >> >>> * set_pat_seq_instr is an instrument for setting patterns.  It's
>>> >> >>> done
>>> >> >>> this way because arrays have some quirks in assuming array get/set
>>> >> >>> are
>>> >> >>> k-rate if the array is holding k-values.  This means that array
>>> >> >>> sets
>>> >> >>> can not happen in instr 0 space without Csound complaining of an
>>> >> >>> error, which was not good for live coding.  The instrument turns
>>> >> >>> itself off after the init pass to get this to work.  Another UDO,
>>> >> >>> set_pattern_seq, wraps calling set_pat_seq_instr.  The arguments
>>> >> >>> to
>>> >> >>> the UDO are the pattern number, sequence number, and the 16 values
>>> >> >>> to
>>> >> >>> use for the sequence.
>>> >> >>>
>>> >> >>> * Regarding the gate.csd, the primary things are the gatempo and
>>> >> >>> gaclock.  gaclock is driven by an mpulse opcode. gatempo is used
>>> >> >>> for
>>> >> >>> the frequency of the clock as well as lfo frequencies.  clock_div
>>> >> >>> is
>>> >> >>> used to slow the main gaclock; for example, in the sequencer
>>> >> >>> instrument, a clock_div with 16 means it will generate a pulse
>>> >> >>> every
>>> >> >>> 16 times that the main clock ticks.  That clock_div pulse is used
>>> >> >>> to
>>> >> >>> tick the seqsig that reads from gk_songpattern every 4 measures
>>> >> >>> (16
>>> >> >>> ticks).  The songpattern is very simple in this version and reads
>>> >> >>> as
>>> >> >>> "play pattern 0 3 times, then pattern 1, then alternate pattern 0
>>> >> >>> and
>>> >> >>> 1 for four measures".  As seqsig will loop, that song structure
>>> >> >>> will
>>> >> >>> repeat.  The example currently just sets the pattern to use for
>>> >> >>> the
>>> >> >>> bass_drum instrument.  Values in the pattern may be anything, so
>>> >> >>> it
>>> >> >>> could be used for pitch values or trigger values.
>>> >> >>>
>>> >> >>> * A known issue is that the pattern index is k-rate as are some
>>> >> >>> other
>>> >> >>> values. I will be modifying the code to use a-rate so that
>>> >> >>> everything
>>> >> >>> aligns correctly for the pattern_sequencer changes.
>>> >> >>>
>>> >> >>> * I'm not sure I mentioned it before, but the gate.udo reads in a
>>> >> >>> trigger signal and then holds a 1 value for a given duration in
>>> >> >>> seconds.  This can be used to drive the adsr140 envelope generator
>>> >> >>> or
>>> >> >>> whatever else one would want.
>>> >> >>>
>>> >> >>> * On the whole, I'm basing these UDOs on various modular
>>> >> >>> synthesizer
>>> >> >>> modules.  I have on my list to implement an arpeggiator module as
>>> >> >>> well
>>> >> >>> as something similar to the 4ms Rotating Clock Divider
>>> >> >>> (http://www.4mspedals.com/rcd.php).  If anyone has a request for a
>>> >> >>> module, please feel free to email here or file an issue in the
>>> >> >>> libsyi
>>> >> >>> project on Github.
>>> >> >>>
>>> >> >>> Thanks and enjoy!
>>> >> >>> steven
>>> >> >>>
>>> >> >>> 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
>>> >> >>
>>> >> >>
>>> >> >>
>>> >> >>
>>> >> >> --
>>> >> >> _____________________________________________
>>> >> >> Dr. Richard Boulanger
>>> >> >> Professor of Electronic Production and Design
>>> >> >> Professional Writing and Music Technology Division
>>> >> >> Berklee College of Music
>>> >> >> ______________________________________________
>>> >> >> President of Boulanger Labs - http://boulangerlabs.com
>>> >> >> Author & Editor of The Csound Book -
>>> >> >> http://mitpress.mit.edu/books/csound-book
>>> >> >> Author & Editor of The Audio Programming Book -
>>> >> >> http://mitpress.mit.edu/books/audio-programming-book
>>> >> >> ______________________________________________
>>> >> >> about: http://www.boulangerlabs.com/about/richardboulanger/
>>> >> >> about:
>>> >> >> http://www.csounds.com/community/developers/dr-richard-boulanger/
>>> >> >> music:
>>> >> >>
>>> >> >>
>>> >> >>
>>> >> >> http://www.csounds.com/community/developers/dr-richard-boulanger/dr-richard-boulanger-music/
>>> >> >> ______________________________________________
>>> >> >> email: rboulanger@berklee.edu
>>> >> >> facebook: https://www.facebook.com/richard.boulanger.58
>>> >> >> 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
>>> >
>>> >
>>> > 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
>

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

Date2016-08-30 18:07
FromJustin Rosander
SubjectRe: [ANN] pattern_sequencer
Sounds pretty smooth, Steven.  The sample .csd is pretty groovy, too. :)  Any plans on getting the UDOs into the blue repository?

On Sun, Aug 28, 2016 at 4:10 PM, Hlöðver Sigurðsson <hlolli@gmail.com> wrote:
Yes I experimented as well and found some parameters that got rid of it, bit weak bass so I went wild. I will try the diffs still. Yes I should put it in the readme, you need to load the figwheel script, this way the backend handler and fighwheel are all in one, enabling autoreload on backend (but in this case i dont use the backend at all). What I realized developing with figwheel and csound is that the hot-reload is actually great for csound development. I see potentials, making node.js or something. Also interesting is the clojurescript bootstrap, for me I see potential live-codeing in the browser in csound with clojure code (even bootstraped cljs is already existing, some specific om.next bootstraps may come available https://anmonteiro.com/2016/08/om-next-and-bootstrapped-clojurescript/ ). But these are dreams that require great amount of time.

To get the best out of your patches, I think piano grid popup could make this sequencer sweet, I may also decide to have only one +/- keys for all patterns in synchrony, its bit too algorithmic but it may be a cool effect still.

Also glad you got the figwheel running, as you see, embedding pnacl is very easy (took me a while to understand that csound.js is actually much much simpler than I previously tought).

2016-08-28 21:59 GMT+02:00 Steven Yi <stevenyi@gmail.com>:
Hi Hloover,

Took me a while to figure out my figwheel wasn't reloading resources,
but I found the issue had to do with the adsr140 calls with a release
of 0.0001.  Here's a diff:

diff --git a/src/cljs/ui/core.cljs b/src/cljs/ui/core.cljs
index eac13a1..8e6afba 100644
--- a/src/cljs/ui/core.cljs
+++ b/src/cljs/ui/core.cljs
@@ -93,7 +93,7 @@
   kcut = lfo(0.4, kcps , 1) + 0.6
   ;; aout moogladder aout, (200 * (1 + (kcut * 2))) * (1 + aenv * 8), 0.8
   aout zdf_ladder aout, (200 * (1 + (kcut * 1.8))) * (1 + aenv * 8), a(0.6)
-  aout *= aenv
+  aout *= aenv * 0.5
   al, ar pan2 aout, 0.4
   outc al, ar
   endin
@@ -108,8 +108,8 @@
   kpattern PatStringToArray Spattern, kpattern
   atrg, kindx seqsig gaclock, karrlen, kpattern
   printks2 \"pat2:%d\", kindx
-  aenv adsr140 agate * atrg, aretrig, 0.01, 0.25, 0.0001, 0.0001
-  avcoenv adsr140 agate * atrg, aretrig, 0.001, 0.15, 0.0001, 0.0001
+  aenv adsr140 agate * atrg, aretrig, 0.01, 0.25, 0.0001, 0.25
+  avcoenv adsr140 agate * atrg, aretrig, 0.001, 0.15, 0.0001, 0.15

That seems to have removed the clicks here.

On Sun, Aug 28, 2016 at 12:50 PM, Steven Yi <stevenyi@gmail.com> wrote:
> Hi Hloover,
>
> NIce!  I do get a crackle here too.  A couple of things:
>
> 1.I found a typo in the pattern copying code that I've fixed in libsyi.
> 2. I would check if vco is receiving a 0 pitch. I used a limit with .001 I
> think to get around this in some sketching. (Check the latest tests/gate.csd
> in my project)
>
> Hope that helps!
> Steven
>
>
> On Sun, Aug 28, 2016 at 12:30 PM, Hlöðver Sigurðsson <hlolli@gmail.com>
> wrote:
>> Ok Steven,
>>
>> this is my prototype
>> https://hlolli.github.io/
>>
>> code here
>> https://github.com/hlolli/csound-pnacl
>>
>> I plan to do more in close future, just need more instruments, and add
>> sliders etc.
>>
>> What happens on my laptop is that when the bass drum and synth play on the
>> same beat, I get crackling sound, but Im curious if that happens to others
>> as well.
>>
>> Also I have not error handling if the user is opening the page from an
>> unsupported pnacl client (in case someone wants to open this page, it
>> requires google chrome).
>>
>> 2016-08-27 21:39 GMT+02:00 Steven Yi <stevenyi@gmail.com>:
>>>
>>> Hi Hloover,
>>>
>>> I'm not quite sure I understand, but you should be able to just output
>>> kpatindx, no?  That should be the current index for the sequence,
>>> given that it's being % with the array length. Or am I missing
>>> something? (Maybe posting fuller code would help illustrate?)
>>>
>>> BTW: I'm looking forward to seeing what kind of UI you come up with as
>>> well as looking at the cljs code if you open source it. :)
>>>
>>> steven
>>>
>>> On Sat, Aug 27, 2016 at 1:12 PM, Hlöðver Sigurðsson <hlolli@gmail.com>
>>> wrote:
>>> > Hey Steven, Im now playing your step sequencer in pnacl in cljs. I'm
>>> > trying
>>> > to visually represent the steps, but I need to get the indicies. I
>>> > already
>>> > changed the seqsig opcode to accept karrlen as parameter (since
>>> > dynamically
>>> > allocated arrays are afaik not possible), now this part of the opcode
>>> >
>>> >  while (kindx < ksmps) do
>>> >     if(agate[kindx] == 1) then
>>> >       kpatindx = (kpatindx + 1) % karrlen
>>> >     endif
>>> >     aout[kindx] = kpattern[kpatindx]
>>> >     kpatindxout = kpatindx
>>> >     kindx += 1
>>> >   od
>>> >   xout aout, kpatindxout
>>> >
>>> > lacks some way to output the current patindxout. Just wondering out
>>> > loud
>>> > if
>>> > you know of any trick to fetch the current step within a given pattern
>>> > of
>>> > given length?
>>> >
>>> > Best, Hlodver
>>> >
>>> > 2016-08-26 15:19 GMT+02:00 John DeBlase <bsnacks000@gmail.com>:
>>> >>
>>> >> Thanks Steven! Looking forward to trying this out
>>> >>
>>> >> > On Aug 26, 2016, at 8:18 AM, Steven Yi <stevenyi@GMAIL.COM> wrote:
>>> >> >
>>> >> > Thanks Dr. B!  I'm enjoying exploring all of this and learning a lot
>>> >> > as I go along. I imagine if I had a budget I'd rather enjoy using a
>>> >> > physical modular synthesizer, but this suits what I'm looking for
>>> >> > rather nicely.  A few more modules on my list, then some synth
>>> >> > programming and testing out within Blue, and I think I'll be pretty
>>> >> > good to go for some live and composed work ideas I wanted to try
>>> >> > out.
>>> >> > Hope others find these useful!
>>> >> >
>>> >> > On Fri, Aug 26, 2016 at 2:21 AM, Dr. Richard Boulanger
>>> >> > <rboulanger@berklee.edu> wrote:
>>> >> >> Steven,
>>> >> >>
>>> >> >> This work is awesome,  inspiring,  and will be a great help in my
>>> >> >> teaching
>>> >> >> at Berklee, where we now have a ton of modular synths in the
>>> >> >> classrooms
>>> >> >> and
>>> >> >> the curriculum.
>>> >> >>
>>> >> >>> On Thu, Aug 25, 2016 at 4:18 PM, Steven Yi <stevenyi@gmail.com>
>>> >> >>> wrote:
>>> >> >>>
>>> >> >>> Hi All,
>>> >> >>>
>>> >> >>> I've put together a pattern_sequencer UDO available at:
>>> >> >>>
>>> >> >>>
>>> >> >>>
>>> >> >>> https://github.com/kunstmusik/libsyi/blob/master/pattern_sequencer.udo
>>> >> >>>
>>> >> >>> The current test file is at:
>>> >> >>>
>>> >> >>> https://github.com/kunstmusik/libsyi/blob/master/tests/gate.csd
>>> >> >>>
>>> >> >>> The pattern_sequencer is modeled loosely on the Doepfer Schaltwerk
>>> >> >>> modular sequencer (http://www.doepfer.de/sw_e.htm).  It uses a
>>> >> >>> single
>>> >> >>> global k-array to hold 128 patterns, with each pattern holding 8
>>> >> >>> sequences of 16 values. The array is global to avoid array copying
>>> >> >>> when passing arguments in UDOs.
>>> >> >>>
>>> >> >>> Some comments;
>>> >> >>>
>>> >> >>> * set_pat_seq_instr is an instrument for setting patterns.  It's
>>> >> >>> done
>>> >> >>> this way because arrays have some quirks in assuming array get/set
>>> >> >>> are
>>> >> >>> k-rate if the array is holding k-values.  This means that array
>>> >> >>> sets
>>> >> >>> can not happen in instr 0 space without Csound complaining of an
>>> >> >>> error, which was not good for live coding.  The instrument turns
>>> >> >>> itself off after the init pass to get this to work.  Another UDO,
>>> >> >>> set_pattern_seq, wraps calling set_pat_seq_instr.  The arguments
>>> >> >>> to
>>> >> >>> the UDO are the pattern number, sequence number, and the 16 values
>>> >> >>> to
>>> >> >>> use for the sequence.
>>> >> >>>
>>> >> >>> * Regarding the gate.csd, the primary things are the gatempo and
>>> >> >>> gaclock.  gaclock is driven by an mpulse opcode. gatempo is used
>>> >> >>> for
>>> >> >>> the frequency of the clock as well as lfo frequencies.  clock_div
>>> >> >>> is
>>> >> >>> used to slow the main gaclock; for example, in the sequencer
>>> >> >>> instrument, a clock_div with 16 means it will generate a pulse
>>> >> >>> every
>>> >> >>> 16 times that the main clock ticks.  That clock_div pulse is used
>>> >> >>> to
>>> >> >>> tick the seqsig that reads from gk_songpattern every 4 measures
>>> >> >>> (16
>>> >> >>> ticks).  The songpattern is very simple in this version and reads
>>> >> >>> as
>>> >> >>> "play pattern 0 3 times, then pattern 1, then alternate pattern 0
>>> >> >>> and
>>> >> >>> 1 for four measures".  As seqsig will loop, that song structure
>>> >> >>> will
>>> >> >>> repeat.  The example currently just sets the pattern to use for
>>> >> >>> the
>>> >> >>> bass_drum instrument.  Values in the pattern may be anything, so
>>> >> >>> it
>>> >> >>> could be used for pitch values or trigger values.
>>> >> >>>
>>> >> >>> * A known issue is that the pattern index is k-rate as are some
>>> >> >>> other
>>> >> >>> values. I will be modifying the code to use a-rate so that
>>> >> >>> everything
>>> >> >>> aligns correctly for the pattern_sequencer changes.
>>> >> >>>
>>> >> >>> * I'm not sure I mentioned it before, but the gate.udo reads in a
>>> >> >>> trigger signal and then holds a 1 value for a given duration in
>>> >> >>> seconds.  This can be used to drive the adsr140 envelope generator
>>> >> >>> or
>>> >> >>> whatever else one would want.
>>> >> >>>
>>> >> >>> * On the whole, I'm basing these UDOs on various modular
>>> >> >>> synthesizer
>>> >> >>> modules.  I have on my list to implement an arpeggiator module as
>>> >> >>> well
>>> >> >>> as something similar to the 4ms Rotating Clock Divider
>>> >> >>> (http://www.4mspedals.com/rcd.php).  If anyone has a request for a
>>> >> >>> module, please feel free to email here or file an issue in the
>>> >> >>> libsyi
>>> >> >>> project on Github.
>>> >> >>>
>>> >> >>> Thanks and enjoy!
>>> >> >>> steven
>>> >> >>>
>>> >> >>> 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
>>> >> >>
>>> >> >>
>>> >> >>
>>> >> >>
>>> >> >> --
>>> >> >> _____________________________________________
>>> >> >> Dr. Richard Boulanger
>>> >> >> Professor of Electronic Production and Design
>>> >> >> Professional Writing and Music Technology Division
>>> >> >> Berklee College of Music
>>> >> >> ______________________________________________
>>> >> >> President of Boulanger Labs - http://boulangerlabs.com
>>> >> >> Author & Editor of The Csound Book -
>>> >> >> http://mitpress.mit.edu/books/csound-book
>>> >> >> Author & Editor of The Audio Programming Book -
>>> >> >> http://mitpress.mit.edu/books/audio-programming-book
>>> >> >> ______________________________________________
>>> >> >> about: http://www.boulangerlabs.com/about/richardboulanger/
>>> >> >> about:
>>> >> >> http://www.csounds.com/community/developers/dr-richard-boulanger/
>>> >> >> music:
>>> >> >>
>>> >> >>
>>> >> >>
>>> >> >> http://www.csounds.com/community/developers/dr-richard-boulanger/dr-richard-boulanger-music/
>>> >> >> ______________________________________________
>>> >> >> email: rboulanger@berklee.edu
>>> >> >> facebook: https://www.facebook.com/richard.boulanger.58
>>> >> >> 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
>>> >
>>> >
>>> > 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
>

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

Date2016-08-30 18:53
FromSteven Yi
SubjectRe: [ANN] pattern_sequencer
Hi Justin,

Currently blueShare doesn't have UDO component to it, but that sounds
like something that would be nice to have. The import button in Blue
previously hit the old UDO database on csounds.com but that is no
longer active. If you want to add a request in the Blue tracker, I
could take a look at adding this to BlueShare and integrate it into
the Blue application.

Otherwise, the example file is coming along, but needs some work on
the synth sounds.  ;)

steven

On Tue, Aug 30, 2016 at 1:07 PM, Justin Rosander
 wrote:
> Sounds pretty smooth, Steven.  The sample .csd is pretty groovy, too. :)
> Any plans on getting the UDOs into the blue repository?
>
> On Sun, Aug 28, 2016 at 4:10 PM, Hlöðver Sigurðsson 
> wrote:
>>
>> Yes I experimented as well and found some parameters that got rid of it,
>> bit weak bass so I went wild. I will try the diffs still. Yes I should put
>> it in the readme, you need to load the figwheel script, this way the backend
>> handler and fighwheel are all in one, enabling autoreload on backend (but in
>> this case i dont use the backend at all). What I realized developing with
>> figwheel and csound is that the hot-reload is actually great for csound
>> development. I see potentials, making node.js or something. Also interesting
>> is the clojurescript bootstrap, for me I see potential live-codeing in the
>> browser in csound with clojure code (even bootstraped cljs is already
>> existing, some specific om.next bootstraps may come available
>> https://anmonteiro.com/2016/08/om-next-and-bootstrapped-clojurescript/ ).
>> But these are dreams that require great amount of time.
>>
>> To get the best out of your patches, I think piano grid popup could make
>> this sequencer sweet, I may also decide to have only one +/- keys for all
>> patterns in synchrony, its bit too algorithmic but it may be a cool effect
>> still.
>>
>> Also glad you got the figwheel running, as you see, embedding pnacl is
>> very easy (took me a while to understand that csound.js is actually much
>> much simpler than I previously tought).
>>
>> 2016-08-28 21:59 GMT+02:00 Steven Yi :
>>>
>>> Hi Hloover,
>>>
>>> Took me a while to figure out my figwheel wasn't reloading resources,
>>> but I found the issue had to do with the adsr140 calls with a release
>>> of 0.0001.  Here's a diff:
>>>
>>> diff --git a/src/cljs/ui/core.cljs b/src/cljs/ui/core.cljs
>>> index eac13a1..8e6afba 100644
>>> --- a/src/cljs/ui/core.cljs
>>> +++ b/src/cljs/ui/core.cljs
>>> @@ -93,7 +93,7 @@
>>>    kcut = lfo(0.4, kcps , 1) + 0.6
>>>    ;; aout moogladder aout, (200 * (1 + (kcut * 2))) * (1 + aenv * 8),
>>> 0.8
>>>    aout zdf_ladder aout, (200 * (1 + (kcut * 1.8))) * (1 + aenv * 8),
>>> a(0.6)
>>> -  aout *= aenv
>>> +  aout *= aenv * 0.5
>>>    al, ar pan2 aout, 0.4
>>>    outc al, ar
>>>    endin
>>> @@ -108,8 +108,8 @@
>>>    kpattern PatStringToArray Spattern, kpattern
>>>    atrg, kindx seqsig gaclock, karrlen, kpattern
>>>    printks2 \"pat2:%d\", kindx
>>> -  aenv adsr140 agate * atrg, aretrig, 0.01, 0.25, 0.0001, 0.0001
>>> -  avcoenv adsr140 agate * atrg, aretrig, 0.001, 0.15, 0.0001, 0.0001
>>> +  aenv adsr140 agate * atrg, aretrig, 0.01, 0.25, 0.0001, 0.25
>>> +  avcoenv adsr140 agate * atrg, aretrig, 0.001, 0.15, 0.0001, 0.15
>>>
>>> That seems to have removed the clicks here.
>>>
>>> On Sun, Aug 28, 2016 at 12:50 PM, Steven Yi  wrote:
>>> > Hi Hloover,
>>> >
>>> > NIce!  I do get a crackle here too.  A couple of things:
>>> >
>>> > 1.I found a typo in the pattern copying code that I've fixed in libsyi.
>>> > 2. I would check if vco is receiving a 0 pitch. I used a limit with
>>> > .001 I
>>> > think to get around this in some sketching. (Check the latest
>>> > tests/gate.csd
>>> > in my project)
>>> >
>>> > Hope that helps!
>>> > Steven
>>> >
>>> >
>>> > On Sun, Aug 28, 2016 at 12:30 PM, Hlöðver Sigurðsson 
>>> > wrote:
>>> >> Ok Steven,
>>> >>
>>> >> this is my prototype
>>> >> https://hlolli.github.io/
>>> >>
>>> >> code here
>>> >> https://github.com/hlolli/csound-pnacl
>>> >>
>>> >> I plan to do more in close future, just need more instruments, and add
>>> >> sliders etc.
>>> >>
>>> >> What happens on my laptop is that when the bass drum and synth play on
>>> >> the
>>> >> same beat, I get crackling sound, but Im curious if that happens to
>>> >> others
>>> >> as well.
>>> >>
>>> >> Also I have not error handling if the user is opening the page from an
>>> >> unsupported pnacl client (in case someone wants to open this page, it
>>> >> requires google chrome).
>>> >>
>>> >> 2016-08-27 21:39 GMT+02:00 Steven Yi :
>>> >>>
>>> >>> Hi Hloover,
>>> >>>
>>> >>> I'm not quite sure I understand, but you should be able to just
>>> >>> output
>>> >>> kpatindx, no?  That should be the current index for the sequence,
>>> >>> given that it's being % with the array length. Or am I missing
>>> >>> something? (Maybe posting fuller code would help illustrate?)
>>> >>>
>>> >>> BTW: I'm looking forward to seeing what kind of UI you come up with
>>> >>> as
>>> >>> well as looking at the cljs code if you open source it. :)
>>> >>>
>>> >>> steven
>>> >>>
>>> >>> On Sat, Aug 27, 2016 at 1:12 PM, Hlöðver Sigurðsson
>>> >>> 
>>> >>> wrote:
>>> >>> > Hey Steven, Im now playing your step sequencer in pnacl in cljs.
>>> >>> > I'm
>>> >>> > trying
>>> >>> > to visually represent the steps, but I need to get the indicies. I
>>> >>> > already
>>> >>> > changed the seqsig opcode to accept karrlen as parameter (since
>>> >>> > dynamically
>>> >>> > allocated arrays are afaik not possible), now this part of the
>>> >>> > opcode
>>> >>> >
>>> >>> >  while (kindx < ksmps) do
>>> >>> >     if(agate[kindx] == 1) then
>>> >>> >       kpatindx = (kpatindx + 1) % karrlen
>>> >>> >     endif
>>> >>> >     aout[kindx] = kpattern[kpatindx]
>>> >>> >     kpatindxout = kpatindx
>>> >>> >     kindx += 1
>>> >>> >   od
>>> >>> >   xout aout, kpatindxout
>>> >>> >
>>> >>> > lacks some way to output the current patindxout. Just wondering out
>>> >>> > loud
>>> >>> > if
>>> >>> > you know of any trick to fetch the current step within a given
>>> >>> > pattern
>>> >>> > of
>>> >>> > given length?
>>> >>> >
>>> >>> > Best, Hlodver
>>> >>> >
>>> >>> > 2016-08-26 15:19 GMT+02:00 John DeBlase :
>>> >>> >>
>>> >>> >> Thanks Steven! Looking forward to trying this out
>>> >>> >>
>>> >>> >> > On Aug 26, 2016, at 8:18 AM, Steven Yi 
>>> >>> >> > wrote:
>>> >>> >> >
>>> >>> >> > Thanks Dr. B!  I'm enjoying exploring all of this and learning a
>>> >>> >> > lot
>>> >>> >> > as I go along. I imagine if I had a budget I'd rather enjoy
>>> >>> >> > using a
>>> >>> >> > physical modular synthesizer, but this suits what I'm looking
>>> >>> >> > for
>>> >>> >> > rather nicely.  A few more modules on my list, then some synth
>>> >>> >> > programming and testing out within Blue, and I think I'll be
>>> >>> >> > pretty
>>> >>> >> > good to go for some live and composed work ideas I wanted to try
>>> >>> >> > out.
>>> >>> >> > Hope others find these useful!
>>> >>> >> >
>>> >>> >> > On Fri, Aug 26, 2016 at 2:21 AM, Dr. Richard Boulanger
>>> >>> >> >  wrote:
>>> >>> >> >> Steven,
>>> >>> >> >>
>>> >>> >> >> This work is awesome,  inspiring,  and will be a great help in
>>> >>> >> >> my
>>> >>> >> >> teaching
>>> >>> >> >> at Berklee, where we now have a ton of modular synths in the
>>> >>> >> >> classrooms
>>> >>> >> >> and
>>> >>> >> >> the curriculum.
>>> >>> >> >>
>>> >>> >> >>> On Thu, Aug 25, 2016 at 4:18 PM, Steven Yi
>>> >>> >> >>> 
>>> >>> >> >>> wrote:
>>> >>> >> >>>
>>> >>> >> >>> Hi All,
>>> >>> >> >>>
>>> >>> >> >>> I've put together a pattern_sequencer UDO available at:
>>> >>> >> >>>
>>> >>> >> >>>
>>> >>> >> >>>
>>> >>> >> >>>
>>> >>> >> >>> https://github.com/kunstmusik/libsyi/blob/master/pattern_sequencer.udo
>>> >>> >> >>>
>>> >>> >> >>> The current test file is at:
>>> >>> >> >>>
>>> >>> >> >>>
>>> >>> >> >>> https://github.com/kunstmusik/libsyi/blob/master/tests/gate.csd
>>> >>> >> >>>
>>> >>> >> >>> The pattern_sequencer is modeled loosely on the Doepfer
>>> >>> >> >>> Schaltwerk
>>> >>> >> >>> modular sequencer (http://www.doepfer.de/sw_e.htm).  It uses a
>>> >>> >> >>> single
>>> >>> >> >>> global k-array to hold 128 patterns, with each pattern holding
>>> >>> >> >>> 8
>>> >>> >> >>> sequences of 16 values. The array is global to avoid array
>>> >>> >> >>> copying
>>> >>> >> >>> when passing arguments in UDOs.
>>> >>> >> >>>
>>> >>> >> >>> Some comments;
>>> >>> >> >>>
>>> >>> >> >>> * set_pat_seq_instr is an instrument for setting patterns.
>>> >>> >> >>> It's
>>> >>> >> >>> done
>>> >>> >> >>> this way because arrays have some quirks in assuming array
>>> >>> >> >>> get/set
>>> >>> >> >>> are
>>> >>> >> >>> k-rate if the array is holding k-values.  This means that
>>> >>> >> >>> array
>>> >>> >> >>> sets
>>> >>> >> >>> can not happen in instr 0 space without Csound complaining of
>>> >>> >> >>> an
>>> >>> >> >>> error, which was not good for live coding.  The instrument
>>> >>> >> >>> turns
>>> >>> >> >>> itself off after the init pass to get this to work.  Another
>>> >>> >> >>> UDO,
>>> >>> >> >>> set_pattern_seq, wraps calling set_pat_seq_instr.  The
>>> >>> >> >>> arguments
>>> >>> >> >>> to
>>> >>> >> >>> the UDO are the pattern number, sequence number, and the 16
>>> >>> >> >>> values
>>> >>> >> >>> to
>>> >>> >> >>> use for the sequence.
>>> >>> >> >>>
>>> >>> >> >>> * Regarding the gate.csd, the primary things are the gatempo
>>> >>> >> >>> and
>>> >>> >> >>> gaclock.  gaclock is driven by an mpulse opcode. gatempo is
>>> >>> >> >>> used
>>> >>> >> >>> for
>>> >>> >> >>> the frequency of the clock as well as lfo frequencies.
>>> >>> >> >>> clock_div
>>> >>> >> >>> is
>>> >>> >> >>> used to slow the main gaclock; for example, in the sequencer
>>> >>> >> >>> instrument, a clock_div with 16 means it will generate a pulse
>>> >>> >> >>> every
>>> >>> >> >>> 16 times that the main clock ticks.  That clock_div pulse is
>>> >>> >> >>> used
>>> >>> >> >>> to
>>> >>> >> >>> tick the seqsig that reads from gk_songpattern every 4
>>> >>> >> >>> measures
>>> >>> >> >>> (16
>>> >>> >> >>> ticks).  The songpattern is very simple in this version and
>>> >>> >> >>> reads
>>> >>> >> >>> as
>>> >>> >> >>> "play pattern 0 3 times, then pattern 1, then alternate
>>> >>> >> >>> pattern 0
>>> >>> >> >>> and
>>> >>> >> >>> 1 for four measures".  As seqsig will loop, that song
>>> >>> >> >>> structure
>>> >>> >> >>> will
>>> >>> >> >>> repeat.  The example currently just sets the pattern to use
>>> >>> >> >>> for
>>> >>> >> >>> the
>>> >>> >> >>> bass_drum instrument.  Values in the pattern may be anything,
>>> >>> >> >>> so
>>> >>> >> >>> it
>>> >>> >> >>> could be used for pitch values or trigger values.
>>> >>> >> >>>
>>> >>> >> >>> * A known issue is that the pattern index is k-rate as are
>>> >>> >> >>> some
>>> >>> >> >>> other
>>> >>> >> >>> values. I will be modifying the code to use a-rate so that
>>> >>> >> >>> everything
>>> >>> >> >>> aligns correctly for the pattern_sequencer changes.
>>> >>> >> >>>
>>> >>> >> >>> * I'm not sure I mentioned it before, but the gate.udo reads
>>> >>> >> >>> in a
>>> >>> >> >>> trigger signal and then holds a 1 value for a given duration
>>> >>> >> >>> in
>>> >>> >> >>> seconds.  This can be used to drive the adsr140 envelope
>>> >>> >> >>> generator
>>> >>> >> >>> or
>>> >>> >> >>> whatever else one would want.
>>> >>> >> >>>
>>> >>> >> >>> * On the whole, I'm basing these UDOs on various modular
>>> >>> >> >>> synthesizer
>>> >>> >> >>> modules.  I have on my list to implement an arpeggiator module
>>> >>> >> >>> as
>>> >>> >> >>> well
>>> >>> >> >>> as something similar to the 4ms Rotating Clock Divider
>>> >>> >> >>> (http://www.4mspedals.com/rcd.php).  If anyone has a request
>>> >>> >> >>> for a
>>> >>> >> >>> module, please feel free to email here or file an issue in the
>>> >>> >> >>> libsyi
>>> >>> >> >>> project on Github.
>>> >>> >> >>>
>>> >>> >> >>> Thanks and enjoy!
>>> >>> >> >>> steven
>>> >>> >> >>>
>>> >>> >> >>> 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
>>> >>> >> >>
>>> >>> >> >>
>>> >>> >> >>
>>> >>> >> >>
>>> >>> >> >> --
>>> >>> >> >> _____________________________________________
>>> >>> >> >> Dr. Richard Boulanger
>>> >>> >> >> Professor of Electronic Production and Design
>>> >>> >> >> Professional Writing and Music Technology Division
>>> >>> >> >> Berklee College of Music
>>> >>> >> >> ______________________________________________
>>> >>> >> >> President of Boulanger Labs - http://boulangerlabs.com
>>> >>> >> >> Author & Editor of The Csound Book -
>>> >>> >> >> http://mitpress.mit.edu/books/csound-book
>>> >>> >> >> Author & Editor of The Audio Programming Book -
>>> >>> >> >> http://mitpress.mit.edu/books/audio-programming-book
>>> >>> >> >> ______________________________________________
>>> >>> >> >> about: http://www.boulangerlabs.com/about/richardboulanger/
>>> >>> >> >> about:
>>> >>> >> >>
>>> >>> >> >> http://www.csounds.com/community/developers/dr-richard-boulanger/
>>> >>> >> >> music:
>>> >>> >> >>
>>> >>> >> >>
>>> >>> >> >>
>>> >>> >> >>
>>> >>> >> >> http://www.csounds.com/community/developers/dr-richard-boulanger/dr-richard-boulanger-music/
>>> >>> >> >> ______________________________________________
>>> >>> >> >> email: rboulanger@berklee.edu
>>> >>> >> >> facebook: https://www.facebook.com/richard.boulanger.58
>>> >>> >> >> 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
>>> >>> >
>>> >>> >
>>> >>> > 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
>>> >
>>>
>>> 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

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