Skip to content

Commit

Permalink
Put all global definitions at the end of the file, makes it cleaner.
Browse files Browse the repository at this point in the history
  • Loading branch information
sergi committed Nov 11, 2010
1 parent 6b9508a commit a8679bd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion midi.js
Expand Up @@ -163,7 +163,7 @@ var translateTickTime = function(ticks) {
* @returns An object with the hex and base64 resulting streams, as well as * @returns An object with the hex and base64 resulting streams, as well as
* with some useful methods. * with some useful methods.
*/ */
var MidiWriter = window.MidiWriter = function(config) { var MidiWriter = function(config) {
if (config) { if (config) {
var tracks = config.tracks || []; var tracks = config.tracks || [];
// Number of tracks in hexadecimal // Number of tracks in hexadecimal
Expand Down Expand Up @@ -325,6 +325,7 @@ MidiEvent.prototype = {
}; };


var MetaEvent = window.MetaEvent = function(params) { var MetaEvent = window.MetaEvent = function(params) {
var MetaEvent = function(params) {
if (params) { if (params) {
this.setType(params.type); this.setType(params.type);
this.setData(params.data); this.setData(params.data);
Expand Down Expand Up @@ -453,6 +454,9 @@ MidiTrack.prototype = {
} }
}; };


window.MidiWriter = MidiWriter;
window.MidiEvent = MidiEvent;
window.MetaEvent = MetaEvent;
window.MidiTrack = MidiTrack; window.MidiTrack = MidiTrack;
window.noteTable = noteTable; window.noteTable = noteTable;


Expand Down

0 comments on commit a8679bd

Please sign in to comment.