You are on page 1of 61

GlobSeq:

Global Sequencers and Kyma Scripting


by

Cristian Vogel









Published by NeverEngine Labs 2018

1
Credits and Copyright
GlobSeq for Kyma 7
A Sequencer Specification Tool1
Design and Programming by Cristian Vogel


All rights reserved
© Cristian Vogel 2018
℗ NeverEngineLabs Plus 2018

GlobSeq is licensed under the following conditions:
You may not distribute, sell or re-use GlobSeq or any part of its documentation or
source code in any software, hardware or other form of distribution that contains it
or is a derivative of it without prior consultation and written consent. 


GlobSeq
Global Sequencers and Kyma Scripting
Written by Cristian Vogel

All rights reserved
© Cristian Vogel 2018
℗ Version 1.1 published 27th September 2018 NeverEngineLabs Plus
Kyma is a registered trademark of Symbolic Sound Corporation.
The GlobSeq name is protected under copyright.


Web: www.neverenginelabs.com Twitter: @neverenginelabs Email: support@neverenginelabs.com

1
The six month development cycle of GlobSeq was funded by subscribers of the NeverEngine-
Labs Rhythmic Computation Lab 2018 - THANKS GUYS!

2
What is GlobSeq?
GlobSeq is an encapsulated Class for use in Kyma Signal graphs, Timelines and
MultiGrids. It was designed and programmed by Cristian Vogel entirely in the
Kyma environment using Smalltalk and Capytalk. Its main function is to sequence
through pre-defined collections when triggered and emit the value of the element
at the current step. By that general definition we could say that GlobSeq is a step
sequencer. But actually it is much more than just one type of step sequencer. 


GlobSeq is a tool that enables you to specify the feature set and interface for se-
quencers of your own design in Kyma. 


By default, GlobSeq does not create any audio signals of its own, but instead fo-
cusses on scripting as a means to rapidly prototype different types of step se-
quencers with which you can create audio by modulating the parameters of audio
generators in Kyma or - as we shall see - possibly beyond Kyma.


This book is intended to be a user guide for the Global Sequencer tool, but can
also serve as a valuable introduction to Kyma scripting and it's two integrated lan-
guages - Capytalk and Smalltalk. 


Even if you are just curious about GlobSeq and Kyma, we hope that reading
through this book may help you step forward with your understanding of how
scripting can be used in the Kyma system or simply inspire you in your creative pur-
suit whatever that may be.


3
Global Sequencer
The main differences between a GlobSeq sequencer and the standard Kyma step
sequencer is that a GlobSeq sequencer broadcasts its output mainly as Kyma spe-
cific global controller events and/or as MIDI Events and/or as audio control sig-
nals. What this means, is that the current value of each pattern is broadcast to the
rest of the Kyma signal graph or to external devices from a global controller with a
unique !hotValue name which you define. As you might know from elsewhere in
Kyma, the hot value generated by a global controller can be used in any parameter
field in the signal graph by simply typing it's name. It can be used on its own or
nestled in a Capytalk expression like in this example:

 (!glob_cutoff * 1000) + 80 hz 

In this way GlobSeq can be used to automate parameters anywhere in the signal
graph, not just in Sounds that are connected to the left of it, like the standard Kyma
step sequencer does. In fact, by default you don't even need to connect a GlobSeq
instance to anything in particular in the signal graph. GlobSeq doesn't use the sym-
bolic "wire" metaphor as an output, like other Kyma Sounds do1. The globals which
GlobSeq generates usually appear in the VCS as widgets which change value ac-
cording to their sequenced rows. You don't interact with one of these generated
widgets in the VCS. You should think of it as a way to see the value of an automated
variable modulating some aspect of the Sound Program running on the Pacarana.
Furthermore, as we shall soon see, you could also start modulating systems that ex-
ist outside the Paca(rana) with these globals when you start using the external rout-
ing options of a GlobSeq sequencer.

1
Unless you are using the Control Voltage features, then GlobSeq will emit a two channel audio
signal

4
What the Global part means
To use any global generated by your GlobSeq sequencer, you just have to type its
unique !generatedEventName in the parameter field or Capytalk expression you
wish it to modulate. As mentioned earlier, GlobSeq events could also be used as
signals that control external hardware or software outside of Kyma using MIDI, OSC
and Control Voltage. 


The Control Voltage option is a special scenario which enables GlobSeq to output
audio rate control signals through Kyma's audio outputs. If you have a DC coupled
interface or an ADAT-to-CV module such as the ExpertSleepers ES-3 you will be
able to sequence your Eurorack modular synth from GlobSeq. 


Vintage and modern MIDI gear can also be sequenced with note, velocity and CC
numbers by simply setting the MidiChannel to any value higher than 0 and con-
necting a MIDI cable from your Kyma system's MIDI output to the hardware. If you
own Delora Software's KymaConnect then you can send MIDI control data from
GlobSeq via the VirtualPacarana MIDI output to other software and control VST in-
struments running in your DAW. 


And for further advanced applications you can use Kyma's built in OSC support.
With OSC you can send high resolution OSC control messages to sequence soft-
ware controlled lighting systems, spatial sound parameters, virtual object, dancing
robots or anything you can think of using GlobSeq sequencers and Kyma1.

1
NeverEngineLabs SendOSC may help make that process quicker and easier, be sure to check
it out.

5
External Control of GlobSeq
This goes the other way too. When you want to step a GlobSeq from an external
clock source such as a modular synth pulse output, or some other kind of trigger
generators you can do that as MIDI, audio or voltage signal. GlobSeq can even ex-
tract triggers from a continuous audio signal, such as an LFO or waveform allowing
for some interesting groove warping and groove morphing ideas, that will go way
beyond the 'shuffle' feature of conventional sequencers. 


If you want to program steps realtime into sequencer patterns using hardware
controllers, your touch tablet or other controllers, this is possible too, using Kyma's
built-in method for mapping widgets in the VCS to external controllers, which of
course is all fully compatible with GlobSeq.


Possibilities are quite far ranging, as you can probably sense by now. If you have
purchased the GlobSeq Examples Pack, you will find some examples of how to
program GlobSeq to do all of the above and more, which you can use as starting
points to successfully integrate sequencers with your own setups and workflows.

6
Brave New Hello World
Kyma has always been a little unconventional in some things and this is exactly
what we love about it at NeverEngine Labs. For example, most scripting languages
out there are introduced to a new user through the convention of a 'Hello World'
program which simply prints 'Hello World' to the screen. In Capytalk, you would
never need to write such a pointless script, so there isn't any obvious way to do a
'Hello World' program. You could load a text file containing the words 'Hello
World' and turn each character into a sound quite easily though. 


The point is, that Kyma scripting is not an essential part of using Kyma, but learning
more about it can be very rewarding and actually quite straightforward. Scripting in
Kyma feels elegant, lean and efficient and does not demand that you know any-
thing about Asynchronous Functions and Pointers and Types and stuff which will
send you deep into forums and tutorials and far from the goal of making expres-
sive electronic music - which is what the Kyma system is almost entirely dedicated
to.

Why Script?
Learning how to script with confidence is the key to opening up amazing next level
stuff because - at its heart - Kyma is a powerful and elegant computational music
and sound design environment. You program little programs here and there to
compute variation or nuance or just to keep things varied in the music you are cre-
ating. Whats more the sound altering and music generating scripts you write will al-
ways sound amazing thanks to the precision and power of the Paca(rana) sound
computer.

