A music programming language for musicians. :notes:
New CLI command: alda export
and REPL command: :export
This command exports an Alda score to another format. Currently, the only supported format is MIDI. MIDI files are exported at a resolution of 128 pulses per quarter note (PPQ).
The score is provided in the same way as it is for alda play
and alda parse
: by specifying either a -f / --file
, a string of -c / --code
, or
piping in the code via STDIN.
alda export -f my-score.alda -o my-score.alda
alda export -c 'piano: c8 d e f' -o piano-notes.mid
echo 'piano: c8 d e f' | alda export -o piano-notes.mid
The :export
REPL command takes a single argument, the output filename:
> :export /path/to/desired-filename.mid
The alda parse
JSON output has a couple of new keys: tempo/values
and
tempo/role
. These values are used internally to schedule MIDI notes in a
way that is exportable.
New CLI command: alda instruments
and REPL command: :instruments
This new command lists all available instruments, which is currently the 128
instruments in the General MIDI spec, as well as midi-percussion
.
NB: Alda does have a number of aliases for these instruments, e.g. piano
is
recognized as midi-acoustic-grand-piano
. These aliases are not included in
the list.
Made adjustments to the command that prints for Windows users when running
alda update
to update the Alda client.
For details, see issue #35.
New feature alert!
An "alternate ending"-like feature has been added to the Alda language. The syntax looks like this:
piano:
[ c8 d e f
[g f e4]'1-3
[g a b > c4.]'4
]*4
This allows you to have repeated phrases that can differ on each iteration. In
the example above, each repeat starts with c8 d e f
; on times 1 through 3
through the repeated phrase, the phrase ends with g f e4
, whereas on the 4th
time through, the phrase ends with g a b > c4.
.
Note that these "adjustments" can occur anywhere within the repeated phrase, not necessarily at the end, making this feature of Alda more flexible than the "alternate endings" notation seen in sheet music. To illustrate this, here is another example where the phrase has what you might describe as an "alternate beginning" and an "alternate middle":
piano:
[ [c8 d e]'1,3 [e8 d c]'1,3
f
[g f e]'1-3 [g a b]'4
> c <
]*4
Thanks to @elyisgreat for the initial idea/discussion and @pzxwang for implementing the feature! :balloon:
Whoops! It turns out that the mechanism we had in place in the Alda client for determining whether or not your version of Alda is up-to-date had a flaw that prevents one from updating from Alda 1.0.0-rcXX to Alda 1.0.0!
That's fixed in this version. Also, your client will be able to update to the latest version now because now the latest version is 1.0.1 instead of 1.0.0. :)
This release is functionally equivalent to the previous release, 1.0.0-rc85. After 3 years of working on a series of 1.0.0 release candidates, the focus has shifted toward re-architecting Alda in a way that will allow us to make some substantial improvements. The result of this restructuring will become a new major version of Alda, version 2.0.0.
The work has only just started on Alda 2.0.0, and it will probably be a long while before the initial release in the 2.0.0 series. We will continue to maintain the 1.0.0 series in the meantime. As such, it feels like now is as good a time as any to release Alda 1.0.0!
Made internal improvements to the Alda sound engine. Specifically, the sound engine now uses a Java MIDI Sequencer to schedule and play MIDI notes, whereas before we were using a third party library called JSyn.
You shouldn't notice any difference in note scheduling, but if you do notice any problems, please file an issue in the alda-sound-engine-clj repo so that we can address them!
The schedule
function has been removed from alda.lisp. Scheduled functions
haven't been very useful since we moved to a client/server architecture, and
we haven't implemented a way for them to work with the new changes to the
sound engine. So, we are removing the feature for now. We may re-implement the
scheduled functions feature in the future, in a way that works with both the
client/server architecture and the current implementation of the sound engine.
For more context on this, see alda-core#65.
Added an :info
command to the Alda REPL. It prints some user-readable
information about the current score, for example:
p> :info
Instruments: piano-sFz6g
Current instruments: piano-sFz6g
Events: 6
Markers: start, one, two, three
Thanks, [TBuc], for implementing this new feature!