Robert Bendun
cb13dc9591
Refactored operators, loosing binary requirements due to them
...
Due to addition of turning binary operators into functions, they can now
be called with more or less then 2 arguments, which would trigger
assertions. Not all were converted to support new call syntax though
2022-09-17 00:34:41 +02:00
Robert Bendun
0743a9b7c4
Added pause
...
It's faking to be a note, but does not play anything when played
2022-09-11 16:19:10 +02:00
Robert Bendun
d77f844c81
Hashing functions; builtins hash, uniq and unique
2022-09-05 23:17:40 +02:00
Robert Bendun
ab0ba8d4c8
Algorithms like min don't flatten all the way
...
To restore previous behaviour one can use `min (flat x)`
2022-09-05 22:30:11 +02:00
Robert Bendun
de92564cc1
Error reporting improvement for number operations; added power operator
2022-09-04 19:44:33 +02:00
Robert Bendun
497a4bcc6a
Improvement of builtin functions; added try builtin
...
Including moving functions from lambdas into global scope, adding
documentation, improvement of error reporting
2022-09-04 17:46:04 +02:00
Robert Bendun
aabcc42625
Error reporting when too many closing parens at the end
2022-09-04 13:48:06 +02:00
Robert Bendun
1597b678e1
Report error when index is too large
2022-09-04 13:16:40 +02:00
Robert Bendun
2b29522293
New operator: modulo operator '%'
2022-08-29 20:37:11 +02:00
Robert Bendun
43555cbc1c
Improved interactive mode interaction with errors
2022-08-21 20:24:49 +02:00
Robert Bendun
cb5eedb2a5
Unexpected empty source error improved
2022-08-21 20:01:59 +02:00
Robert Bendun
183907a0ed
Improved error location reporting
2022-08-21 19:24:33 +02:00
Robert Bendun
5c47b7b808
par
improvement: allow actions like octave changes inside
...
This is implemented with default action idea. During evaluation of
expresions sequence all but return expressions is passed to
default_action. Par sets default action to `action_play` which plays
given value if it's musical value.
2022-08-21 15:52:54 +02:00
Robert Bendun
2452b95a90
Par now accepts arrays
2022-08-21 14:49:39 +02:00
Robert Bendun
e3164395de
Range function for Musique language
2022-08-21 13:45:34 +02:00
Robert Bendun
eb36ad2c93
Implemented Number::{ceil, floor, round, pow, inverse}
...
Except that pow only accepts integer exponents, since nth root is not
that quick to implement and simple blind implementation may have
performance issues.
2022-08-21 00:43:04 +02:00
Robert Bendun
ab6ed8f45c
Report nice error when without MIDI connection
2022-08-19 16:06:33 +02:00
Robert Bendun
7fb6df219c
Successfully separated small portion of include/musique.hh
2022-08-18 22:48:11 +02:00
Robert Bendun
0b3dc2bb57
Move src/musique.hh to include/musique.hh
...
This is preparation for separation of public musique interface and
implementation details shared across files.
2022-08-18 22:44:04 +02:00