7
Capytalk and Smalltalk.
Capytalk and Smalltalk are two scripting languages that co-exist and can be used
together in Kyma scripting. Capytalk syntax is pretty much the same as Smalltalk
syntax. In fact, they integrate so well together that Kyma users sometimes get con-
fused about which is which. It is important to understand what makes them differ-
ent and to know where to use one and not the other.

8
Capytalk is used to CONTROL things.
Capytalk is a high level event-driven language for realtime computation. Capytalk is
an elegant and streamlined approach to realtime programming developed by Car-
la Scaletti at Symbolic Sound since the start of Kyma back in the early 90s. It has ex-
ceptionally tight scheduling and precise timing which you can really rely on, no
matter how complex your program might be. Capytalk is characterised by event
driven expressions and !HotValues which usually appear as graphical widgets in
the VCS. Capytalk is a way to interact with the variables of a program that has been
designed in the programming environment - Kyma on your host machine - but will
execute in an audio specialised runtime environment - the Paca(rana) sound com-
putation engine. For those of you who might be reading this and don't know what
a Paca(rana) is, it is literally the other half of the Kyma system, a masterpiece of DSP
hardware designed by Kurt Hebel to work hand in hand with the Kyma software
programming environment.

This is what Capytalk looks like:

(!run bpm: bpm) nextChaotic * (!range smoothFor: (!sloGroTime * 10))

At runtime, all Capytalk expressions are evaluated every millisecond. Sometimes


they are evaluated only when a user specified event happens. When Capytalk is ex-
ecuting on the Paca(rana) at runtime, it no longer exists in any form of human read-
able script. Instead, it has been compiled into a low level machine code program
which runs perfectly alongside precision high speed audio processing on the
Paca(rana). OK. And Smalltalk?

9
Smalltalk is used to BUILD things.

"More than four decades later, no programming language


has yet to catch up to Smalltalk in terms of simplicity and
elegance, minimal cognitive friction, object-oriented puri-
ty, elegant live coding and debugging, enormous pro-
grammer productivity, and professional respect.” -
https://hackernoon.com/@richardeng 1

Smalltalk is a revered "Object-Oriented" language that has its roots in a golden


age of computer science. In Kyma, Smalltalk only works in the programming envi-
ronment. In fact, Smalltalk seems to be the language that the programming envi-
ronment is mostly written in, but I may be wrong about that. 


This is what a little Smalltalk program looks like:

| x y | "define some variable names"

y := #( 1 2 3 4 ). "create a Collection and assign it to y"

"Smalltalk block transforms each element of y and collects a new


collection"
x := y collect: [:a | a * 10].

"yield the new collection in reverse order #(40 30 20 10)"


x reverse

The main thing to understand in the context of Kyma is that any purely Smalltalk
code is interpreted before the program is sent to the Pacarana. It is often written in
Kyma's Script Prototype which passes results into the Signal graph using the spe-
cial ?GreenVariable construct2. But you don't have to work that way, in fact

1
Attribution https://hackernoon.com/@richardeng
2
See Kyma X Revealed p.281 to find out more about green parameter variables

10
Smalltalk programs can be written directly into any parameter field, which is fine as
long as they yield the right type of result for that field. The Smalltalk language inter-
preter is one stage in the automated process of building the machine code pro-
gram that will be sent to the Paca(rana). It therefore serves no more purpose once
the program is running on the hardware, and this is important point to understand.
You don't use Smalltalk to change things in a Sound program that is running, you
only use Capytalk to do that. So when do we use Smalltalk? 


You can use Smalltalk to build more complicated scripts in just a few lines of
code, keeping things graceful and elegant.
In more advanced Kyma programming, such as we do at NeverEngine Labs,
Smalltalk can be used to construct different configurations of programs according
to some user options, or to construct Sound programs algorithmically using itera-
tive Sound building scripts. That's how the amazing Replicator prototype works in
Kyma and how GlobSeq builds the sequencers of your dreams 3 .


Smalltalk is especially useful for collecting numbers or Capytalk expressions to-


gether as elements into a Collection, which is the data structure at the heart of the
GlobSeq concept. Here's a very simple example of a shortcut in Smalltalk to create
a Collection of faders in the VCS - widgets in the VCS are visible and grabbable
Capytalk:

{!Fader copies: 16}

Type the above anywhere in Kyma, highlight it with your mouse and press ctrl-Y to
evaluate the expression. Kyma will print the result directly inline. You will see that a
little Smalltalk goes a long way. Here's a slightly more flexible version which mixes
Smalltalk and Capytalk. Can you guess what it does?

(1 to: 16) collect: [:i | (!Fader suffix: i) smoothFor: !faderSmooth


s]

3
See Kyma X Revealed p.283 to find out more about Smalltalk algorithmic Sound construction.


11


One final example here. This script could be written directly in the OnDuration field
of a FunctionGenerator prototype, or anywhere that might expect a duration.


| x y |

x := #( 1 2 3 4).

y := x collect: [ :a |
(a odd) ifTrue: [ a * 10 ]
ifFalse: [ a * 100]
].

(!Selector of: y ) ms


Almost all of this script is classical Smalltalk. It transforms a Collection of numbers
initially assigned to the variable x . The transformation happens to each element by
the code inside the block. Each element from x is passed into the block using a
temporary block variable [ :a | ... ] - this block structure exists in Smalltalk
only. The block does some kind of conditional transform on each element as it
comes through, and collects the result into a new Collection called y . 


Smalltalk is great for building and transforming data Collections and lists of data
objects, such as numbers, filenames in a folder or Capytalk objects as I mentioned
earlier on. 


Take a look at the last line of the example though. The last line is pure Capytalk
coming into play at runtime. It allows you to index into the Collection constructed
by the Smalltalk code according to an event called !Selector - which may possibly
be coming from a GlobSeq sequencer, or manually with a widget in the VCS.


Carla Scaletti's essential book Kyma X Revealed is the best place for further refer-
ence, and it is directly available from the Help menu in Kyma 7.

12
GlobSeq Scripting
Scripting with Kyma in the context of GlobSeq affords many new possibilities for in-
novative step sequencer designs for controlling Kyma Sounds and beyond. Re-
member, everything you learn about scripting when using GlobSeq will benefit you
throughout Kyma. It's really worth rolling up your sleeves and learning the con-
cepts and syntax.

First Steps

1. Set some master parameters such as BPM and RUN in separate para-
meter fields of the GlobSeq prototype, just like in all other Kyma proto-
types.
2. Decide which parameters you want to automate as GlobSeq globals.
3. Define the rows which will form the sequencer patterns by scripting in
the fields called the MasterGatesPattern, MasterPitchesPattern and
GlobalEventPatterns.
4. If the interpreter is happy with your scripting it will send the program to
the compiler and the compiled code will be loaded to the Paca(rana).
5. Each GlobSeq instance you have in your signal graph will build the se-
quencer you have specified from it, with the kind of controls you have
requested in the VCS will appear.
6. When you start things running using the RUN and BPM parameter
fields, a GlobSeq sequencer will begin counting and stepping through
all the Collections that you have defined in that particular GlobSeq in-
stance generating globals from the rows you defined.
7. If you have specified MIDI or CV - it will also begin to output those
events as audio and MIDI to external hardware or software.

13
Collection Row Sequence Pattern
Let's look at a GlobSeq Collection the main data of the row definition. It could be
just a sequence of fixed values that represent a pattern for example:

( 1 0 0 1 0 0 )

It could also be a sequence of fixed values and Capytalk expressions and !hotVa-
lues . A !HotValue element may well relate to a widget in the VCS because wid-
gets are Capytalk !hotValues made visible. Here is an example of a six element
Collection which contains different types of elements:

( {1 brownianGate: 3 s} 0 0 { !upBeat } 0 { 1 - !upBeat} )

