Showing 10 of 10 total issues
File musicjson-toolbox.js
has 679 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
(function() {
'use strict';
/**
* The MusicJsonToolbox class implements static functions to operate with musicjson objects.
Function weightedEditDistance
has 78 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
weightedEditDistance: function(a, b, adjusted) {
if (a.length === 0) {
return 0;
}
if (b.length === 0) {
Function notes
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
notes: function(obj, repeat, rests) {
var tempNotes = [];
var repeatStart = -1;
// loop over measures
Function base12Pitch
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
base12Pitch: function(step, keyAdjust, octave, alter, withOctave) {
// lookup semitones in c major scale
var ret = this.base12[step];
// optionally add alter value (from key or accidental)
Function editDistance
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
editDistance: function(a, b, compare, weight) {
if (a.length === 0) {
return 0;
}
if (b.length === 0) {
Function weightConsolidation
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
weightConsolidation: function(matrix, a, b, i, j, c, adjusted) {
Function weightFragmentation
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
weightFragmentation: function(matrix, a, b, i, j, f, adjusted) {
Function base12Pitch
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
base12Pitch: function(step, keyAdjust, octave, alter, withOctave) {
Function pitchDifference
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
pitchDifference: function(pitch1, keyAdjust, pitch2, withOctave, absolute) {
Function weightSubstitution
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
weightSubstitution: function(a, b, i, j, adjusted) {