doc + Mask
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
import { type UserAPI } from "./API";
|
||||
import { SCALES } from "./Scales";
|
||||
import { safeScale } from "zifferjs";
|
||||
export { };
|
||||
|
||||
declare global {
|
||||
@ -21,6 +22,8 @@ declare global {
|
||||
pick(): T;
|
||||
loop(index: number): T;
|
||||
shuffle(): this;
|
||||
scale(name: string, base_note?: number): this;
|
||||
arp(scaleName: string): this;
|
||||
rotate(steps: number): this;
|
||||
unique(): this;
|
||||
in(value: T): boolean;
|
||||
@ -355,6 +358,7 @@ Array.prototype.scale = function <T>(this: T[], scaleName: string = "major", mas
|
||||
let mask = maskLength;
|
||||
|
||||
//input protect from unknow scale
|
||||
|
||||
if (!scale) {
|
||||
throw new Error(`Unknown scale ${scaleName}`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user