You can also use the Smalltalk language as a way to fill and structure sequenceable
Collections. Here are a couple of examples that create patterns of values using
pure Smalltalk:

"32 values equally spaced between 0 and 1"


{ (0 to: 1 by: (1/31)) asArray }

"A fixed Collection of positive growing Random Numbers using


Smalltalk"
{ (1 to: 32) collect: [:i | Random new next abs * i ] }

And here is an example that uses Smalltalk to build a Collection made of 16 differ-
ent variants of a Capytalk expression which also involves some widgets:

{
(1 to: 16) collect: [:i |
(!baseNote suffix: i) +
((!walk swarmFollowFromPosition: 0 stepSize: (i/16) reset: !reset)
* 12)
]
}

14
In the above example the script is spaced out a bit so it's easier to read - which is
best practice when you are programming. You can do that using ALT-Tab in Kyma.
The example builds a collection whose elements start to wander from the base
pitches set using a row of 16 faders in the VCS, whenever you toggle the !walk
button. Some kind of wandering bassline perhaps?

At this point you could say that what we are describing here, is not much different
to what the standard Kyma StepSequencer prototype already does. So what does
GlobSeq bring to the party? GlobSeq brings its own custom set of scriptable op-
tions which you use to specify the features of a sequencer you want it to construct
for you. As far as we know, this is a first in Kyma. 


Let's take a look at the GlobSeq options.

15
GlobSeq Options
The GlobSeq options have been carefully chosen to let you quickly specify what
kind of things a sequencer will be able to do, how it will behave and how many in-
teractive controls you want it to have. You use them inline with Capytalk and
Smalltalk in a GlobSeq definition row.


Before you start programming your own sequencers you may wish to study some
examples at first. You will find quite a few in the GlobSeq Examples Pack available
at the website. Mixing the GlobSeq options with Capytalk and Smalltalk does need
to obey some rules regarding unique names, correct use of curly parentheses,
block structures and so on. But it won't take long to master and once you are flow-
ing, you will appreciate that you can use none, all or some GlobSeq options and it
doesn't matter how you arrange them. GlobSeq is pretty easygoing in that respect.
As mentioned in the previous chapter it is advisable to use ALT-TAB to indent lines
and use RETURN to space things out. It will be much easier to debug when prob-
lems arise1. 


GlobSeq options start with a # and you add them after the main data of the row
definition. Detailed descriptions of all the options, how to use them and what they
do, can be found in Appendix A of this guide and you will also find detailed in-line
help for each parameter of GlobSeq when you are working with it in Kyma. Just
hover your mouse over a parameter field and a short description will pop up. 


Following now is an overview of the syntax for GlobSeq rows and the options for
different types of rows. We start with how to correctly specify the name of the Glob-
al that will be generated and then go onto the GlobSeq options.

1
Check the Debugging Tips in Appendix B for further troubleshooting advice

16
Generated Global Event Name
The first element in a GlobSeq row must be a name for the Global which will
broadcast the value of the element at the current step in the row definition. The
name declaration should begin with an exclamation mark and must be totally
unique. If a global name conflicts with another name, things might not work as you
expect and sequencers may malfunction. In the worst case, the Paca(rana) could
crash. You can name a global anything you want but try to avoid number suffixes.
Use letters instead.
Some examples

!UniqueGeneratedEventName
!Glob_UniqueGeneratedEventName
!DrumVoice_1 <--- (will work but not advised)
!DrumVoice_A <--- (preferred)

As is being emphasised here, you should not define a global which has the same
name as another in the same instance of GlobSeq or another instance of GlobSeq
that might be also running. Neither must it clash with any event names being gen-
erated by other SoundToGlobalController Classes somewhere else. If you
want to work with the Replicator and GlobSeq - which can be really fun - a little ex-
tra care needs to be taken about keeping names unique. You will find good exam-
ples of how to do this safely in the GlobSeq Examples Pack . 


Do not add extra Capytalk or anything else to a Global Name definition



The first element in a GlobSeq row definition is only a name for the global created
by that row. You don't add any Capytalk there or anything else. There are also
some GlobSeq options which create globals, such as #counter and #gatesTick
and the same rules apply to those.
Totally Wrong:

!Glob_CutOff * 10 hz smoothed 100 300 500 800

17
Correct:

!Glob_CutOff 100 300 500 800

Remember you can always add extra Capytalk to a global in the field where you ac-
tually refer to it. In other words, the correct place to put the scaling and smoothing
in the above example could be in the frequency parameter field of some filter pro-
totypes. Just put !Glob_CutOff * 10 hz smoothed in the frequency of a filter
and it will be sequenced with initial values from the !glob_cutoff row but scaled
smoothly inside the filter prototype. This is the correct workflow method in every
case throughout Kyma when using SoundToGlobalController Classes. 


18
SoundToGlobalController
GlobSeq is a member of the special SoundToGlobalController Classes in Kyma,
which don't directly create audio themselves.


STGCs and Triggered STGCs are a powerful set of Classes in Kyma, and form the
basis for important design patterns in Capytalk programming. They generate glob-
al controllers from scripts or pasted sounds which appear as widgets in the VCS.
They can track and then emit as global controllers all manner of triggered or time
varying signals and scripted programs. They can be gated or continuously updated
every millisecond.


Its important that you understand how they work, especially when it comes to
avoiding naming conflicts with GlobSeq globals.
You can learn more about more about how to work with STGCs in Kyma by look-
ing them up in the standard Kyma prototypes and reading about them in Kyma X
Revealed.


19
GlobSeq General Usage
Detailed definitions can be found in Appendix A of this guide.
Valid Elements

1. A Fixed number
2. A !HotValue
3. A Capytalk expression in curlies
4. A Pasted Sound in curlies
5. A SubCollection (in main data row and #fills option)

Arbitrary Global Generated Events

#( !generatedName <value> <value> <value>....


#div <value>
#loop <value>
#glide <value>
#cc <value>
#freeze <value>
#euclid <value>
#gateType <value>
)

Arbitrary Global Generated Events - Drum Machine Mode

#( !generatedName <value> <value> <value>....


#gatesNN <value>
#gatesVel !VelEventName
#gatesTick !TickEventName
#fills <value> <value> <value>...
#gateType <value>
#div <value>
#loop <value>
#freeze <value>
#euclid <value>
)

20
Master Pitch Pattern

!generatedName <value> <value> <value>....


#div <value>
#loop <value>
#glide <value>
#euclid <value>
#freeze <value>
#gateType <value>

Master Gate Pattern

!generatedName <value> <value> <value>....


#div <value>
#loop <value>
#fills <value> <value> <value>...

You will find that the Master Gate Pattern has individual parameter fields in the
GlobSeq prototype for defining Length, LoopMode, Shift, Euclid, Freeze, Velocity-
Glide, TickEvent and GateType. These act as masters when you don't specify op-
tions for each row individually. 



Let's now take a look at the Master Gate Pattern to see why it is called Master.

21
Master Gate Pattern
The Master Gate Pattern in GlobSeq behaves and affects the behaviour of all the
other rows in a GlobSeq sequencer in quite an idiosyncratic way. It is inspired by
the many different approaches to monophonic step sequencers that have been
tried over the years.


The idea in GlobSeq is that the length of the Master Gate Pattern, as defined by
the number of elements it contains and the MasterLength parameter, defines an
overall cycle period for one GlobSeq instance. All patterns reset when the master
gate pattern resets. If sub patterns contain less elements than the Master Gate Pat-
tern, then they loop around themselves according to the master loop mode, or the
optional loop mode per row. This behaviour is different when a GlobSeq se-
quencer is in PolyMetric mode, but more about that later. 


