@libraz/libcantus - v0.9.3
    Preparing search index...

    Function enumerateSafePitches

    • Enumerate placeable pitches in a range, chord tones first, descending.

      Parameters

      • q: Omit<SafetyQuery, "candidatePitch">

        The safety context minus the candidate pitch.

      • pitchLow: number

        Lowest MIDI pitch to consider (inclusive).

      • pitchHigh: number

        Highest MIDI pitch to consider (inclusive).

      Returns number[]

      Placeable pitches (non-dissonant), chord tones before others, each group descending.

      If either bound is non-finite/non-integral, reversed, or exceeds the generation budget.

      import { enumerateSafePitches, makeChord, majorKey } from '@libraz/libcantus';
      const pitches = enumerateSafePitches(
      { profile: 'pop', chord: makeChord(0, 'maj'), key: majorKey(0), otherVoices: [], strongBeat: true },
      60,
      72,
      );
      pitches; // placeable pitches in [60, 72], chord tones first, each group descending