Skip to content


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:

tracks {


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

var inst1 = autoDesigner({ name : "Phat Sound", type : "synth" });

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 autoDesigner.

Finally, we include an object as the input parameter, specifying a couple options. name and type are compulsory.

  • The name must have at least one character that is not a space or a line-break
  • The type can be any of the following: "bass", "lead", "pad", or "synth"

Providing Requirements For An AutoDesigner

The autoDesigner has several aspects that can be targetted by our list of requirements:

  • pitchBend controls the degree to which the pitch bends during a musical note
  • vibrato controls the degree to which the pitch cycles up and down during a musical note
  • tremolo controls the degree to which the volume shifts up and down during a musical note
  • modulation controls the degree to which a modulation effect (such as flange or chorus) is applied
  • filterSweep controls the degree to which a sweeping filter effect is applied
  • distortion controls 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:

    pitchBend : 0.2,
    tremolo : 0.7

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 0.0 and 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

var inst1 = autoDesigner({ name : "Phat Bass", type : "bass" });{ distortion : 0.8, pitchBend : 0.3 });


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

var result = inst1.totalLayers;


The type property can be used to find out the data-type of a particular autoDesigner. The result will always be "autoDesigner"

var result = inst1.type;


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

1{ tremolo : 0.2, vibrato : 0.5 });

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.

var layer1 = inst1.getLayer(0);