You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
469 B
34 lines
469 B
4 weeks ago
|
# note
|
||
|
|
||
|
```js
|
||
|
// usage
|
||
|
chance.note();
|
||
|
chance.note({ notes: 'flatkey' });
|
||
|
```
|
||
|
|
||
|
Return a note. 🎵
|
||
|
|
||
|
```js
|
||
|
chance.note();
|
||
|
=> 'B'
|
||
|
|
||
|
chance.note();
|
||
|
=> 'E♭'
|
||
|
```
|
||
|
|
||
|
Options
|
||
|
flatKey - chromatic scale with flat notes (default)
|
||
|
sharpKey - chromatic scale with sharp notes
|
||
|
flats - just flat notes
|
||
|
sharps - just sharp notes
|
||
|
naturals - just natural notes
|
||
|
all - naturals, sharps and flats
|
||
|
|
||
|
```js
|
||
|
chance.note({notes: 'flats' });
|
||
|
=> 'A'
|
||
|
|
||
|
chance.note({notes: 'sharps' });
|
||
|
=> 'F♯'
|
||
|
```
|