brand-music
Version:
Strongly typed music theory library
103 lines (100 loc) • 2.62 kB
JavaScript
import {
ALL,
EMPTY,
add,
complement,
difference,
fromValues,
has,
intersection,
isSubset,
isSuperset,
isTwelveBits,
masked,
remove,
symmetricDifference,
toggle,
union,
values
} from "./chunk-2U4535RW.js";
import {
from
} from "./chunk-4NNVWJGY.js";
import {
__export
} from "./chunk-YLMQSMVX.js";
// src/PitchClassSet.ts
var PitchClassSet_exports = {};
__export(PitchClassSet_exports, {
ALL: () => ALL2,
EMPTY: () => EMPTY2,
add: () => add2,
difference: () => difference2,
from: () => from2,
fromRaw: () => fromRaw,
fromRawMasked: () => fromRawMasked,
fromRawUnknown: () => fromRawUnknown,
has: () => has2,
hasShape: () => hasShape,
intersection: () => intersection2,
isSubset: () => isSubset2,
isSuperset: () => isSuperset2,
mark: () => mark,
markRaw: () => markRaw,
markRawUnknown: () => markRawUnknown,
remove: () => remove2,
symmetricDifference: () => symmetricDifference2,
toggle: () => toggle2,
toggleAll: () => toggleAll,
union: () => union2,
values: () => values2
});
// src/internal/PitchClassSet.ts
var hasShape = isTwelveBits;
var mark = (_v) => true;
var markRaw = (v) => hasShape(v);
var markRawUnknown = (v) => hasShape(v);
var fromRaw = (v) => v;
var fromRawMasked = (v) => fromRaw(masked(v));
var fromRawUnknown = (v) => isTwelveBits(v) ? fromRaw(v) : void 0;
var EMPTY2 = fromRaw(EMPTY);
var ALL2 = fromRaw(ALL);
var from2 = (...values3) => fromRaw(fromValues(...values3));
var toggleAll = (pcs) => fromRaw(complement(pcs));
var union2 = (a, b) => fromRaw(union(a, b));
var intersection2 = (a, b) => fromRaw(intersection(a, b));
var symmetricDifference2 = (a, b) => fromRaw(symmetricDifference(a, b));
var difference2 = (a, b) => fromRaw(difference(a, b));
var has2 = (pcs, pc) => has(pcs, pc);
var add2 = (pcs, pc) => fromRaw(add(pcs, pc));
var remove2 = (pcs, pc) => fromRaw(remove(pcs, pc));
var toggle2 = (pcs, pc) => fromRaw(toggle(pcs, pc));
var isSuperset2 = (value, of) => isSuperset(value, of);
var isSubset2 = (value, of) => isSubset(value, of);
var values2 = (pcs) => values(pcs).map(from);
export {
hasShape,
mark,
markRaw,
markRawUnknown,
fromRaw,
fromRawMasked,
fromRawUnknown,
EMPTY2 as EMPTY,
ALL2 as ALL,
from2 as from,
toggleAll,
union2 as union,
intersection2 as intersection,
symmetricDifference2 as symmetricDifference,
difference2 as difference,
has2 as has,
add2 as add,
remove2 as remove,
toggle2 as toggle,
isSuperset2 as isSuperset,
isSubset2 as isSubset,
values2 as values,
PitchClassSet_exports
};
//# sourceMappingURL=chunk-DNMYHZD3.js.map