Skip to content

Commit

Permalink
Added filter() and speed()
Browse files Browse the repository at this point in the history
  • Loading branch information
jazz-soft committed Jul 28, 2019
1 parent 2a7d1ff commit c9163be
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions javascript/JZZ.midi.SMF.js
Original file line number Diff line number Diff line change
Expand Up @@ -777,7 +777,7 @@
this._ttt.push({ t: 0, m: this._mul, ms: 0 });
this._durationMS = this._duration / this._mul;
}
this._coeff = 1;
this._speed = 1;
this.mul = this._mul;
this._ttt.push({ t: this._duration, m: 0, ms: this._durationMS });
if (!this._durationMS) this._durationMS = 1;
Expand Down Expand Up @@ -839,8 +839,7 @@
this._p0 = this._pos - (_now() - this._t0) * this._mul;
}
}
//console.log('speed:', this._speed);
//this.mul = this._mul / this._speed;
this.mul = this._mul / this._speed;
};
Player.prototype.tick2ms = function(t) {
if (isNaN(parseFloat(t))) _error('Not a number: ' + t);
Expand Down
2 changes: 1 addition & 1 deletion test/mocha.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ describe('integration: read / write / play', function() {
player.jump(3020200);
});

it.skip('MIDI file type 2; ppqn', function(done) {
it('MIDI file type 2; ppqn', function(done) {
var smf = new JZZ.MIDI.SMF(2, 96);
var trk = new JZZ.MIDI.SMF.MTrk;
smf.push(trk);
Expand Down

0 comments on commit c9163be

Please sign in to comment.