#tuning #synthesizer #scale #midi #microtonal

tune

Explore musical tunings and create synthesizer tuning files for microtonal scales

34 breaking releases

0.35.0 Jul 11, 2024
0.34.0 Dec 4, 2023
0.33.0 May 11, 2023
0.32.1 Feb 6, 2023
0.4.0 Mar 23, 2019

#87 in Audio

Download history 3/week @ 2024-06-15 110/week @ 2024-07-06 29/week @ 2024-07-13 2/week @ 2024-07-20 4/week @ 2024-08-24 5/week @ 2024-08-31 16/week @ 2024-09-14 22/week @ 2024-09-21 133/week @ 2024-09-28

171 downloads per month
Used in 3 crates

MIT license

375KB
6.5K SLoC

Explore musical tunings and create synthesizer tuning files for microtonal scales.

Overview

tune is planned to be part of a larger ecosystem for microtonal software in Rust.

Current projects relying on tune are:

  • tune-cli: A command line tool with live-retuning capabilities
  • microwave: A microtonal modular waveform synthesizer
  • fluid-xenth: A microtonal soundfont renderer

Resources

Features

Pitch Conversions

  • Convert between linear and logarithmic pitch ratios
  • Determine the frequency for a given note in a custom tuning system
  • Determine the note for a given frequency in a custom tuning system
  • Find fractional approximations for frequency ratios

Export Scales

  • To Scala (scl and kbm) format
  • As Midi Tuning Standard (MTS) Sysex Messages
    • Single Note Tuning Change (with Bank Select)
    • Scale/Octave Tuning (1-Byte and 2-Byte)

Import Scales

  • From Scala (scl and kbm) format

Live Retuning

  • Enhance the capabilities of synthesizers with limited tuning support
    • Tune channels ahead of time for a glitch free tuning experience
    • Tune channels just in time for full pitch freedom
  • Pick the message type that your synth supports
    • Single Note Tuning Change (with Bank Select)
    • Scale/Octave Tuning (1-Byte and 2-Byte)
    • Channel Fine Tuning
    • Pitch Bend

MOS Scales and Isomorphic Keyboards

  • Find MOSes for a given generator
  • Find generators for a given MOS
  • Find MOS-based isomorphic keyboard layouts
    • Supported genchains: Meantone, Mavila, Porcupine, Tetracot, Hanson
    • Determine step sizes
    • Generate automatic color schemas
    • Print generalized note names and accidentals

Commas and Temperaments

  • Find patent vals
  • Find tempered-out commas

MIDI Messages

  • Create basic MIDI messages
  • Create tuning-related RPN messages
  • Parse basic MIDI messages

No runtime deps