The autoDesigner is a tool for automatically designing the tonal qualities of digital instruments. It can only be used inside the
tracks code block. Here is what an empty
tracks code block looks like:
1 2 3
The way that the autoDesigner works, is that you provide a list of requirements, as an input parameter. Then the autoDesigner will design an instrument randomly that meets those requirements. Every time your code runs, it will create a slightly different sound, but always one that meets your requirements.
If you would prefer to design an instrument manually, check out the soundDesigner tool
Creating An AutoDesigner
We start with the
var keyword, which lets Modulo1 know that we're creating a new variable, and we follow this with a valid variable name (we've chosen
inst1 in this example) that we will use in our code to identify this
autoDesigner. Be aware that the variable name of
inst1 has a different purpose to the instrument name of
"Phat Sound". The variable name is only used in our code, and the instrument name will be used later, when Modulo1 runs our code and creates the digital instrument.
We put an
= symbol after
inst1, followed by the name of our tool: the
Finally, we include an object as the input parameter, specifying a couple options.
type are compulsory.
namemust have at least one character that is not a space or a line-break
typecan be any of the following:
Providing Requirements For An AutoDesigner
The autoDesigner has several aspects that can be targetted by our list of requirements:
pitchBendcontrols the degree to which the pitch bends during a musical note
vibratocontrols the degree to which the pitch cycles up and down during a musical note
tremolocontrols the degree to which the volume shifts up and down during a musical note
modulationcontrols the degree to which a modulation effect (such as flange or chorus) is applied
filterSweepcontrols the degree to which a sweeping filter effect is applied
distortioncontrols the degree to which a distortion effect is applied
We can choose to specify all six requirements, or we can choose to provide less than six:
1 2 3 4
In this example, we start by typing out the variable name of our autoDesigner, which is
inst1 in this case. Then we specify that we're going to use the
design() function by passing it a list of options. Each option that we specify must have a numerical value between
1.0. If we want a greater degree of that aspect, then we would use a higher number. Conversely, if we want a lower degree of that aspect, then we would use a lower number. If we choose not the specify a particular requirement, then a default setting will be used instead.
Putting it all together
A property is a special feature of a variable that can be used to get and/or set some aspect of that variable.
The totalLayers property can be used to find out how many soundLayers exist within a particular autoDesigner
The type property can be used to find out the data-type of a particular autoDesigner. The result will always be
design( object requirements
The design function allows an object containing a list of requirements to be passed to the autoDesigner, which will then design a digital instrument based on those requirements
getLayerX( number x
The getLayerX function allows you to retrieve one of the soundLayers from within the autoDesigner, by specifying its numerical index. The first soundLayer will have an index of
0, the second soundLayer will have an index of
1, and so on.