Graphical Module : Sequencer interface example:
Filter:
GraphicalModule/Guides (extension) | GUI > Graphical Module

Graphical Module : Sequencer interface example
ExtensionExtension

A documented example of a graphical sequencer interface using the Graphical Module

Introduction

This guide documents the process of using the Graphical Module (GM) to build an interface that controls a sequencer. Its purpose is to illustrate how to setup GM classes with a concrete example. It can also be used as a copy-paste template to build other synths interfaces.

The full example code is located at the end of this guide.

Sequencer interface classes

Several GM classes have unified methods designed to build a visual sequencer. In this example, a conjonction of GMListPianoRoll, GMDuoSequencer and GMFaderMultiSlider is used to control a looping pattern.

Those classes all manipulates an array of datas, in which every index corresponds to a particular beat. Similarly, they all implement an highlights method that allows to visually identify strong beats if needed.

Setting up datas

In this example, the number of beats is defined by the length of the highlight array defined in the first lines of code :

One can simply reduce its size to change the number of beats :

The size of the array is then used to fill other arrays with default values for each parameter the synth takes :

Later on, when widgets are created, they will be configured to manipulate those arrays :

Implementing the Routine

Now that datas placeholders are accessible through the graphical interface, one can implement a Routine that will loop through those arrays, playing the required synth with the corresponding datas. Once the synth has been played, and the beat incremented, every widget is updated using the beat method :

Code