Arabic Maqām Network - TypeScript Library Documentation - v0.1.0
    Preparing search index...
    • Shifts a pitch class base value to a different octave.

      This function transposes a pitch class value by octaves, handling the conversion appropriately for different input formats. It's used when generating pitch classes across multiple octaves from a single octave template.

      Parameters

      • baseValue: string

        The original pitch class value as a string

      • inputType: "fraction" | "decimalRatio" | "cents" | "stringLength"

        The format of the input value

      • targetOctave: 0 | 1 | 2 | 3 | 4

        The target octave (0, 1, 2, 3, or 4)

      Returns string

      The shifted value in the same format as the input

      // Shift a fraction up one octave
      shiftPitchClassBaseValue("3/2", "fraction", 2) // Returns "3/1" (doubled)
      // Shift cents up one octave
      shiftPitchClassBaseValue("701.955", "cents", 2) // Returns "1901.955" (+1200 cents)