mirror of
https://github.com/scratchfoundation/scratch-audio.git
synced 2025-03-23 05:05:48 -04:00
lint
This commit is contained in:
parent
0bd84dd9a6
commit
6948968a85
1 changed files with 2 additions and 4 deletions
|
@ -1,7 +1,5 @@
|
||||||
var Tone = require('tone');
|
var Tone = require('tone');
|
||||||
var Soundfont = require('soundfont-player');
|
var Soundfont = require('soundfont-player');
|
||||||
var log = require('./log');
|
|
||||||
|
|
||||||
|
|
||||||
function InstrumentPlayer (outputNode) {
|
function InstrumentPlayer (outputNode) {
|
||||||
this.outputNode = outputNode;
|
this.outputNode = outputNode;
|
||||||
|
@ -24,11 +22,11 @@ InstrumentPlayer.prototype.playNoteForBeatsWithInstrument = function (note, beat
|
||||||
note, Tone.context.currentTime, {duration : Number(beats)} // todo: need to use tempo here
|
note, Tone.context.currentTime, {duration : Number(beats)} // todo: need to use tempo here
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
InstrumentPlayer.prototype.loadInstrument = function (instrumentNum) {
|
InstrumentPlayer.prototype.loadInstrument = function (instrumentNum) {
|
||||||
if (this.instruments[instrumentNum]) {
|
if (this.instruments[instrumentNum]) {
|
||||||
return Promise.resolve();
|
return Promise.resolve();
|
||||||
} else {
|
} else {
|
||||||
return Soundfont.instrument(Tone.context, this.instrumentNames[instrumentNum])
|
return Soundfont.instrument(Tone.context, this.instrumentNames[instrumentNum])
|
||||||
.then((inst) => {
|
.then((inst) => {
|
||||||
|
|
Loading…
Reference in a new issue