Updated Supported data types (markdown)
@@ -130,7 +130,7 @@ println(myList.contains(1)); # true
|
||||
println(myList.contains(2)); # false
|
||||
```
|
||||
|
||||
Lists that contain only `note`, `int` and `string` values (`list<note, int, string>`) are commonly used as _staff_ - collection of notes (represented by `note`), rests (represented by `int`) and commands (included into `string`) and can be played via one of available audio engines. Because of that, SMNP language introduces so-called _staff construction_ which allows user to easily type staff items, like notes and rests.
|
||||
Lists that contain only `note`, `int` and `map<string><>` values (`list<note, int, map<string><>>`) are commonly used as _staff_ - collection of notes (represented by `note`), rests (represented by `int`) and commands (represented by `map<string><>`) and can be played via one of available audio engines. Because of that, SMNP language introduces so-called _staff construction_ which allows user to easily type staff items, like notes and rests.
|
||||
_Staff construction_ begins with dollar-sign (`$`) which represents the clef at the beginning of real staff.
|
||||
At the end of the staff there is double-pipe (`||`) sign placed. In contrast to regular lists, items aren't separated by comma, just by one whitespace at least. Items can be arbitrary split to small chunks called _measures_, that are delimited by pipe (`|`) sign. At the beginning of every _measure_, user can place _time signature_ which consists of two integers and slash character between them (i.e. `4/4`). From the _time signature_ on, all notes' and rests' durations in each measure must meet the _time signature_ and SMNP evaluator will throw exception if this condition is not meet.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user