Socket
Socket
Sign inDemoInstall

midiviz-prepare

Package Overview
Dependencies
5
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.5 to 0.0.6

bach.mid.real

11

build/main.js

@@ -84,10 +84,9 @@ #!/usr/bin/env node

// Do the processing
if (music.length !== 1) {
console.error("Sorry, but I can only handle single-track MIDI files!");
return;
}
var tempo = music.ppqn;
var allEvents = [];
music.forEach(function (track) { return track.forEach(function (event) { return allEvents.push(event); }); });
var sortedEvents = allEvents.sort(function (a, b) { return a.tt - b.tt; });
// Filter the notes
var majors = music[0].filter(function (event) { return isMajorNote(event); });
var minors = music[0].filter(function (event) { return isMinorNote(event); });
var majors = sortedEvents.filter(function (event) { return isMajorNote(event); });
var minors = sortedEvents.filter(function (event) { return isMinorNote(event); });
// Calculating required time adjustment

@@ -94,0 +93,0 @@ var timeOffset = 0;

{
"name": "midiviz-prepare",
"author": "Kristof Csillag <csillag.kristof@gmail.com>",
"version": "0.0.5",
"version": "0.0.6",
"description": "A preprocessor for MIDIVisualizer",

@@ -11,3 +11,2 @@ "main": "build/main.js",

"keywords": [],
"author": "",
"license": "ISC",

@@ -14,0 +13,0 @@ "repository": "github:csillag/midiviz-prepare",

@@ -100,12 +100,12 @@ #!/usr/bin/env node

// Do the processing
if (music.length !== 1) {
console.error("Sorry, but I can only handle single-track MIDI files!");
return;
}
const tempo = music.ppqn;
const allEvents: MIDI[] = [];
music.forEach((track) => track.forEach((event) => allEvents.push(event)));
const sortedEvents = allEvents.sort((a, b) => a.tt - b.tt);
// Filter the notes
const majors = music[0].filter((event) => isMajorNote(event));
const minors = music[0].filter((event) => isMinorNote(event));
const majors = sortedEvents.filter((event) => isMajorNote(event));
const minors = sortedEvents.filter((event) => isMinorNote(event));

@@ -112,0 +112,0 @@ // Calculating required time adjustment

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc