Skip to content

Instantly share code, notes, and snippets.

@garcia
garcia / fruity_controller_frequencies.md
Last active November 18, 2024 21:21
Map Fruity Keyboard Controller's note value to any other software's frequency parameter

fruity_controller_frequencies.py

This script enables you to map the Note output value from Fruity Keyboard Controller (set to the full keyboard range) to any other software's frequency or cutoff knob. All you need to specify is the target control's maximum and median frequencies (freq_max and freq_mid). The script prints a Fruity Formula Controller expression that takes Fruity Keyboard Controller's Note value as the "a" knob and outputs the equivalent frequency for your desired software. Note that the target frequency/cutoff knob must be logarithmic.

How to use

  • Add a Fruity Keyboard Controller in the Channel rack.
    • Select the full keyboard range and auto-map it to white & black notes.
  • Add a Fruity Formula Controller in the Mixer window. Paste the output from this script into the Formula input.
  • Set the "b" and "c" knobs to their median values of 0.5. From there, you can tweak them to adjust the semitone or octave.
@garcia
garcia / nativeosfs.py
Created December 22, 2021 17:56
Quick'n'dirty NativeOSFS implementation for pyfilesystem2
import io
import os
from typing import IO, Collection, Dict, Optional
import stat
from fs.base import FS
from fs.error_tools import convert_os_errors
from fs.info import Info
from fs.mode import Mode
from fs.osfs import OSFS