Each element in the Master Gate Pattern is interpreted as a gate stage, meaning
in principle it is either on or off - a boolean Logic Value. When the value of a gate
stage is positive, then it is considered on and will generate a gate of the type speci-
fied in the MasterGateType parameter. This gates a MIDI event and an audio CV
event (if those features are active) and all the global event patterns will output their
current step values. 


What is special in GlobSeq is the behaviour when a gate stage is zero. 




This is interpreted as the gate stage being off. When a gate stage is off, rows step
and count but do not output a new value. Instead, they hold the last value that was
gated and if there is a glide time they will glide away from the last value. 


In practice, its a bit like the "Step Tie" feature found in some step sequencers but
more unique. The behaviour means you step the sequencer with a regular clock
without outputting values on every clock pulse from every row. Its more like a con-

22
ditional mask than a tie, and the polyrhythmic output can quickly become interest-
ing with this conditional holding. 


As mentioned earlier, there is the polymetric option in GlobSeq. If you set this to
true, the same gate logic conditional output occurs, but if pattern rows have differ-
ent lengths to the Master Gate Pattern, they will cycle according to their own length
- this is true polymetric sequencer behaviour. 


You do know the difference between polyrhythm and polymeter right? 


;)

23
Gate Velocity
Gate logic is all good and well, but the days of just On and Off are over. We can
get more information than the 1-bit state of a stage by treating it's positive value as
the 32-bit signal that it is. With respect to this, a GlobSeq sequencer can also
broadcast the value of each master gate stage using the optional GlobalGateVe-
locity global that you give a unique name to. The idea here is that the gate
stages are not on and off, but are more like an on signal with an amplitude, much
like in the modular synthesiser. And if a gate stage is on, then followed by some
stages are zero (off) then the GlobalGateVelocity will exhibit the same 'holding' be-
haviour described above, which is useful for holding a sample or mono synth note
between gate stages. A really special feature is the possibility of gliding between
held velocities smoothly using the VelocityGlide parameter.

Modulating Gate Stages


In more advanced sequencer applications, the gate stages could be fast changing
signals that may be updating much faster than the step rate. For example it may be
a collection of Capytalk LFOs at different rates per step. GlobSeq reads the ele-
ments of the Master Gate Patterns at maximum rate (every millisecond) so when it
encounters an element that is a fast signal changing signal this signal will be ex-
pressed both as the gate logic AND a fast modulation of the GlobalGateVelocity. It
is kind of a Kyma / GlobSeq concept and will take some experimentation, but if you
are already working with CV signals, VCAs and so on in your modular synth, it
hopefully makes sense. Oh, and if that is you, of course these hybrid gate / modu-
lation signals provide a good solution for making the most of Kyma's most scarce
resource - the 8 channel output limitation - as you can mult patch the one signal to
both a VCA and a Gate input on the modular side.


24
A Collection of Fast Scaled Modulators as Master Gate

!glob_gate
{1 to: 8 collect: [:i |
(1 repeatingTriangle: (i * 100 ms)) * (!gates suffix: i)
]}

You should use GateType 3 and a VelocityGlide widget to hear how the modulator/
gates interpolate into each other when you turn some stages off. It's pretty cool.
You could use this fast update feature to trigger little fades on fills or whatever you
can come up with.


More examples are available in the GlobSeq Examples Pack on the NeverEngine
Labs website.

25
Advanced Scripting Tutorial
To define the elements that constitute a sequenceable collection, it could be as
straight-forward as typing in a unique name for the global then a row of fixed nu-
meric values and nothing else.


!Glob_Note 61 64 68 51 54 57 59 65

Alternatively, the row might consist of a unique name for the global then a collec-
tion of dynamic values that will be set by faders or other widget types in the VCS
(Virtual Control Surface).


"generate 8 faders in the VCS called !pitch01 !pitch02 etc"


!Glob_Note { 1 to: 8 collect: [:i | !pitch suffix2: i ] }

As you can already see, programming GlobSeq will get you even more familiar
with Capytalk and Smalltalk scripting in general. Once you get a hang of scripting
in Kyma - which is really not as complicated as other systems - you will find that
scripting is a particularly fast and efficient way to define collections of values, or
collections of event expressions which you can then sequence through using Glob-
Seq. Additionally, GlobSeq features those extra scripting options of its own which
help you configure different types of sequencing behaviour and characteristics.

"Smalltalk/Capytalk combo creates 16 faders in the VCS which will move


smoothly when you change them. This row broadcasts its value as a
global called !Glob_cutoff. Options will generate a step counter
called !brightnessCounter and set the looping mode to be fixed as
ping-pong"

#( !Glob_cutoff
{1 to: 16 collect: [:i |
(!brightness suffix: i) smooth: !SmoothingTime ]
} #counter !brightnessCounter #loop 2

26
)

When you get tired of so many parameters to manually control in a sequencer, you
may start thinking about setting up probabilistic events or other algorithmic fea-
tures. GlobSeq is written in Kyma and Kyma can be one of the most powerful algo-
rithmic music systems if you want it to be. With GlobSeq you can easily design and
explore advanced generative sequencers. This is because you can use all of Kyma's
Capytalk runtime expressions and pre-runtime Smalltalk language to define ele-
ments and patterns and you can use Capytalk to control many of the GlobSeq op-
tions too.

"Smalltalk/Capytalk combo fills pattern of 32 gates with a Euclidean


distribution. Notice that only two widgets will be needed to change
the Euclidean algorithm during runtime. A four element array of retrig
fills will cycle within the 32, doing fills on every 3rd and 5th gate
if that stage is on according to the Euclidean algorithm"
!Glob_gate
{1 to: 32 collect: [:i |
i isOnForEuclideanBeats: !masterLength
pulses: !pulses
offset: 0 ]
}
#loop !GateLoopMode
#fills ( 0 0 1 0 2 )

Mind-bending rhythmic complexity can quickly emerge when you discover that el-
ements in patterns can control parameters from the same instance they are being
sequenced by. You need to do this properly to avoid feedback loops which might
crash the Pacarana. Use a special GlobSeq option called #gatesTick or the mas-
ter GeneratedEventTick1 to do this type of thing safely. They broadcast a 1ms
trigger global with the name you give it, whenever an element in the Master Gate
( using the GeneratedEventTick ) or a Drum Machine Mode Extra Pattern2 ( us-
ing #gatesTick) has a positive logic value. You can use these to trigger any type
of triggered Capytalk expression, such nextChaotic or nextRandom. You could

1
The master event tick has a few extra options #pre and #clock see inline help for details
2
see page 39 'Global Event Patterns: Drum Machine Mode'

27
even count it to build nested mini-sequencers, such as !snareTick in the follow-
ing example.

"#gatesTick of one `drum machine` type row affects the loopMode of the
other which in turn is sequencing the MIDI note number of the first
one"

#(!glob_kickGate
{!kickStage copies: 8}
#gatesNN {70+(!snareTick countTriggersMod: 8)}
#gatesTick !kickTick #counter !kickCounter
)
#(!glob_snareGate
{!snareStage copies: 8}
#gatesNN 60
#loop {!kickTick nextRandomElementOf: #(0 0 1 1 2)}
#gatesTick !snareTick
)

Read more about Drum Machine Mode rows on page 39 "Global Event Patterns:
Drum Machine Mode"

28
Appendix A

GlobSeq Optional Definitions


Inside the following code blocks you will find an example defining a fixed value
element, then a widget controllable one, then some examples which set values al-
gorithmically. Many more examples are available in the GlobSeq Examples Pack on
the NeverEngine Labs website.

29
Clock Divider

#div <value>
1 = step every pulse
2 = step every other pulse
3 = step every third pulse
etc
Examples:

"fixed value"
#div 4

"manual control"
#div !clockDivider

"algorithmic"
#div { !stepCounter * 2 }
#div { (!stepCounter eq: 1) nextRandomElementOf: #( 1 1 4 8 16 ) }

30
Loop Mode

#loop <value>
Defines the way the iterator loops when it reachs the end of the row
0 = cycle forwards
1 = cycle forwards and backwards
2 = jump chaotically
Examples:

#loop 2

#loop !loopMode

#loop { (!loopMode * 2) rounded }

#loop { (!stepCounter gt: 4) true: 2 false: 0}

31
Row Length

#len <value>
Shorten the end of a row using a percentage value.
0 = one element
0.5 = half of the row
1 = all of the row
Not used in a Master Gate Pattern definition.
Examples:

#len (5/8)

#len !rowLength

#len { !glob_tick nextRandom closestPowerOfTwo abs }

#len { !growLength smooth: 60 s }

32
Row Shift

#shift <value>
Offset the row iterator to the right.
0 = no shift
1 = one place
2 = two places etc
Not used in a Master Gate Pattern definition
Examples:

#shift ?voiceNumber

#shift !rowShift

#shift { !glob_tick nextRandom abs * 8 }

33
Freeze Row

#freeze <value>
When <value> is non-zero, output of this row is muted, but the iterator continues
to remember its progress. This is an easy way to do Elektron or Cirklon style step
muting. When option is not used, the row will get frozen by the master freeze.
Not used in MasterGatesPattern
Examples:

#freeze !freezeRow

#freeze { !crashTick stayOnFor: 10 s }

"50% probabilistic freeze"


#freeze { !snare_tick nextRandom sign }

"freeze on !freezeStage of the master counter"


#freeze { (!masterGateCounter eq: !FreezeStage) }

34
Glide

#glide <value>
Sets a glide time in seconds. This is not the same as normal Capytalk smoothing. It
is an exponential glide between the previous value that was output towards the
current one. Its behaviour definitely depends on #div and the [[Master Gate Pat-
tern]] logic which defines when a new element is read from the row, especially
when you are requesting longer glide times.
Not used in a Master Gate Pattern definition, use velocityGlide to glide gate ve-
locities
Examples:

#glide 0.05

#glide !glideTime

#glide {!glideTime roundTo: !bpm bpm s}

#glide {0.01 * !stepCounter}

35
Gate Retrigger Pattern

#fills <value><value><value>...
Only used in a Master Gate Pattern definition or Drum Machine Mode extra patterns
(see below)
A Collection of fast gate reTrigs for each step.


0 = no retrig
2 = 2xRetrig
3 = 4xRetrig
4 = 8xReTrig etc
Each element in the fills collection can be a number or a !hotValue or even a
Capytalk expression. If there are less elements in a #fills collection than there
are in the pattern row it is retriggering, it will cycle around its own length.
Examples:

"fill on every third step"


#fills ( 0 0 2 )

"a one element Array"


#fills ( !fills )

"build collection of widgets to manually set the fills"


#fills {1 to: 8 collect: [:i | !fills suffix: i ] }

"fills on every odd step of a counter"


#fills ( {(!stepCounter mod: 2) * !fills} )

"random fills every fourth step"


#fills ( 0 0 0 {!fills * (!glob_tick nextRandom abs * 4)} )

36
MIDI Controller Number

#cc <value>
Specifies the controller number to output the row's Global events to. The MIDI CC
value can be fixed or it can be a hotValue, so you could re-route the MIDI CC desti-
nation dynamically in realtime.
Only used in GlobalEventPatterns which are not in Drum Machine mode
Examples:

#cc 7

#cc !ccDestination

#cc {60 + (!glob_tick countTriggersMod: 2)}

37
Generate a Counter

#counter <generatedCounterName>
Generates a global that appears as a step counter widget in the VCS. You can also
use its value in different places when you want to do things according to what step
a particular row is on.
Remember, you cannot add any Capytalk to the name here and it must be com-
pletely unique.
Not used in MasterGatesPattern
Examples:

#counter !pitchesStepCounter

38
Global Event Patterns: Drum
Machine Mode

#gatesNN <value>
Normal GlobalEventPattern rows have arbitrary values and interact with the Master
Gate Pattern. The idea is that they are used more like controller automation for
events generated with the master rows. But perhaps you want to have more rows
that emit gate like events, without having to create another instance of GlobSeq
and fill in all the parameter fields again.
Drum machine mode is the solution to this. It basically lets you build a hybrid
drum machine and control sequencer with multiple voices in the GlobalEventPat-
tern rows. This drum machine could exist alongside some bass line notes con-
trolled by the master gate and master pitch rows - all in the same instance of one
globSeq - this is a very useful and efficient feature, and although it might not make
sense as you read this now, it will when you need it (hopefully).
If you define your row as usual !aPercEvent 1 0 0 1 0 0 0.9 0 but add
the #gatesNN option followed by a number, then the pattern gets interpreted as a
row of gates. The gates will ignore the MasterGatePattern logic, and emit their gate
velocity to the global you have defined for use in the Kyma signal graph, and also
to one fixed note number via MIDI for hitting external systems. The appearance of
#gatesNN in a row definition also means you can work with the #gates family of
options listed below.


The idea is that you might want to create a type of drum machine style step se-
quencer, with many different rows of gates, all firing on different globals , and dif-
ferent MIDI notes but on the same MIDI channel. When MIDI output is active, each
row will send to the note number that accompanies its #gatesNN and it will send
the gate logic (gate on, gate held) as gate velocity via that note and via its !glob-
alEventName of course.


39

MIDI from Drum Machine rows is sent to the next channel up from the current
global MIDIChannel you have specified in this GlobSeq instance. That is so you can
define Drum Machine type rows within the same GlobSeq instance which is also
broadcasting master gates and pitches (using the master rows) and perhaps other
types of arbitrary global rows, on a different MIDI Channel.


Drum machine mode will ignore the gate logic of the Master Gate Pattern because
they have their own gates, but they do still obey MasterLength and MasterLoop-
Mode unless you give them individual globSeq options (#len #loop or #shift). They
will also cycle as polymetric rows or not, depending on the master setting of the
Polymetric flag.
Only used in GlobalEventPatterns


Examples:

!kickGate 1 0 0 0 1 0 0 0 #gatesNN 60 #counter !kickCounter


!snareGate 0 0 1 0 #gatesNN 61 #counter !snareCounter

"The NN could be a hotValue"


!kickGate 1 0 0 0 1 0 0 0 #gatesNN !KickNN

"shortcut that automatically maps each row you define starting from
60nn"
#gatesNN 0

"sequence the gatesNN number using the master pitches row and trig the
same gate pattern over different samples of your MPC"
!mpc_hits 0 0 0 1 0.5 0.2 0.1 0 #gatesNN {!Gen_Pitch rounded}

40
Gate Velocity

#gatesVel <GeneratedEventName>
Choose a unique event name that will broadcast the current value of the gate in a
drum machine type row. Remember, you cannot add any Capytalk here and it must
be completely unique.
Only used in GlobalEventPatterns in Drum Machine Mode
Examples:

#gatesVel !glob_kickVelocity

41
Gate Tick Event

#gatesTick <GeneratedEventName>
Choose a unique event name that will emit a 1ms tick whenever a gate in a drum
machine type row has a non-zero value. Unlike the master GeneratedTick parame-
ter this row specific one is always in #pre mode meaning it is emitted even when
the row is frozen.


Remember, you cannot add any Capytalk here and it must be completely unique.
Only used in GlobalEventPatterns
Examples:

#gatesTick !kickTick

42
Gate Fills

#fills <value><value><value>...
A Collection of fast gate reTrigs for each step of a drum machine type row. Each
element in the fills collection can be a number or a !hotValue or even a Capytalk
expression. If there are less elements in a #fills collection than there are in the
pattern row it is retriggering, it will cycle around its own length.
Examples:

"fill on every third step"


#fills ( 0 0 2 )

"a one element Array"


#fills ( !snareFills )

"build collection of widgets to manually set the fills"


#fills {1 to: 8 collect: [:i | !snarefills suffix: i ] }

"fills triggered by the tick of another row"


#fills ( {!kickTick * 4} )

"bpm syncd decaying ramp of retrigs triggered by other row"


#fills ( {!crashTick ramp00: !bpm bpm s} * 4 )

43
Row Gate Type

#gateType <value>
Assign a row to have a gate output type independently of the master gate type.

_Type 1:_
10 ms positive pulse with no voice stealing reads from drum machine
row whenever its gate stage is non-zero
_Type 2:_
Short Kyma voice stealing gate reads from row drum machine row
whenever its gate stage is non-zero
_Type 3:_
Voice stealing holding gate. Remains positive and does not output its
row values until the next non-zero stage occurs in the row gate
sequence.
_Type 4:_
Outputs every step regardless of the row gate stage logic.

Not used in MasterGatesPattern row, use the MasterGateType parameter field in-
stead
Examples:

#gateType 4

#gateType !hiHatGatetype

"kind of choke effect by alternating between gate type 2 and 3 on


every other step"
#gateType { (!hihatCounter mod: 2) + 2 }

44
CV Options
Only used in the CVOptions parameter field, and only working when OutputCV is
set to true.

#outV <value>
<value> should be an integer from 1 - 8 corresponding to a Kyma output.
Selects the audio output channel you want the voltage relating to the Master
Gate row and its the current velocity of the stage if it is more than 0. You can
smooth it using the VelocityGlide function.
As well as a Gate Velocity value, you may want to use it to modulate any CV in-
put. If you want to use it as both an voltage amplitude and a gate, then Mult it and
send it to a gate input and a VCA at the same time.
Examples:

#outV 7
#outV !VoltageOutput
"route the gates vel signal to a different Module every master tick"
#outV { (!MasterTick nextIndexMod: 3) of: #(1 3 5 7) }

#outP <value>
<value> should be an integer from 1 - 8 corresponding to a Kyma output.
Selects the audio output channel you want the voltage relating to the Master
Pitch row. Changes character according to #pitch and #range options listed below.
Examples:

#outP 7
#outP !VtoOctOutput
"route the pitches signal to a different oscillator every master tick"
#outP { (!MasterTick nextIndexMod: 3) of: #( 2 4 6 8) }

45
#pitch #range <value>
If you do not put #pitch anywhere in the CVOptions field, then #outP sends a clock
signal.
But if you do use #pitch then you can use #range to create a Volt to Octave map-
ping that may match oscillator modules that have V/Oct inputs in your Eurorack. A
value of 10 seems to fit some well but others not so well. You can explore weird
scales and tunings by altering or changing this value with a widget or some
Capytalk.
Examples:

#pitch #range 10 #outP 7 #outV 8

#outP 7 #outV 8 #pitch #range !VtoOctRange

#outP 7 #outV 8 #pitch #range {(1 repeatingTriangle: 30 s) * 10}

46
Appendix B

Debugging Tips
Most of the problems you might encounter will be down to syntax errors in your
scripting. So don't panic. Kyma is not the kindest development environment when
it comes to syntax errors - probably because its not really supposed to be used as a
hardcore development environment for building apps and things.


One of the rather unpleasant things the interpreter does if you have forgotten to
match parenthesis, or put in too many or too little or pressed enter too soon, is in-
sert error messages directly into your nice script. This is quite a crude way for the
interpreter to inform you that you have made a mistake because it will make your
program even more prone to syntax errors, when you have to delete the error out-
put carefully from your script which this can be tricky and messy. So watch our for
that.


Best practice is to use ALT-TAB to indent your code, and return to make new
lines. Your script will be much easier to debug. Kyma doesn't mind if there's lots of
space and carriage returns and ignores comments enclosed in double quotation
marks. GlobSeq doesn't mind in what order it's options appear but they MUST be
added after the row of elements like this:

!root_note "it is ok to add comments here"


60 62 59 58 66
#div 16 #loop 2 #glide 10
#counter !rootNoteCounter

GlobSeq does have a basic error catching system programmed into it too which
could catch some syntax errors related to its own options syntax. This could help if
you forget to add a value it was expecting, or you are not doing something right
with a Collection declaration. If it catches an exception, GlobSeq will actually try to

47
give you some clues about where the problem might be. In some cases the Se-
quencer is compiling and running but things are not happening as you expected -
welcome to the world of debugging! 


PS. If you are desperate you can always come by the NeverEngine Labs Slack
Channels and we will try to help. neverenginelabs.slack.com
PPS. If you don't want to do any debugging at all, get the GlobSeq Examples
Pack from the NeverEngine Labs website and just tweak whats there.

Golden rules in GlobSeq

First element MUST be the generated name that


row will generate.

The generated name MUST be unique


GlobSeq contains many SoundToGlobalController Classes so it inherits the same
principles. Read up on them in Kyma X Revealed p.255 onwards or study the
SoundToGlobalController Classes in the Kyma 7 prototypes library.

Declaring Collections
In the GlobalExtraPatterns field which is actually a Collection of Collections, you
need to enclose each row definition in a #( ) or GlobSeq doesn't know when a
row begins or ends.

Correct:

#( !glob_cutoff
800 900 1000 300 200 100
#glide 0.1
#counter !cutoffCounter
#cc 68 #len !cutoffLen
)
#( !cutoffLen 1 0.75 0.5 0.25 #div 8)

48
Wrong:

!glob_cutoff 800 900 1000 300 200 100


#glide 0.1
#counter !cutoffCounter
#cc 68
!cutoffLen 1 0.75 0.5 0.25 #div 8

In the Master Gate and Pitches fields you don't need any extra curly brackets or
hashes, because they represent only one Collection.


But do get the order right.


Global name first, then the row, then the options.

Correct:

!glob_gate 1 0 0 0 1 0 0 0 #div !gatesDiv

Totally Wrong:

1 0 0 0 1 0 0 0 div !gatesDiv

Like everywhere else in Kyma , when you want to use Capytalk inside a Collection
you have to enclose expressions in curlies.

Correct:

#( !glob_cutoff
800 900 {3000 * (1 repeatingTriangle: 20 s)}
#glide 0.1
#counter !cutoffCounter
#cc 68 #len !cutoffLen
#shift {8 - (!cutOffLen * 8)}
)
#( !cutoffLen 1 0.75 0.5 0.25 #div 8)

49
Smalltalk Syntax

Correct:

!glob_pitch
{
1 to: 64 collect: [:p |
p ofEuclideanScaleSteps: 8
octaves: 2 mode: 0 stepsPerOctave: 12
]
}
#div !pitchDiv #loop !pitchLoopMode
#counter !pitchRowCounter

Ok, I've exaggerated the spacing out a bit, but....


Notice how the entire Smalltalk Collection building block is in Curly brackets and
/after/ the Global Event Name.
See how the block variable ( 'p' in this example ) has a colon BEFORE it and a
PIPE after it.
See how you need to match your parentheses carefully.

Check out how the GlobSeq options come after the Smalltalk code.
Here's a cool pure Smalltalk example:

#( !glob_panpos
{ (0 to: 1 by: (1/31)) asArray }
#counter !panPosCounter
)

Generates 32 pan positions between 0 and 1 which you could then sequence
through in different ways.
I learned that trick from a Smalltalk cheat sheet that someone made once. Here it
is http://www.angelfire.com/tx4/cus/notes/Smalltalk.html

Good luck and enjoy the ride!

50
Appendix C

Class Parameter Descriptions


Here is a copy of the parameter descriptions in alphabetical order. The descrip-
tions are the same that you will find as inline help when you hover your mouse over
any parameter field in the GlobSeq Class inside Kyma. 


BPM
Master beats per minute frequency for the internal pulse train clock.
If UseExternalStepInput is set to true then this parameter is ignored. !BPM will be
defined in your external step clock in that case.
Cost
This choice downsamples the master clock data internally.
1 = best timing and accuracy. Most DSP heavy.
2 = default
3 = more efficient maybe a little loose on the timing
4 = most efficient but quite sloppy timing
Cost of 3 or 4 might save the day when asking for lots of replications.
CVoptions
When OutputCV is active, here is a list of options you can specify.
Example: #pitch #range 9 #outV 7 #outP 8

#outV <value>:
Range from 1 to 8, fixed or hot.
The output to send gates with velocity as an audiorate signal to
control analogue gear

#outP <value>:
Range from 1 to 8, fixed or hot.
The output to send audiorate pitch information as a voltage signal.

51
#pitch :
Will send audiorate pitch information to the #outP route. If you omit
this option, a step clock will be sent instead to #outP

#range <value>
By default ( if you omit this option) the V/Oct range is set to 10.
You can put a !HotValue or other values here higher than 1 to explore
microtuning or try to find a better setting for your oscillator.

Enable
Leave this set to true in normal use. For debugging purposes.
ExternalStepInput
You can use an external audio signal to step through the patterns. It can be a pulse
generator type clock, or any cycling oscillator, phase generator or audio input.
With a low frequency oscillator or (warped) ramp as step input, you can experi-
ment with groove patterns in an interesting way. Important: See info about 'Exter-
nalStepType' below.
ExternalStepType
If you are using a Pulse Train or sync signal from other hardware, the width of the
pulse should be more than 2 ms to trigger steps correctly. Set ExternalStepType to
be 0.
ExternalStepType set to any number other than 0, will implement a trigger ex-
traction algorithm that will allow you to work with audio signals other than pulses,
such as linear ramps cycling at !BPM rate. With a low frequency oscillator or
(warped) ramp as step input, you can experiment with morphing groove patterns
as the algorithm extracts triggers for the sequencer in different ways.
GeneratedMasterCounter
The name of a step counter event which yields the number of the current master
gate stage.
If you don't want to generate a global counter for the Gates then you can just
leave this field blank.
As with all Global Event generators, this is name of a widget will will be algorith-
mically generated. It is declared like this - !GeneratedName
Do not put any extra Capytalk

52
Remember - the Global Event Name must be unique. Be very careful not to be
generating more than one generated event with the same name anywhere else in
your Kyma signal graph.
GeneratedMasterGateVelocity
The name of the GlobalEvent that will hold the gate velocity value when the gates
stage is not zero. You can use it globally as a velocity or level or anything else real-
ly. It is full resolution, so it can track signals that change faster than the clock is step-
ping, like an LFO.
Remember! No extra Capytalk here - only the name for the GlobalEvent
The name MUST be unique, be very careful not to be generating more than one
generated event with the same name in your Kyma signal graph.
TIP: If you don't need to generate a gateVelocity global then leave this field
blank
GeneratedTick
The name of a GlobalEvent that will generate a 1ms tick derived from the On/Off
state of the Master Gate row with a couple of options. Remember a gate element
that has any value above zero is treated as being On.
You need EventTick when you want to get complex and trigger things like ran-
dom conditions or your own counters inside the same GlobSeq instance. It is advis-
able to use this event instead of the generated !Gate from the GlobalGatePattern.
This is because, that is a gate with voice stealing and fills, and will confuse some-
thing that needs a trigger.
Use this global within other definitions of the same GlobSeq instance and/or any
where else in your sound. Its a kind of 'call back' event which is useful and has
some options too. By default, with no options, it ticks when ever the gate stage log-
ic is true ( not zero ) and is muted by !Freeze.

GeneratedTick Options:
!GeneratedEventTick #pre
* ignore !Freeze so, you can mute gates without muting other tick
events.

!GeneratedEventTick #clock
* tick on every step regardless of gates stage logic

53
TIP #1: You can rely on this GenereratedEventTick not to crash the Pacarana when
you try to wire GlobSeq gate events into their own row definitions (which can cause
internal feedback loops).
TIP #2: If you don't want to generate an EventTick global then leave this field
blank.
Remember! No extra Capytalk here - only the name for the GlobalEvent
The name MUST be unique, be very careful not to be generating more than one
generated event with the same name in your Kyma signal graph.
GlobalEventPatterns
Use this field to specify sequence patterns for arbitrary generated global EventVal-
ues.
Each pattern row will have its own independent cycle length according to its
number of elements (be sure to look at the PolyMetric check box too)
If you don't need to generate any Extra Global Events you can leave this field
blank.

The basic syntax:


#( !globalEventName
<value> <value> <value>....
#div <value>
#loop <value>
#euclid <value>
#glide <value>
#cc <value>
#len <value>
#shift <value>
#counter !GeneratedCounterName
#gatesNN <MIDInn>
#gatesVel !GeneratedVelName #fills <value> <value> <value>....
#gatesTick !GeneratedTickName
#freeze <value>
#gateTye <value>
)

The first element must ALWAYS be a UNIQUE name of the global event that will be
generated. No extra maths or Capyytalk messages can be sent to it.
It must be on its own. Everything after it is the data to be sequenced followed by
any optional grammar.

54
In this field as in all Capytalk Arrays parameter fields, you must enclose expres-
sions within curly braces.

GlobalEventPatterns : Drum Machine Mode

Adding a #gatesNN option turns a normal GlobalEventPatterns row into a row


that will be interpreted as gate. Now you can specify a #fills array, a MIDI note des-
tination, a gate type, a tick event (fixed to #pre) and a generated gate velocity
event for each separate row you define.
TIP: #gatesNN mode sends to the current MIDIChannel + 1 , so you can mix
bass-line and drums on the same synth for example.
Some Examples:

#(!Pan
{0.5 - !PanSpread} {0.5 + !PanSpread}
#div 4
#glide { !panGlide smooth: 3 s }
)

Four fixed values updating every four clock steps with glide and a counter.

#(!Morph
0 0.25 1 0.125
#div 4
#glide 0.2
#counter !MorphStep
)

A Smalltalk expression expands into 8 independent hotValues with a fixed glide


value hot divider and counter that also sends to midi CC pan and outputs every
step regardless of Master Gate logic

#(!CutOff
{1 to: 8 collect: [:p | !CutOff suffix: p] }
#glide 0.2
#div !CutOffClockDiv
#counter !CutOffStep
#cc 10 #gateType 4
)

Euclid Drum Machine Mode with its own freeze

55
#( !PercGates 1 0 0 1 0.5 0 0.75 0 1 0 1 1 0.2 0.5 0 0
#gatesNN 60 #gatesVel !PercVel #gatesTick !PercTick #euclid !
PercEuclid #div !PercDiv #freeze !PercFreeze
)

TIP: Read the user guide for more examples!


