danigb / music.scale.dictionary

A dictionary of music scales
MIT License
1 stars 0 forks source link

super locrian pentatonic #1

Open soichih opened 7 years ago

soichih commented 7 years ago

Hello.

I am looking at super locrian ptentatonic scale.

"super locrian pentatonic": "1 3b 4d 5b 7b",

Is "4d" a typo for "4b"?

danigb commented 7 years ago

Probably. All this scales now live inside tonal:

var scales = require('tonal-scales/scales.json')

There I use the interval shorthand notation and I think your problem is fixed: https://github.com/danigb/tonal/blob/master/packages/scale/scales.json#L20

(Basically this repository is deprecated. I have to write a note or delete it)

soichih commented 7 years ago

@danigb Thanks.. I've switched to use it (I had to add "/dist")

const scale = require('tonal-scales/dist/scales.json');

By the way, my algorithm uses semitones number instead of the interval shorthand notation. Is following correct interpretation of it?

//convert interval shorthand notation to semitones (0-11)
const n12 = {
    "1P": 0,
    "2d": 0,

    "1A": 1,
    "2m": 1,

    "2M": 2,

    "2A": 3,
    "3m": 3,

    "3M": 4,
    "4d": 4,

    "4P": 5,

    "4A": 6,
    "5d": 6,

    "5P": 7,

    "5A": 8,
    "6m": 8,

    "6M": 9,
    "7m": 10,
    "7M": 11,
}
danigb commented 7 years ago

Hi,

I don't know what are you trying to do, but you can use tonal directly:

var tonal = require('tonal')
// convert from interval name to semitones
tonal.interval.semitones('5P') // => 7
var scale = tonal.scale.get('super locrian pentatonic') 
tonal.map(scale, tona.interval.semitones) // => the scale semitones
...

Take a look to tonal documentation

Hope it helps