{"size": 663, "ext": "js", "max_stars_repo_path": "dist/jMID.Encoder.min.js", "max_stars_repo_name": "mudcube/jMID.js", "max_stars_repo_stars_event_min_datetime": "2016-10-31T05:04:16.000Z", "max_stars_repo_stars_event_max_datetime": "2021-05-16T23:22:59.000Z", "max_issues_repo_path": "dist/jMID.Encoder.min.js", "max_issues_repo_name": "mudcube/jMID.js", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "dist/jMID.Encoder.min.js", "max_forks_repo_name": "mudcube/jMID.js", "max_forks_repo_forks_event_min_datetime": "2016-06-13T21:46:28.000Z", "max_forks_repo_forks_event_max_datetime": "2016-06-13T21:46:28.000Z"}
{"max_stars_count": 2, "max_issues_count": null, "max_forks_count": 1, "avg_line_length": 66.3, "max_line_length": 469, "alphanum_fraction": 0.7073906486}
/**
 * jMID.Encoder.min.js v0.2
 *
 * A javascript library for reading, manipulating, writing, and timing MIDI files
 * @author Steven Sojka - Tuesday, February 05, 2013
 *
 * MIT Licensed
 */
var jMID=function(){jMID.Encoder=function(){};jMID.Encoder.prototype={encode:function(d){for(var a="",b=d.getHeader(),c=jMID.Util,a=a+"MThd\x00\x00\x00\u0006"+(0===b.format?"\x00\x00":"\x00\u0001"),a=a+c.bytesToString(c.stringToBytes(b.trackCount.toString(),2)),a=a+c.bytesToString([b.ticksPerBeat>>8,b.ticksPerBeat&255]),b=0,c=d.tracks.length;b<c;b++)var e=d.tracks[b].encode(),a=a+e;return a}};jMID.Emitter&&jMID.Emitter.register(jMID.Encoder);return jMID}(jMID||{});
