Making a step sequencer using Max4Live

    As always, before the practical part, a small overview of the upcoming work. To generate a melody using step sequencers, you need to set three things: rhythm, numbers and note duration. Usually, all this is set using a single matrix interface:

    Sequencer grid

    Here, the length of the note depends on the tempo and conditionally equals one step, and the rhythm and tonality are set simultaneously. But this is not our way. We will create our own small sequencer for each of the parameters.

    Rhythm sequencer


    Let's start with the rhythm. It is from him that the triggers for the other sequencers will come. So, let's create the Max MIDI effect and add the following objects to the new patch: multislider , counter and metro and connect everything as shown in the figure (rhythm1.amxd) :

    rhythm1

    I think you can figure out how everything works by the comments. We move on. It is necessary to visually display the current position of the sequence. The slider object (rhythm2.amxd) will help us with this :

    rhythm2

    At first glance, it may not be clear why the slider range is 0 ... 17 , and not 0 ... 16. The fact is that our rhythm is presented in the form of rectangles, and the slider is a strip that should coincide with the left edge of each rectangle. If the slider has a range of 0 ... 16 , the strip shift will be noticeable, that is, the sequence position is not displayed correctly.

    It remains to make convenient control over the boundaries of the sequence, for which we will use the rslider object . It looks like a regular slider, only sets the range. He has two outlets: the left one displays the minimum value, and the right maximum (rhythm3.amxd) :

    rhythm3

    Sequencer ringtones


    A sequence of notes will be clogged into it. Let's create 16 live.numbox objects - this is an analog of Max's number object , it only has the appearance of native live interface elements, as well as some other goodies (about which later). So, we collect the following scheme (melody1.amxd):

    melody1

    I commented out the patch to the maximum to make it easier to understand, so I think there is no need to thoroughly describe the work. If you have questions, then ask them in the comments.

    Note length sequencer


    This sequencer is no different from the previous one, only instead of notes, live.numbox will set the length of notes in milliseconds in the range 0 ... 1000 (length1.amxd) :

    length1

    Putting it all together and creating MIDI messages


    So now we connect all this (mainseq.amxd) :

    mainseq

    By default, standard gui max objects do not retain their state with a live session, unlike gui live. * Objects , which is why pattr objects are connected to some interface elements .

    That’s almost all. It remains only to enter all the elements of the patch into the small space of the live device. To do this, select all the interface objects, right-click and click Add to presentation. Now you can turn on the presentation mode, where we arrange everything as conveniently. Here's what I got (step-seq-pattr.amxd) :

    step-seq-pattr

    Yes, there you go. When adding this patch to live, it opened in presentation mode, you need to open the patcher inspector by right-clicking on an empty spot in the patch and ticking the “open in presentation” checkbox.

    In the end


    For completeness, this sequencer lacks velocity control, but it can be easily finished using the same multislider. It would also be nice to add a reset button to the initial position.

    That's all, happy patching :)



    Archive with patches:
    pattr.ru/sites/default/files/pattr_seq-m4l.zip

    Also popular now: