Skip to content

Note accidental gets 'undefined' sometimes (accidentalValue() > 2) #107

@eagor

Description

@eagor
var scale = teoria.scale("cx", 'wholetone');
scale.simple();
> ["cx", "dx", "ex", "fundefined", "gundefined", "aundefined"]

I suspect this is a result of Note#accidental()

scale.notes()[3].accidentalValue()
> 3
scale.notes()[3].accidental()
> undefined

But the accidentalValue should not be greater than 2. If it is, then it should be another note name. Thus I think the root of the issue is in the way the intervals are calculated, particularly, how it finds the note that is some interval away from another note (from scale tonic in our case).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions