Function isSubsetOf

  • Create a function that test if a collection of notes is a subset of a given set

    The function is curryfied.

    Parameters

    • set: Set

      the superset to test against (chroma or list of notes) @return{function(PcsetChroma|NoteNames[]): boolean} a function accepting a set to test against (chroma or list of notes)

    Returns ((notes) => boolean)

      • (notes): boolean
      • Parameters

        Returns boolean

    Example

    const inCMajor = Pcset.isSubsetOf(["C", "E", "G"])
    inCMajor(["e6", "c4"]) // => true
    inCMajor(["e6", "c4", "d3"]) // => false