Working on music production can sometimes involve shaping MIDI data to fit specific creative needs. Today, we're going to take a look at a small but powerful MIDI script designed to filter out notes based on pitch range while also introducing an element of probability to note playback. This script was built in collaboration with Frank Faruk Ceviz & ChatGPT, and it offers a practical way to add a human touch of randomness to your MIDI sequences. Let's dive into what it does and how it works.
Overview
The script is a MIDI Note Range Filter with a Probability Gate. What does that mean? Essentially, it allows you to control which notes are allowed to pass through based on their pitch, while also giving you the option to apply a probability setting that determines whether the filtered notes will actually be sent through.
This combination is particularly handy when you want to limit the note range that an instrument plays, but also want to introduce some variability for more dynamic performances. Imagine applying this to a drum kit, where only certain drums are triggered, and only some of the time—this script can help you achieve that level of nuanced control.
Breaking Down the Script
The script is built using JavaScript, and it has three main parameters for user control:
- High Note: This defines the highest MIDI note that will be allowed to pass through. Notes above this value will be filtered out.
- Low Note: This parameter sets the lowest MIDI note allowed to pass. Any notes below this threshold will be removed.
- Probability: This is where the fun happens. This setting allows you to determine, in percentage terms, how likely it is for a note within the specified range to actually be sent. A value of 100% means all notes in the range will pass, whereas a lower value means that fewer notes will make it through, adding an element of randomness.