Skip to content

Main content

Random Voice Leading Motion Exercise Generator

Generate bounded two-voice MIDI transitions with sharp-spelled interval prompts and delegated motion and consonance classifications.

Loading tool…

Description

Generate bounded two-voice MIDI transitions with sharp-spelled interval prompts and delegated motion and consonance classifications.

A musical fixture expresses pitch or timing through explicit numeric conventions such as MIDI numbers, semitone intervals, beats, and durations. A reproducible symbolic sequence is separate from a performed sound or a judgment of musical quality.

Generate bounded two-voice MIDI transitions with sharp-spelled interval prompts and delegated motion and consonance classifications.

When to use this tool

Use this generator to create reproducible voice leading motion exercise cases from the supplied model or bank. Inspect the returned evidence before using cases in a test or exercise.

How to use the tool and how it works

  1. Supply count, midiRange, maximumLeapSemitones, lowerVoiceIsBass in the field shapes below. Set seed when you need an explicit replay.
  2. Run the tool and correct any input error. For generated controls, distinguish a successful fixture containing an invalid case from failure to generate the fixture.
  3. Read exercises. Use the conventions below and keep answer-bearing fields separate when presenting an exercise.

Draw two starting MIDI pitches, then draw each next pitch within the supplied range and maximum semitone leap. Spell pitches with the supported sharp-note convention, delegate two-voice motion classification and classify before/after intervals using lowerVoiceIsBass.1

Delegated operations used for this result: voice leading motion classifier; counterpoint consonance classifier. Their calculation or parsing conventions apply to the corresponding result fields.2, 3

Input fieldMeaning and unitsAccepted input
countRequested count; the mechanics explain whether one draw expands into several returned records.Required. Safe integer; minimum 1; maximum 64.
midiRangeMidi RangeRequired. Object; no unknown keys.
midiRange.minimumMinimumRequired. Safe integer; minimum 0; maximum 127.
midiRange.maximumMaximumRequired. Safe integer; minimum 0; maximum 127.
maximumLeapSemitonesMaximum Leap SemitonesRequired. Safe integer; minimum 0; maximum 24.
lowerVoiceIsBassLower Voice Is BassRequired. Boolean.
seedOptional numeric seed; takes precedence over context randomness. Without either, use the fixed tool.io default seed.Optional. Safe integer.
Output fieldInterpretationReturned shape
exercisesExercisesRequired. Array of Object; no unknown keys.; minimum items 1; maximum items 64.
exercises[].firstVoiceMidiPairFirst Voice Midi PairRequired. Array of Safe integer; minimum 0; maximum 127.; minimum items 2; maximum items 2.
exercises[].secondVoiceMidiPairSecond Voice Midi PairRequired. Array of Safe integer; minimum 0; maximum 127.; minimum items 2; maximum items 2.
exercises[].twoVoiceMotionClassTwo Voice Motion ClassRequired. Text.
exercises[].firstVoiceSignedMotionFirst Voice Signed MotionRequired. Safe integer.
exercises[].secondVoiceSignedMotionSecond Voice Signed MotionRequired. Safe integer.
exercises[].voiceCrossingObservedVoice Crossing ObservedRequired. Boolean.
exercises[].beforeBeforeRequired. Object; no unknown keys.
exercises[].before.lowerScientificNoteLower Scientific NoteRequired. Text.
exercises[].before.upperScientificNoteUpper Scientific NoteRequired. Text.
exercises[].before.counterpointIntervalClassCounterpoint Interval ClassRequired. Text.
exercises[].before.consonantUnderTwoVoiceConventionConsonant Under Two Voice ConventionRequired. Boolean.
exercises[].before.spelledSimpleIntervalNumberSpelled Simple Interval NumberRequired. Safe integer.
exercises[].afterAfterRequired. Object; no unknown keys.
exercises[].after.lowerScientificNoteLower Scientific NoteRequired. Text.
exercises[].after.upperScientificNoteUpper Scientific NoteRequired. Text.
exercises[].after.counterpointIntervalClassCounterpoint Interval ClassRequired. Text.
exercises[].after.consonantUnderTwoVoiceConventionConsonant Under Two Voice ConventionRequired. Boolean.
exercises[].after.spelledSimpleIntervalNumberSpelled Simple Interval NumberRequired. Safe integer.
randomnessReplay metadata: source is seed or context; seed is the normalized 32-bit seed or null for a context source.Required. Object; no unknown keys.
randomness.seedOptional numeric replay seed; normalization and precedence are explained below.Required. Safe integer. or Null.
randomness.sourceSourceRequired. Text; one of "context", "seed".

An explicit safe-integer seed takes precedence over injected context randomness and is normalized to an unsigned 32-bit integer. With no seed and no context source, replay uses the fixed tool.io default seed. A context source must return finite values from zero inclusive to one exclusive; its advancing state must be retained separately. randomness records the source and normalized seed, or null for context. These generators are not cryptographic random sources.

json
{
  "input": {
    "count": 1,
    "midiRange": {
      "minimum": 60,
      "maximum": 72
    },
    "maximumLeapSemitones": 2,
    "lowerVoiceIsBass": true,
    "seed": 42
  },
  "output": {
    "exercises": [
      {
        "firstVoiceMidiPair": [
          67,
          69
        ],
        "secondVoiceMidiPair": [
          65,
          66
        ],
        "twoVoiceMotionClass": "similar",
        "firstVoiceSignedMotion": 2,
        "secondVoiceSignedMotion": 1,
        "voiceCrossingObserved": false,
        "before": {
          "lowerScientificNote": "F4",
          "upperScientificNote": "G4",
          "counterpointIntervalClass": "dissonance",
          "consonantUnderTwoVoiceConvention": false,
          "spelledSimpleIntervalNumber": 2
        },
        "after": {
          "lowerScientificNote": "F#4",
          "upperScientificNote": "A4",
          "counterpointIntervalClass": "imperfect-consonance",
          "consonantUnderTwoVoiceConvention": true,
          "spelledSimpleIntervalNumber": 3
        }
      }
    ],
    "randomness": {
      "seed": 42,
      "source": "seed"
    }
  }
}

Limitations and assumptions

  • The bounded pitch span is at most four octaves for the imported interval classifier. These are two-voice transitions, not complete compositional voice-leading rules, notation engraving or an audio performance.
  • A replay requires the same complete input and implementation. Randomized construction does not guarantee uniform coverage of every feasible output; finite samples can repeat unless a distinct-selection rule is explicitly stated.
  • The field tables state structural bounds; cross-field constraints and bounded search or output budgets also apply. Unknown keys are rejected where the object contract disallows them. Input errors are distinct from null fields and deliberate invalid controls in a successful output.

Alternative or Complementary methods

For a supplied example, inspect the returned construction or delegated check directly. To evaluate a consumer, also test cases chosen for its own boundaries; a generated finite corpus does not establish exhaustive coverage.

References

  1. Tool behavior and example: Random Voice Leading Motion Exercise Generator — tool.io

  2. Calculation or validation: music/voice-leading-motion-classifier — tool.io

  3. Calculation or validation: music/counterpoint-consonance-classifier — tool.io

Similar or alternative tools

  • Random Bounded-Interval Melody Generator

    Generate a MIDI melody from an explicit starting pitch with uniform local choices including repeated notes inside a pitch range and maximum semitone step, delegating frequency and signed interval answers; not uniform over complete melodies.

  • Random Polyrhythm Event Grid Generator

    Generate exact rational event grids for shared-cycle polyrhythms or shared-beat polymeters with delegated tempo timing.