Function isNoteIncludedIn

  • Test if a given pitch class set includes a note

    Parameters

    • set: Set

      the base set to test against

    Returns ((noteName) => boolean)

    true if the note is included in the pcset

    Can be partially applied

      • (noteName): boolean
      • Parameters

        • noteName: string

        Returns boolean

    Example

    const isNoteInCMajor = isNoteIncludedIn(['C', 'E', 'G'])
    isNoteInCMajor('C4') // => true
    isNoteInCMajor('C#4') // => false