Skip to content

frankiefaruk/Logic-Pro-Script-Probability-Gate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Here's a breakdown of the code and how it works:

Parameter Definitions:

  • High Note: Sets the maximum MIDI note value.
  • Low Note: Sets the minimum MIDI note value.
  • Probability: Determines the chance of a note being sent, expressed as a percentage.

Event Handling:

  1. Note Filtering:
    • Checks if the incoming MIDI note's pitch is within the specified range.
    • If the note is outside the range, an "all notes off" message is sent to prevent unintended sounds.
  2. Probability Check:
    • Uses a random number generator to determine if the note should be sent based on the probability parameter.
    • If the random number is less than or equal to the probability, the note is sent.
  3. Event Sending:
    • If the note passes both the range and probability checks, it's sent to the output.

Key Points:

  • Randomness: The eventShouldSend() function introduces randomness by generating a random number between 1 and 100. If this number is less than or equal to the probability setting, the note is sent.
  • Flexibility: By adjusting the High Note, Low Note, and Probability parameters, you can create a wide range of effects, from subtle randomization to extreme filtering.
  • Efficiency: The code is optimized for performance, ensuring smooth processing of MIDI data.

Additional Tips:

  • Experiment with different probability settings to achieve various levels of randomness and filtering.
  • Combine this script with other MIDI effects to create complex and interesting sound transformations.
  • Consider using this script to create unique rhythmic patterns and melodic variations.

By understanding the core concepts and the code behind this MIDI Note Range Filter with a Probability Gate, you can unlock new creative possibilities in your music production.

About

Logic Pro- Script: Creating a MIDI Note Range Filter with a Probability Gate

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages