freakimkaefig / Music-XML-Analyzer

Music XML Analyzer
http://freakimkaefig.github.io/Music-XML-Analyzer/
MIT License
15 stars 4 forks source link

Fix patterns passed from PatternView.js #43

Closed freakimkaefig closed 9 years ago

freakimkaefig commented 9 years ago
[{
    type: 0,
    notes: [
        {
            type: "note",
            pitch: {
                step: "B",
                alter: 0,
                octave: 5,
            }
        },
        {
            type: "note",
            pitch: {
                step: "B",
                alter: 0,
                octave: 5,
            }
        }
    ]
}]

Rhythm Pattern:

[{
    type: 1,
    notes: [
        {
            type: "note",
            ptich: {
                type: "half",
                dot: true,
                beam: false
            }
        },
        {
            type: "rest",
            duration: "whole"
        }
    ]
}]

Melody Pattern:

[{
    type: 2,
    notes: [
        {
            type: "note",
            pitch: {
                step: "E",
                type: "eighth",
                alter: -1,
                octave: 5,
                dot: false,
                beam: "begin"   // Triole (1)
            }
        },
        {
            type: "note",
            pitch: {
                step: "D",
                type: "eighth",
                alter: 0,
                octave: 5,
                dot: false,
                beam: "continue"    // Triole (2)
            }
        },
        {
            type: "note",
            pitch: {
                step: "C",
                type: "eighth",
                alter: 0,
                octave: 5,
                dot: false,
                beam: "end" // Triole (3)
            }
        },
        {
            type: "note",
            pitch: {
                step: "C",
                type: "eighth",
                alter: 0,
                octave: 5,
                dot: true,  // punktierte Note
                beam: false
            }
        }
        {
            type: "rest",   // Pause
            duration: "whole"
        }
    ]
}]
freakimkaefig commented 9 years ago

Rhythm search:

ErrorException thrown with message "Undefined property: stdClass::$pitch"

Stacktrace:
#21 ErrorException in D:\Repositories\Music-XML-Analyzer\app\controllers\PatternController.php:77
#20 Illuminate\Exception\Handler:handleError in D:\Repositories\Music-XML-Analyzer\app\controllers\PatternController.php:77
#19 PatternController:getInterval in D:\Repositories\Music-XML-Analyzer\app\controllers\RhythmController.php:28
#18 RhythmController:search in D:\Repositories\Music-XML-Analyzer\app\controllers\PatternController.php:34
#17 PatternController:postPatternSearch in <#unknown>:0
#16 call_user_func_array in D:\Repositories\Music-XML-Analyzer\vendor\laravel\framework\src\Illuminate\Routing\Controller.php:231
#15 Illuminate\Routing\Controller:callAction in D:\Repositories\Music-XML-Analyzer\vendor\laravel\framework\src\Illuminate\Routing\ControllerDispatcher.php:93
#14 Illuminate\Routing\ControllerDispatcher:call in D:\Repositories\Music-XML-Analyzer\vendor\laravel\framework\src\Illuminate\Routing\ControllerDispatcher.php:62
#13 Illuminate\Routing\ControllerDispatcher:dispatch in D:\Repositories\Music-XML-Analyzer\vendor\laravel\framework\src\Illuminate\Routing\Router.php:967
#12 Illuminate\Routing\Router:Illuminate\Routing\{closure} in <#unknown>:0
#11 call_user_func_array in D:\Repositories\Music-XML-Analyzer\vendor\laravel\framework\src\Illuminate\Routing\Route.php:109
#10 Illuminate\Routing\Route:run in D:\Repositories\Music-XML-Analyzer\vendor\laravel\framework\src\Illuminate\Routing\Router.php:1033
#9 Illuminate\Routing\Router:dispatchToRoute in D:\Repositories\Music-XML-Analyzer\vendor\laravel\framework\src\Illuminate\Routing\Router.php:1001
#8 Illuminate\Routing\Router:dispatch in D:\Repositories\Music-XML-Analyzer\vendor\laravel\framework\src\Illuminate\Foundation\Application.php:775
#7 Illuminate\Foundation\Application:dispatch in D:\Repositories\Music-XML-Analyzer\vendor\laravel\framework\src\Illuminate\Foundation\Application.php:745
#6 Illuminate\Foundation\Application:handle in D:\Repositories\Music-XML-Analyzer\vendor\barryvdh\laravel-debugbar\src\Middleware\Stack.php:34
#5 Barryvdh\Debugbar\Middleware\Stack:handle in D:\Repositories\Music-XML-Analyzer\vendor\laravel\framework\src\Illuminate\Session\Middleware.php:72
#4 Illuminate\Session\Middleware:handle in D:\Repositories\Music-XML-Analyzer\vendor\laravel\framework\src\Illuminate\Cookie\Queue.php:47
#3 Illuminate\Cookie\Queue:handle in D:\Repositories\Music-XML-Analyzer\vendor\laravel\framework\src\Illuminate\Cookie\Guard.php:51
#2 Illuminate\Cookie\Guard:handle in D:\Repositories\Music-XML-Analyzer\vendor\stack\builder\src\Stack\StackedHttpKernel.php:23
#1 Stack\StackedHttpKernel:handle in D:\Repositories\Music-XML-Analyzer\vendor\laravel\framework\src\Illuminate\Foundation\Application.php:641
#0 Illuminate\Foundation\Application:run in D:\Repositories\Music-XML-Analyzer\public\index.php:49