Friday, February 17, 2017

Recording generated MIDI to drag'n'drop object in Kontakt

Someone asked me to add MIDI drag'n'drop function to Rhythm Assembler sequencer. Apparently, in some DAWs recording MIDI notes generated by Kontakt is not quite trouble free. While adding this function to Rhythm Assembler would be a bit of a hassle, I thought, that capturing generated notes live and making the recording a drag'n'drop object inside Kontakt would be quite easy.

So, here's this simple script named "MIDI catch'n'drop". It will memorize all note on/note off messages (both send into Kontakt and those generated by instrument scripts) and write them into a drag'n'drop MIDI object. Suppose, you want to export a drum pattern from Kontakt instrument to MIDI. You load the instrument, put the catch'n'drop into empty script slot, press "start recording" button, start the drum sequencer, wait for the pattern to play through and then drag'n'drop midi pattern to your DAW or file system.

Some notes:
When you press "start recording" button, previous recording is deleted.
The script will only record notes generated by the instrument it's placed into and by scripts placed in previous script slots. So, it's best to place it in the last script slot.
Essentially this script is thought to help with instruments, which do not use MIDI object functionality. Instruments which actually use MIDI data, may have drag'n'drop function already available. Also note, that whenever you start recording in catch'n'drop script, it clears MIDI buffer in Kontakt. So, if the instrument is using MIDI object for note patterns, it will not play back anything, as the MIDI pattern will be deleted.
This script only records note on/note off messages.
While recording, the script will display buffer status and time of recording. Buffer defines how many notes you can record. When it goes to zero, the recording will stop and script will display message "buffer is full". Default buffer setting is 10000, so the script can record up to 5000 notes (two messages per note). You can rise buffer size in the script, changing $MIDI_BUFFER_SIZE, up to one million. Time is displayed in MIDI ticks (960 ticks per quarter note here).
If you plan to create a file, rather than dropping pattern straight into a DAW, you can change generated file name. Just double click "file_name" and enter new name. Note that it may not be possible while sequencer is running (it's Kontakt's "feature").

You can get the script here:
as preset file
or in plain text

Use at your own risk! This script is provided ‘as is’ and there is no warranty of any kind.

Sunday, January 22, 2017

Rhythm Assembler

And now something completely different... A step sequencer.

Well, it really is a bit different. Rhythm Assembler is a drum computer script I wrote for Kontakt, remains of a cancelled project. Usually a step sequencer has a regular grid, you can use to place notes. Here, you define the grid structure, assuming there's a note at every step. It may seem backwards, but once you overcome old habits, it may be simpler to do it this way. Example, you want a four on the floor, you only need to program one step. Also, I feel, breaking down a rhythm to such formula, gives me a better understanding, of how the rhythm works.

The machine offers 8 sequence tracks, each can have a different grid sequence with different cycle loop. Grid step is defined as a multiplication or fraction of base duration, like "1 quarter note", "3 sixteenth notes", "1/3 half note" or "3/4 whole note". On top of that you can program a repeat sequence, telling the machine how many times to repeat a grid step. Considering both sequences can have a different loop cycle, it is possible to program fairly complex rhythms with a simple formula. Also the sequencer is not bound to a time signature, you can program odd, irregular rhythms, rhythms with asymmetric measures.
Another, somewhat uncommon feature of the sequencer is the "humanizer" function, which not only can delay notes by random duration, but can play them too early as well. This "timing error" function can be configured separately for each track.

And here's a quick overview video:

Rhythm Assembler is just a script, it comes with no samples and no instrument patches. There are script preset files, you can add to an existing instrument. Which is also the reason, there is no custom graphic interface and the background is black (for the workaround to disable instrument's background image). The script requires Kontakt 5.6.5 or later to work. It could be rather easily ported to any earlier version of Kontakt 5 and with some work and (loosing option to rename sounds) to Kontakt 4.

The script is free to download and use (although it's not free to re-distribute). DOWNLOAD IT HERE. To install the script, you need to locate Kontakt's user preset/scripts folder and copy the "Rhythm Assembler" directory there. There are several example presets, with pre-programmed rhythms and an "empty" preset.

There's some further beta development, you can follow here (scroll down the thread).