Commit Graph

33 Commits

Author SHA1 Message Date
Dave Yarwood
ecb5aae370 Hack to work around aurora not supporting NO_COLOR 2021-06-28 11:04:48 -04:00
Dave Yarwood
6bd3c3c0fb Gracefully handle "file not found" error when playing a score file 2021-06-06 20:41:10 -04:00
David Lu
6795bc6bf0 Set up preliminary musicxml importer 2021-05-01 20:01:46 -04:00
Dave Yarwood
b3956dde60 scaffolding for better user-facing error messages 2021-01-16 15:27:22 -05:00
Dave Yarwood
228c81171c fix an edge case where "ab =" wasn't throwing an error
Input like "ab =" should result in an error because it's a variable definition
with no content.
2020-11-14 20:35:45 -05:00
Dave Yarwood
e0d11b1ec2 include source context EVERYWHERE
This provides filename/line/column context for any error I could possibly find.
To achieve this, I made it so that all ScoreUpdates have source context, so when
updating the score results in an error, we can print out the line and column
number corresponding to the error.

It's a bit more complicated than that, because score updates are nestable (e.g.
event sequences can contain cram expressions can contain chords, etc.), which
essentially gives us a stacktrace whenever a score update results in an error. I
punted on giving the user the full stacktrace, in favor of doing something
simpler and just showing the bottom-most error, because that's probably going to
be the line and column number that's the most helpful.
2020-11-14 20:34:04 -05:00
Dave Yarwood
f961abfd3c reorganize source context stuff a bit 2020-10-29 20:42:46 -04:00
Dave Yarwood
3bec60084b refactor / create an error type that wraps an error to provide alda source code context 2020-10-29 20:19:03 -04:00
Dave Yarwood
709d669d9c improvements to line/column information in scan/parse error messages
1. Added column to parse error messages.

2. It turns out that we weren't even keeping track of the line and column where
   a token starts, let alone including it in the error message. Added
   `startLine` and `startColumn` fields to the scanner struct, made it so that
   they get updated in sync with the `start` (i.e. start index) field, and made
   it so that we're using the start line and column in error messages, instead
   of the _current_ line and column, which was less helpful.
2020-10-22 20:28:42 -04:00
Dave Yarwood
3d86b5d6c4 CRAM => cram 2020-04-25 16:18:16 -04:00
Dave Yarwood
ed570636b0 use float64 everywhere to fix inaccuracies caused by converting float32 <=> float64 2020-04-18 21:02:35 -04:00
Dave Yarwood
e23f70e16f make log message more accurate 2020-02-23 21:21:38 -05:00
Dave Yarwood
6e2b33bbe1 alda doctor command 2020-02-03 08:08:17 -05:00
Dave Yarwood
01f4382542 cap line length at 80 chars where possible 2019-11-10 07:45:47 -05:00
Dave Yarwood
a6aa4e560a rename OnIterations => OnRepetitions 2019-11-09 22:06:13 -05:00
Dave Yarwood
3588fd4689 make PitchIdentifier an interface instead of implicitly using certain fields of Note in certain situations
In accordance with the "don't make invalid data representable" principle.

This also allows us to create a LispPitch type in alda.lisp, which will just
wrap PitchIdentifier.
2019-11-04 09:32:51 -05:00
Dave Yarwood
67e6931abe consider "slur" to be an attribute of note only, not duration
i.e. a duration cannot be "slurred" anymore, but a note can be slurred
2019-10-30 23:01:16 -04:00
Dave Yarwood
cb09882fef use p.match(this, that) instead of p.match(this) || p.match(that) 2019-10-30 22:58:36 -04:00
Dave Yarwood
1416f7514d allow p.check to accept a variable number of token types 2019-10-30 22:57:44 -04:00
Dave Yarwood
e1b991448f adjust wording in comment 2019-10-29 22:35:26 -04:00
Dave Yarwood
8edaa55c4c WIP: lisp, attributes 2019-06-13 18:33:37 -04:00
Dave Yarwood
3db102922e ToString() => String() (more idiomatic) 2019-05-25 22:16:34 -04:00
Dave Yarwood
daf226e7e3 rename endings => iterations; introduce OnIterations event which can implement ScoreUpdate 2019-05-23 13:04:26 -04:00
Dave Yarwood
2f64fa5206 terminology change: nickname => alias 2019-05-21 22:11:33 -04:00
Dave Yarwood
6698bcc88d fix usage of append on a list 2019-05-21 21:48:13 -04:00
Dave Yarwood
f271855295 bugfix: allow a variable definition to end with EOF 2019-05-05 13:11:16 -04:00
Dave Yarwood
dae6c42d45 bugfix: don't include surrounding quotes in nickname 2019-05-04 21:59:36 -04:00
Dave Yarwood
e091439b2b bugfix: concatenate events instead of appending the slices 2019-05-04 15:02:56 -04:00
Dave Yarwood
7f548d09f9 note lengths can be fractional; model S note lengths in terms of Ms 2019-05-04 14:00:30 -04:00
Dave Yarwood
80367c6ab4 simplify LispSexp as ListList (the distinction should be made downstream) 2019-05-01 09:05:44 -04:00
Dave Yarwood
c49bdea743 rename chord.Updates => chord.Events for consistency 2019-04-30 22:17:04 -04:00
Dave Yarwood
a6c2bde2aa first cut of parser; basic model interfaces/structs 2019-04-29 22:03:47 -04:00
Dave Yarwood
afaed1eed7 [wip]: logging; first stab at scanner 2019-04-21 19:53:03 -04:00