<commit_before>'use strict';

var constants = require('./constants');

var commands = {
	0x80: {
		name: 'NOTE_OFF',
		length: 2
	},
	0x90: {
		name: 'NOTE_ON',
		length: 2
	},
	0xA0: {
		name: 'POLYPHONIC_AFTERTOUCH',
		length: 2
	},
	0xB0: {
		name: 'CONTROL_CHANGE',
		length: 2
	},
	0xC0: {
		name: 'PROGRAM_CHANGE',
		length: 1
	},
	0xD0: {
		name: 'CHANNEL_AFTERTOUCH',
		length: 1
	},
	0xE0: {
		name: 'PITCH_BEND_CHANGE',
		length: 2
	},
	0xFF: {
		name: 'META_MESSAGE',
		length: null // variable
	}
};

function Message(status, data, length) {
	this.statusByte = status;
	this.data = data;
	this.length = length;
}

Message.prototype.getStatus = function () {
	return this.statusByte === constants.META_EVENT ? this.statusByte : this.statusByte & 0xF0;
};
<commit_msg>handling system messages<commit_after>'use strict';

var constants = require('./constants');

var commands = {
	0x80: {
		name: 'NOTE_OFF',
		length: 2
	},
	0x90: {
		name: 'NOTE_ON',
		length: 2
	},
	0xA0: {
		name: 'POLYPHONIC_AFTERTOUCH',
		length: 2
	},
	0xB0: {
		name: 'CONTROL_CHANGE',
		length: 2
	},
	0xC0: {
		name: 'PROGRAM_CHANGE',
		length: 1
	},
	0xD0: {
		name: 'CHANNEL_AFTERTOUCH',
		length: 1
	},
	0xE0: {
		name: 'PITCH_BEND_CHANGE',
		length: 2
	},
	0xFF: {
		name: 'META_MESSAGE',
		length: null // variable
	},
	0xF0: {
		name: 'SYS_MESSAGE',
		length: null // variable
	}
};

function Message(status, data, length) {
	this.statusByte = status;
	this.data = data;
	this.length = length;
}

Message.prototype.getStatus = function () {
	return this.statusByte === constants.META_EVENT ? this.statusByte : this.statusByte & 0xF0;
};

{'fraction_non_alphanumeric': 0.16012269938650306, 'fraction_numerical': 0.033128834355828224, 'mean_word_length': 3.5558659217877095, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2033887', 'n_tokens_mistral': 736, 'n_tokens_neox': 680, 'n_words': 140}