corrected useless shift/push/return / delete ambiguous import in API.ts + scale = scale;
This commit is contained in:
@ -2,12 +2,10 @@ import { seededRandom } from "zifferjs";
|
||||
import { MidiConnection } from "./IO/MidiConnection";
|
||||
import { tryEvaluate, evaluateOnce } from "./Evaluator";
|
||||
import { DrunkWalk } from "./Utils/Drunk";
|
||||
import { scale } from "./Scales";
|
||||
import { Editor } from "./main";
|
||||
import { SoundEvent } from "./classes/SoundEvent";
|
||||
import { MidiEvent } from "./classes/MidiEvent";
|
||||
import { LRUCache } from "lru-cache";
|
||||
import { SCALES } from "./Scales"
|
||||
import { InputOptions, Player } from "./classes/ZPlayer";
|
||||
import {
|
||||
samples,
|
||||
@ -1514,7 +1512,6 @@ export class UserAPI {
|
||||
this._logMessage(message);
|
||||
};
|
||||
|
||||
scale = scale;
|
||||
|
||||
rate = (rate: number): void => {
|
||||
rate = rate;
|
||||
|
||||
@ -348,6 +348,7 @@ Array.prototype.scale = function <T>(this: T[], scaleName: string = "major") {
|
||||
|
||||
const scale = SCALES[scaleName];
|
||||
|
||||
//input protect from unknow scale
|
||||
if (!scale) {
|
||||
throw new Error(`Unknown scale ${scaleName}`);
|
||||
}
|
||||
@ -363,7 +364,7 @@ Array.prototype.scale = function <T>(this: T[], scaleName: string = "major") {
|
||||
}
|
||||
}
|
||||
|
||||
this.shift()
|
||||
this.push(...result);
|
||||
return this;
|
||||
//this.shift()
|
||||
//this = [...result];
|
||||
return result;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user