MasterEuclideanSteps
Any integer value above 0 will start to hold then skip steps in the Master Gate row,
according to an integrated Euclidean dsitribution algorithm. Great for sequence
step variations that are neither random nor masked.
MasterFreeze
Freeze will freeze the output of all counting sequencers, whilst continuing to count
them internally. This is a cool performance feature, as when you unfreeze with any
value above 0, the sequencers will drop back in perfectly in time.
TIP: Each row can have its own independent freeze using the #freeze option
MasterGatePattern
A collection of hot values or numbers that will be interpreted as the main Gate
stages of the sequencer. Think of it as the master pattern which controls when all
the other patterns update their state or will hold their state.
When the value of a Gate stage is 0 (off) then new values will NOT be output
from the other pattern sequences, instead they will be held. Any value greater than
zero will be interpreted as the Gate stage being active. It will transmit its non-zero
value as a !gateVelocity global event using the GeneratedNameGateVelocity name
you specify.
This behaviour means that a gate can be held between active stages, through
some off stages which means patterns update their states internally as the step
changes, but do not output their values. This can be great for triggering phrases
that need some time to be heard or looped samples with sustain and more. It is
also what gives all the complex 'masking' interactions between patterns of differ-
ent lengths, characteristic of the NEL GlobSeq. See 'GateType' below to for more
options.
SYNTAX:
The first entry MUST be a UNIQUE hotValue ( do not try to perform any Capytalk
on it here ).

56
It will be used as the name for the global event generated by the gate.
Everything after that first entry, is the pattern data followed by any GlobSeq op-
tions.
The Gates field ONLY accepts #div #loop and #fills -- its length and shift are con-
trolled by the !MasterLength and !MasterShift parameters.
EXAMPLES:

!Gate {1 to: 8 collect: [:i | !Gates suffix2: i]} #div !GatesDiv #loop
!GatesLoopMode

As in all Kyma arrays Smalltalk/Capytalk expressions must be in curlies.

!Gate 1 0 { !bpm bpm tick nextRandom abs closestIntegerWithHysteresis:


0.2} 0 1

FILLS: You can add a #fills retrig array

!Gate {1 to: 8 collect: [:i | !Gates suffix2: i]}


#fills {1 to: 8 collect: [:i | !Fill suffix2: i]}
#div !GateClockDiv

Use ALT-Tab for indents to make your code more readable.

!Gate
1 0 1 0 1 1 0 1
#div !gatesDiv
#loop !GatesLoopMode
#fills (4 3 2 {!Glob_tick nextChaotic7 * 4} )

MasterGateType
Defines three different flavours of generated events.

Type 1:
10 ms positive pulse with no voice stealing reads from row whenever
Master Gate stage is non-zero
Type 2:
Short Kyma voice stealing gate reads from row when Master Gate stage
is non-zero
Type 3:

57
Voice stealing holding gate. Remains positive and does not output its
row values until the next non-zero stage occurs in the Master Gate
sequence.
Type 4:
Outputs every step regardless of the Master Gate stage logic.

"##### Kyma Voice Stealing Gates drop to -1 for 5 ms to allow


currently active envelopes to rapidly fade out without click ########"

TIP: Type 3 is great for holding a loop on a sample, or 'tie' events where sustaining
a long gate time over empty stages is preferred.
TIP: Each GlobalEventType can have an independent gate type from the master
gate type using #gateType option
MasterLength
An integer number which defines the loop length of the Master Gate pattern. If in-
ternal patterns are shorter than this value, they loop according to their loop mode
and #len value until patternLength is reached, where they will reset their counting.
TIP: To get full polymetric behaviour set polyMetric to True - in that case, the
master loop length will only limit the Gates pattern row, but other rows loop inde-
pendently according to their own lengths.
MasterPitchPattern
The collection that represents Pitch information that is sent via MIDI and broadcast
globally using the global event name you choose. Usually the values are note num-
ber if you are outputting MIDI, but really the pattern row could contain any kinds of
values, like a !Rate for example.
The first element must ALWAYS be a UNIQUE name of the global event that will
be generated.
No extra maths or Capytalk messages can be sent to it. It must be on its own.
Everything after it is the data to be sequenced with any GlobSeq options.

MasterPitchPattern options:
#div <value>
#loop <value>
#glide <value>
#counter <!GeneratedCounterName>
#euclid <value>

58
In this field as in all Capytalk Arrays parameter fields, you must enclose expressions
within curly braces.

Example 1 - rate sequencer for sample players with counter and


Euclidean step
!Rate
{ 1 to: 8 collect: [:i | !Rates suffix2: i]}
#div !ratesDiv #euclid !rateEucStep
#loop !RatesLoopMode
#glide !ratesGlide
#counter !ratesStepCounter

Example 2 - upwards arpeggiator with counter:


!GenPitch
{ (40 to: 56) asArray }
#div !pitchDiv
#loop !pitchLoopMode
#glide !pitchGlide
#len !pitchRowLength
#shift !pitchRowShift
#counter !pitchStepCounter

TIP: @CharlieNorton noticed that when using GlobSeq in Timeline or Multigrid,


you'll have to manually make sure that the generated name is completely different
to any other instance of GlobSeq in the Grid or Timeline. So call it a different name
in a new instance , such as !GenPitchA !GenPitchB
TIP: If you don't need to create Pitch data you can leave this field blank.
MasterShift
Shift the Gates pattern row by integer number of steps
MasterVelocityGlide
Like glide for pitch, except it will smooth and interpolate the values between each
active master gate stage over this timeConstant. It can make the velocity informa-
tion be very smooth, great for CV. See manual for examples. 


59
MIDIChannel
This is the MIDI channel that note and CC event information will be sent on.
Leave it empty if you do not need to output MIDI.
TIP: This field can be a !hotValue too, for dynamic MIDI channel routing
OutputCV
If true, the you activate the Control Voltage audio features of this GlobSeq in-
stance, allowing you to send gates, gate Velocity, pitch or clock as voltage control
signals through two channels of a DC coupled audio interface or on an Expert-
Sleepers ADAT Eurorack module.
See CVOptions to find out more about how to configure further options.
Be aware that switching this to true will send raw control voltage from the audio
outputs - watch your speakers!
PolyMetric
When PolyMetric is checked, all rows have independent loop lengths defined by
their number of elements and #len value. This means they loop regardless of the !
MasterLength gates value.
When PolyMetric is unchecked, all rows restart when the !MasterLength is
reached regardless of their length.
RateScale
When running on internal step clock, this value scales the master BPM rate.
It is quantised to only change on a beat pulse.
So when set to 1, the sequencer runs at !BPM rate, and when set to 2, twice as
fast.
Reset
Resets counting and clocks when not zero
Reverse
Reverses the step index.
Run
Runs and restarts the internal master clock - use Freeze to pause.
Seed
A seed between 0 and 1 for the chaotic step generators

60
SlowMidi
Slows down MIDI information to 31.25baud the original MIDI speed for possibly
better response from older gear
StealthMode
When in stealthMode, all generated events are still generated, but they do not ap-
pear in the VCS.
TIP: Any generated counters will not be hidden in Stealth mode, you can hide
any you don't need manually in the VCS
UseExternalStepInput
Use external step input. Will bypass BPM, RUN and RESET which relate to the inter-
nal pulse generator. I suggest moving these parameters to be expressed somehow
in the external step generator.
!RateScale DOES remain active and will affect the threshold sensitivity to external
input signals when ExternalStepType is set to 1, which implements the trigger ex-
traction algorithm.
Additionally !Run lets the external clock through or mutes it when in external
clock mode.

61

You might also like