An open API service indexing awesome lists of open source software.

https://github.com/fantasyui-com/musical-notation

Simple and lightweight musical notation based on beat sequencers and inspired by good ideas.
https://github.com/fantasyui-com/musical-notation

Last synced: about 1 year ago
JSON representation

Simple and lightweight musical notation based on beat sequencers and inspired by good ideas.

Awesome Lists containing this project

README

          

# musical-notation
Simple and lightweight musical notation based on beat sequencers and inspired by good ideas.

This is it:

```

[----][-x--][----][-x--]
[----][-x--][----][-x--]
[-x--][-x--][-x--][-x--]
[-x--][----][-x--][----]
[-x--][----][-x--][----]

```

Hyphen means empty space
brackets help you see divisions
and x marks the spot.

## About

This is a javascript library that converts the above notation to a multidimensional array, a matrix.

```JavaScript

input = `
[----][-x--][----][-x--]
[----][-x--][----][-x--]
[-x--][-x--][-x--][-x--]
[-x--][----][-x--][----]
[-x--][----][-x--][----]
`;

```

```JavaScript

output = [
[ 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0 ],
[ 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0 ],
[ 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0 ],
[ 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0 ],
[ 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0 ]
]

```