Random Microtonal Melody Generator

Generate quarter-tone pitches around an explicit reference frequency with signed cent metadata.

Description

Generate a sequence of 24-tone equal-tempered pitches with frequencies and cent offsets from a reference.

Pitch intervals can be expressed as frequency ratios: an octave corresponds to a factor of two.1

This tool divides that octave into 24 equal logarithmic steps, so one quarter-tone step is 50 cents. A negative step lowers the reference pitch; a positive step raises it. This is one specific microtonal tuning convention rather than arbitrary nonstandard tuning.

Each item in result.notes contains quarterToneStep, frequencyHertz, and centsFromReference. Here melody is a sequence of generated pitches: the tool supplies no rhythm, durations, rests, instrument, notation, MIDI file, or audio.

When to use Random Microtonal Melody Generator

Use it for quarter-tone pitch exercises or frequency sequences that will be arranged or synthesized separately.

How to use Random Microtonal Melody Generator and understand its results

  1. Enter finite referenceHertz from 1e−100 through 1e100, integer minimumQuarterToneStep and maximumQuarterToneStep from −2,400 through 2,400 in ascending order, and integer noteCount from 1 through 64.
  2. Run and read result.notes in sequence. Interpret step offsets relative to the supplied reference, not as absolute MIDI note numbers.
  3. Use frequencyHertz for a frequency-based synthesizer or comparison exercise, and add timing and articulation separately.
step = minimumStep + floor(randomDraw × (maximumStep − minimumStep + 1)); f = referenceHertz × 2^(step/24)

One draw chooses an inclusive integer step per note; the quarter-tone frequency calculator supplies f.

centsFromReference = 1200 × log2(f/referenceHertz)

The cents calculator derives the offset from the resulting frequency ratio. It is mathematically 50 × step, with floating-point rounding.

json
{
  "input": {
    "referenceHertz": 440,
    "minimumQuarterToneStep": -12,
    "maximumQuarterToneStep": 12,
    "noteCount": 3
  },
  "randomDraw": 0.25,
  "output": {
    "result": {
      "notes": [
        {
          "centsFromReference": -300.00000000000006,
          "frequencyHertz": 369.9944227116344,
          "quarterToneStep": -6
        },
        {
          "centsFromReference": -300.00000000000006,
          "frequencyHertz": 369.9944227116344,
          "quarterToneStep": -6
        },
        {
          "centsFromReference": -300.00000000000006,
          "frequencyHertz": 369.9944227116344,
          "quarterToneStep": -6
        }
      ]
    }
  }
}

Step zero returns the reference frequency. Step 24 doubles it and step −24 halves it. Equal step bounds fix the pitch but still consume one draw per note. Reversed bounds, nonpositive references, counts above 64, and invalid draws fail.

Limitations and assumptions

The default source is Math.random; no seed input or cryptographic entropy guarantee is provided. Repeated runs may select the same result, and the distribution depends on the random source.

The sequence has no scale, key, contour, voice-leading, uniqueness, or compositional constraint. It is fixed to 24-tone equal temperament and does not generate arbitrary microtonal temperaments.

Very large positive or negative step offsets can produce frequencies outside an audible or device-supported range. The tool does not check hearing range or synthesizer capability.

Alternative or Complementary methods

Use the deterministic quarter-tone calculator for one explicit offset. Compare two chosen frequencies with the cents calculator independently of sequence generation.

References

  1. Music Acoustics: Note Names, MIDI Numbers and Frequencies — University of New South Wales, Joe Wolfe

Similar or alternative tools

Don't forget to set a bookmark for tool.io!
Privacy | Imprint | Cookies