Skip to content

Commit df40682

Browse files
committed
document sequ reset option
1 parent 5129949 commit df40682

File tree

4 files changed

+72
-54
lines changed

4 files changed

+72
-54
lines changed

examples/sequ2.csd

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,23 @@ instr 1
1010
irhythm0[] fillarray 1, 1.5, 0.5, 0.5, 0.5, 0.5, 1.5, 1
1111
;; instrument array - instrument number to render for each step
1212
iinsts0[] fillarray 11, 12, 13, 14, 15, 16, 17, 18
13-
;; note array - here in cpsmidinn and amplitudes - esentially the 'p4' and 'p5' output from sequ
14-
inotes[][] init 2,8
13+
;; note array - here cpsmidinn(p4), amps(p5), mod ratios(p6), mod indices(p7)
14+
;; - esentially the 'p4', 'p5', 'p6' and 'p7' are output from sequ
15+
inotes[][] init 4,8 ;initialize 4 rows with 8 columns - p4=pitch, p5=amp, p6=modratio, p7=modindex
1516
inotes fillarray 60, 61, 62, 63, 64, 65, 66, 67, \
16-
0.9,0.7,0.6,0.8,0.9,0.6,0.7,0.6
17+
0.8, 0.3, 0.6, 0.2, 0.7, 0.4, 0.5, 0.6, \
18+
1, 2, 3, 4, 5, 6, 7, 8, \
19+
1, 11, 2, 12, 3, 21, 4, 22
1720
;; NOTE: this can be any sequence of values
1821
;; variable tempo
1922
kspeed linseg 85, p3*.7, 85, p3*.3, 240
20-
;; rhythms, insts, notes, bpm, length, mode, verbose
21-
kSeq sequ irhythm0, iinsts0, inotes0, kspeed, 8, p4, 0
23+
;; rhythms, insts, notes, bpm, length, mode, step, reset, verbose
24+
kSeq sequ irhythm0, iinsts0, inotes, kspeed, 8, p4
2225
endin
2326
2427
instr 11, 12, 13, 14, 15, 16, 17, 18
2528
kenv linseg 0, p3*0.01, 1, p3*.99, 0
26-
asig oscil p5, cpsmidinn(p4)
29+
asig foscil p5, cpsmidinn(p4), 1, p6, p7
2730
outall asig * kenv
2831
endin
2932
@@ -54,16 +57,21 @@ i1 0 6 -5 ;; play backward once and stop
5457
s
5558
f0 1
5659
s
60+
i1 0 15 -6 ;; shuffle mode
61+
s
62+
f0 1
63+
s
5764
i1 0 30 1 ;; mutate after each step
5865
s
5966
f0 1
6067
s
6168
i1 0 30 2 ;; mutate each second step
6269
s
63-
f0 1
70+
f0 1
6471
s
6572
i1 0 30 4 ;; mutate every four steps
6673
e
67-
e
6874
</CsScore>
6975
</CsoundSynthesizer>
76+
77+

misc/examples.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -806,6 +806,8 @@
806806
<para><ulink url="examples/sensekey.csd"><citetitle>sensekey.csd</citetitle></ulink></para><simpara />
807807
<para><ulink url="examples/seqtime.csd"><citetitle>seqtime.csd</citetitle></ulink></para><simpara />
808808
<para><ulink url="examples/seqtime2.csd"><citetitle>seqtime2.csd</citetitle></ulink></para><simpara />
809+
<para><ulink url="examples/sequ1.csd"><citetitle>sequ1.csd</citetitle></ulink></para><simpara />
810+
<para><ulink url="examples/sequ2.csd"><citetitle>sequ2.csd</citetitle></ulink></para><simpara />
809811
<para><ulink url="examples/setctrl.csd"><citetitle>setctrl.csd</citetitle></ulink></para><simpara />
810812
<para><ulink url="examples/setscorepos.csd"><citetitle>setscorepos.csd</citetitle></ulink></para><simpara />
811813
<para><ulink url="examples/splitrig.csd"><citetitle>splitrig.csd</citetitle></ulink></para><simpara />

misc/quickref.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1111,6 +1111,9 @@
11111111
<synopsis>kres[, kkeydown] <link linkend="sensekey">sensekey</link>&#160;</synopsis><para/>
11121112
<synopsis>ktrig_out <link linkend="seqtime">seqtime</link> ktime_unit, kstart, kloop, kinitndx, kfn_times</synopsis><para/>
11131113
<synopsis>ktrig_out <link linkend="seqtime2">seqtime2</link> ktrig_in, ktime_unit, kstart, kloop, kinitndx, kfn_times</synopsis><para/>
1114+
<synopsis>kres <link linkend="sequ">sequ</link> irhythm[], iinstr[], idata[], kbpm, klen [, kmode] [, kstep] [, kverbose]
1115+
</synopsis><synopsis>kres <link linkend="sequ">sequ</link> irhythm[], iinstr[], idata[][], kbpm, klen [, kmode] [, kstep] [, kverbose]
1116+
</synopsis><para/>
11141117
<synopsis><link linkend="setctrl">setctrl</link> inum, ival, itype</synopsis><para/>
11151118
<synopsis> <link linkend="setscorepos">setscorepos</link> ipos</synopsis><para/>
11161119
<synopsis><link linkend="splitrig">splitrig</link> ktrig, kndx, imaxtics, ifn, kout1 [,kout2,...,koutN]</synopsis><para/>

opcodes/sequencer.xml

Lines changed: 51 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,18 @@
2424
</refsect1>
2525
<refsect1>
2626
<title>Syntax</title>
27-
<synopsis>kres <command>sequ</command> irhythm[], iinstr[], idata[], kbpm, klen [, kmode] [, kstep] [, kverbose]
27+
<synopsis>kres <command>sequ</command> irhythm[], iinstr[], idata[], kbpm, klen [, kmode] [, kstep] [, kreset] [, kverbose]
2828
</synopsis>
29-
<synopsis>kres <command>sequ</command> irhythm[], iinstr[], idata[][], kbpm, klen [, kmode] [, kstep] [, kverbose]
29+
<synopsis>kres <command>sequ</command> irhythm[], iinstr[],
30+
idata[][], kbpm, klen [, kmode] [, kstep] [, kreset] [, kverbose]
3031
</synopsis>
3132
</refsect1>
3233

3334
<refsect1>
3435
<title>Initialization</title>
3536
<para>
3637
<emphasis>irhythm</emphasis> - array of durations in
37-
in beats. The actual duration is determined by these values divided
38+
beats. The actual duration is determined by these values divided
3839
by the current BPM.
3940
</para>
4041
<para>
@@ -44,7 +45,7 @@
4445
</para>
4546
<para>
4647
<emphasis>idata</emphasis> - Either a vector of p4 values to the
47-
associated iinstr step or a two dimenional array of p4, p5,
48+
associated iinstr step or a two dimensional array of p4, p5,
4849
p6...values. Typically, one would specify pitch
4950
information in cps, or MIDI note number; but the arbitrary list
5051
of p4 data values could have other uses in the called iinstr.
@@ -90,44 +91,48 @@ and stop</para></listitem>
9091
or any other krate controller. An event is scheduled if this
9192
argument is positive, and just waits if it is negative. Default
9293
is zero.
93-
</para>
94-
<para>
95-
<emphasis>kverbose</emphasis> - if non zero prints messages
96-
about the internal state changes. Default is zero.
97-
</para>
98-
<para>
99-
<emphasis>kres</emphasis> - gives the index of the event created
100-
for the current k-cycle, or -1 if no event happened.
101-
</para>
94+
</para>
95+
<para>
96+
<empasis>reset</emphasis> - if non zer esets te sequencer (like
97+
mode -7). Defalt is zero.
98+
</para>
99+
<para>
100+
<emphasis>kverbose</emphasis> - if non zero prints messages
101+
about the internal state changes. Default is zero.
102+
</para>
103+
<para>
104+
<emphasis>kres</emphasis> - gives the index of the event created
105+
for the current k-cycle, or -1 if no event happened.
106+
</para>
102107

103-
<note>
104-
<para>
105-
While the irhythm, iinstr, and idata, arrays are i-time, the
106-
values of the entries are read at k-rate when used. This
107-
means that by using global i-rate vectors, it is possible
108-
(with care) to change the specific values and other details at
109-
performance time.
110-
</para>
111-
</note>
112-
</refsect1>
108+
<note>
109+
<para>
110+
While the irhythm, iinstr, and idata, arrays are i-time, the
111+
values of the entries are read at k-rate when used. This
112+
means that by using global i-rate vectors, it is possible
113+
(with care) to change the specific values and other details at
114+
performance time.
115+
</para>
116+
</note>
117+
</refsect1>
113118

114-
<refsect1>
115-
<title>Examples</title>
116-
<para>
117-
Here is an example of the sequ opcode. It uses the file <ulink url="examples/sequ1.csd"><citetitle>sequ1.csd</citetitle></ulink>
118-
<example>
119-
<title>Example of the sequ opcode.</title>
120-
<xi:include href="examples-xml/sequ1.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
121-
</example>
122-
Here is another example of the sequ opcode showing the various
123-
modes. It uses the file <ulink
124-
url="examples/sequ2.csd"><citetitle>sequ2.csd</citetitle></ulink>
125-
<example>
126-
<title>Example of the sequ opcode.</title>
127-
<xi:include href="examples-xml/sequ2.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
128-
</example>
129-
</para>
130-
</refsect1>
119+
<refsect1>
120+
<title>Examples</title>
121+
<para>
122+
Here is an example of the sequ opcode. It uses the file <ulink url="examples/sequ1.csd"><citetitle>sequ1.csd</citetitle></ulink>
123+
<example>
124+
<title>Example of the sequ opcode.</title>
125+
<xi:include href="examples-xml/sequ1.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
126+
</example>
127+
Here is another example of the sequ opcode showing the various
128+
modes. It uses the file <ulink
129+
url="examples/sequ2.csd"><citetitle>sequ2.csd</citetitle></ulink>
130+
<example>
131+
<title>Example of the sequ opcode.</title>
132+
<xi:include href="examples-xml/sequ2.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
133+
</example>
134+
</para>
135+
</refsect1>
131136

132137

133138
<!-- <refsect1> -->
@@ -137,9 +142,9 @@ and stop</para></listitem>
137142
<!-- </para> -->
138143
<!-- </refsect1> -->
139144

140-
<refsect1>
141-
<title>Credits</title>
142-
<para>Written by &namejohn;</para>
143-
<para>New in Csound 6.17</para>
144-
</refsect1>
145-
</refentry>
145+
<refsect1>
146+
<title>Credits</title>
147+
<para>Written by &namejohn;</para>
148+
<para>New in Csound 6.17</para>
149+
</refsect1>
150+
</refentry>

0 commit comments

Comments
 (0)