Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mml-optimizer

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mml-optimizer - npm Package Compare versions

Comparing version 0.0.7 to 0.1.0

0

cli.js

@@ -0,0 +0,0 @@ #!/usr/bin/env node

7

index.js

@@ -17,3 +17,4 @@ var core = require('./optimizer-core');

tracksShareState: false,
octaveOffset: 0
octaveOffset: 0,
noLiteralDottedRests: false
},

@@ -32,3 +33,4 @@ 'aa': {

tracksShareState: true,
octaveOffset: -1
octaveOffset: -1,
noLiteralDottedRests: true
}

@@ -69,3 +71,4 @@ }

};
module.exports.getOptions = getOptions;
module.exports.parse = parse;
module.exports.generate = generate;
var aStar = require('a-star');
var extend = require('extend');
var optionAliases = {
'mabi': {
tpqn: 96,
minimumNoteDuration: 64,
defaultState: {
octave: 4,
tempo: 120,
volume: 8/15,
duration: '4'
},
maxVolume: 15,
supportsNoteNumbers: true,
tracksShareState: false,
octaveOffset: 0
},
'aa': {
tpqn: 500,
minimumNoteDuration: 64,
defaultState: {
octave: 4,
tempo: 120,
volume: 100/127,
duration: '4'
},
maxVolume: 127,
supportsNoteNumbers: false,
tracksShareState: true,
octaveOffset: -1
}
}
var defaultOptions = optionAliases['aa'];
function noteDurationToTicks(duration, options) {

@@ -309,4 +277,7 @@ return noteDurationAndDotsToTicks(

case 'rest':
neighbors.push(extend({}, state, { cursor: state.cursor + 1 }));
if (token.ticks !== noteDurationToTicks(state.duration, options)) {
var isSameAsCurrentDuration = token.ticks === noteDurationToTicks(state.duration, options);
if (isSameAsCurrentDuration || !options.noLiteralDottedRests) {
neighbors.push(extend({}, state, { cursor: state.cursor + 1 }));
}
if (!isSameAsCurrentDuration) {
ticksToAllNoteDurations(token.ticks, options)

@@ -321,2 +292,3 @@ .forEach(function (duration) {

}
break;
case 'volume':

@@ -326,2 +298,3 @@ case 'tempo':

neighbors.push(extend({}, state, { cursor: state.cursor + 1 }));
break;
case 'nextVoice':

@@ -328,0 +301,0 @@ if (options.tracksShareState)

{
"name": "mml-optimizer",
"version": "0.0.7",
"version": "0.1.0",
"description": "Optimizer for Music Macro Language (MML)",

@@ -29,4 +29,4 @@ "main": "index.js",

"concat-stream": "^1.4.6",
"extend": "^1.3.0"
"extend": "^2.0.0"
}
}

@@ -0,0 +0,0 @@ # mml-optimizer

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc