# A music programming language for musicians. :notes:

##### Overview

Installation | Docs | Changelog | Contributing

composers chatting

Alda is a text-based programming language for music composition. It allows you to compose and play back music using only your text editor and the command line.

piano:
o3
g8 a b > c d e f+ g | a b > c d e f+ g4
g8 f+ e d c < b a g | f+ e d c < b a g4
<< g1/>g/>g/b/>d/g


For more examples, see these example scores.

The language's design equally favors aesthetics, flexibility and ease of use.

(Why compose music this way instead of in a graphical sheet music notation program? See this blog post for a brief history and rationale.)

## Features

• Easy to understand, markup-like syntax.
• Designed for musicians who don't know how to program, as well as programmers who don't know how to music.
• A score is a text file that can be played using the alda command-line tool.
• Interactive REPL lets you enter Alda code and hear the results in real time.
• Supports writing music programmatically (for algorithmic composition, live coding, etc.)
• Create MIDI music using any of the instruments in the General MIDI Sound Set

### TODO

If you'd like to help, come on in -- the water's fine!

## Installation

See the official website for instructions to install the latest release of Alda.

## Demo

First start the Alda server (this may take a minute):

alda up


To play a file containing Alda code:

alda play --file examples/bach_cello_suite_no_1.alda


To play arbitrary code at the command line:

alda play --code "piano: c6 d12 e6 g12~4"


To start an Alda REPL:

alda repl


## Documentation

Alda's documentation can be found here.

## Contributing

We'd love your help -- Pull Requests welcome!

The Alda project is composed of a number of subprojects, each of which has its own GitHub repository within the alda-lang organization.

For a top-level overview of things we're talking about and working on across all of the subprojects, check out the Alda GitHub Project board.

For more details on how you can contribute to Alda, see CONTRIBUTING.md.

Another way you can contribute is by sponsoring Dave in the future development of Alda.

Slack: Joining the Alda Slack group is quick and painless. Come say hi!

Reddit: Subscribe to the /r/alda subreddit, where you can discuss all things Alda and share your Alda scores!

• #### Alda not starting workers in some cases

Forked from the comments of https://github.com/alda-lang/alda/issues/266#issuecomment-248302194

Since upgrading to rc41 from rc31, alda doesn't spawn workers on my windows machine:

λ alda up
[27713] Starting Alda server...
[27713] Server up ?
[27713] Starting worker processes...
[ this hangs, I waited for 5 minutes ]
^C

λ alda status
[27713] Server up (0/2 workers available)

bug
opened by 0atman 60
• #### Improve instance/group assignment + "." group-member operator

Consider the following code:

piano:
piano "piano1":

piano: o4 c d e f g a b > c
piano1: o4 e f g a b > c d e


When played, it plays normally. However, if I switch the declaration of the instruments at the top

piano "piano1":
piano:

piano: o4 c d e f g a b > c
piano1: o4 e f g a b > c d e


piano1 does not start playing until piano has finished its melody. The order of the melodies at the bottom does not matter, so

piano "piano1":
piano:

piano1: o4 e f g a b > c d e
piano: o4 c d e f g a b > c


will play piano1 first and then play piano.

And if they're both named, there is no problem. both of the scores below play normally.

piano "piano1":
piano "piano2":

piano1: o4 c d e f g a b > c
piano2: o4 e f g a b > c d e

piano "piano2":
piano "piano1":

piano1: o4 c d e f g a b > c
piano2: o4 e f g a b > c d e

low-hanging fruit
opened by elyisgreat 60
• #### Javascript implementation of REPL + Web Audio API

I am loosely aware of the ability, via clojurescript, to get clojure running in native javascript. If it's possible for the parser to be ported to javascript I would be happy to build the website that surrounds it and plug in the web audio API so folks can aldajam in the browser.

Any idea what would be involved in porting the parser to JS?

opened by kylestetz 36
• #### Refining variables

I noticed that variables were finally implemented in the latest release of alda. However with the new note spacing rules I find that writing is much more restrictive. Thus, I suggest a literal for variables; that way the note spacing rules can be more relaxed, however variables would still be clearly marked. A single quote literal '<variable>' is a possibility, as well as having something like a character before a variable '<variable> to indicate that it is one (similar to markers), however I would like to hear other suggestions.

enhancement
opened by elyisgreat 35
• #### Refine and document Alda installation/usage on Windows

A large handful of people have noted experiencing problems installing and running Alda in a Windows environment. #47 is a good example of an error that at least 2 other people have noted running into.

Open questions:

• Is it possible to run a standalone executable Boot script in Windows?

The alda executable does start with #!/usr/bin/env boot. On OS X, I am able to run alda globally by making this file executable and copying it a directory in my $PATH. I am also able to run it by running boot ~/Code/alda/bin/alda. I can reproduce the "No such task (alda)" issue by cd-ing into ~/Code/alda/bin and trying to run boot alda, probably because Boot can't know if alda is supposed to be a task or a file. Clarifying that it's a file by running boot ./alda fixes it. • Can a Windows user simply copy the alda executable script into a directory in their path and be able to run alda from any directory? Subquestion: Does a file need to be a .exe in order to be added to the path? • Why doesn't running boot D:\path\to\alda (with boot.exe on the user's path) work? ... Does it work? Would greatly appreciate any insight from Windows power users, or better yet, Windows users familiar with running Boot. I am a Windows n00b. documentation opened by daveyarwood 33 • #### Massive CPU usage I tried the latest version of alda today (alda update), and found that running alda up maxed out my machine's CPU and basically locked it up with loadaverages over 80(!). Here are the offending threads: What's happened in the last 10 days? My machine is very powerful, and more importantly didn't used to have this problem. My version: $ alda repl
Sep 16, 2016 1:25:00 PM com.jsyn.engine.SynthesisEngine start
INFO: Pure Java JSyn from www.softsynth.com, rate = 44100, RT, V16.7.3 (build 457, 2014-12-25)
Preparing MIDI system... done.

█████╗ ██╗     ██████╗  █████╗
██╔══██╗██║     ██╔══██╗██╔══██╗
███████║██║     ██║  ██║███████║
██╔══██║██║     ██║  ██║██╔══██║
██║  ██║███████╗██████╔╝██║  ██║
╚═╝  ╚═╝╚══════╝╚═════╝ ╚═╝  ╚═╝

v1.0.0-rc38
repl session


My machine:

$uname -a Linux T420 4.7.2-1-ARCH #1 SMP PREEMPT Sat Aug 20 23:02:56 CEST 2016 x86_64 GNU/Linux  My jvm: $ java -version
java version "1.8.0_102"
Java(TM) SE Runtime Environment (build 1.8.0_102-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.102-b14, mixed mode)

bug
opened by 0atman 29
• #### Implement [C]razy [R]hythm [A]lda [M]agic

Closes #9

feature
opened by crisptrutski 24
• #### MIDI audio is delayed after suspending the server

I get pretty much immediate responses from the server* after first running it, but after leaving the server running for a while (e.g. if I leave my computer and come back hours later), it may take several seconds or more before I hear anything. Restarting the server fixes it.

*meaning, if I run alda play -r -c 'piano: c', I hear the note immediately

No idea what the issue is at this point, but figured I would report it in case anyone has any ideas.

bug
opened by daveyarwood 23
• #### Inline Clojure code

Closes #94.

This introduces a major change to alda.parser -- anything between parentheses is now interpreted as a Clojure expression and evaluated with the help of a custom reader that will attempt to resolve symbols in the alda.lisp namespace whenever possible. There is also some regex hackery that allows things like (volume 50, tempo 120) to still work by splitting on commas and semicolons (intelligently*) and turning them into separate S-expressions like (do (volume 50) (tempo 120)).

*Commas and semicolons inside strings and as character literals still function as they normally do in Clojure.

As a side effect of this, (* the old (and not so great) long comment syntax *) had to be deprecated. R.I.P.

For full backwards compatibility, I've also extended the defattribute macro so that it defines more functions for use in the alda.lisp namespace (and by extension, in Alda code) -- you can now call any alias of an attribute as a function (e.g. (vol 50) instead of having to do (set-attribute :vol 50)), and you can set global attributes by appending a ! after the function name (e.g. (vol! 50) instead of (global-attribute :vol 50))

I also happened to notice a bug with the :play function not fully resetting instruments' attributes (octave, volume, etc.) before playing a score from the beginning, leading to inconsistent playback. I'm including a fix for that in this PR as well.

feature
opened by daveyarwood 23
• #### Support "from" and "to" for playing

Not quite done with this yet, but perhaps ready for feedback.

There are some performance-oriented things here, like making some functions lazy, a lower-overhead trick than (doall (pmap ..)) and using transducers in some places.

Will be back this evening to finish this off - supporting labels, typing in with CLI and REPL commands, and adding tests

feature
opened by crisptrutski 22

# 🐞 Bug report 🐞

## Description

I tried to play alda file at window system , and that's not work ,even i use the file from the example

alda play -c "..." is work , can play some suff alda repl is work too and i use the jdk from eclipse foundation version are 16.0.2.7

PS C:\Users\...> alda play --file bach_cello_suite_no_1.alda
bach_cello_suite_no_1.alda:1:1 Unexpected '' at the top level


## Environment

Operating system and version:

Alda version:

$alda version alda 2.0.5  $ alda-player info
alda-player 2.0.5
log path: C:\Users\..


Health check:

$alda doctor [32mOK [0m Parse source code [32mOK [0m Generate score model [32mOK [0m Ensure that there are no stale player processes [32mOK [0m Find an open port [32mOK [0m Send and receive OSC messages [32mOK [0m Locate alda-player executable on PATH [32mOK [0m Check alda-player version [32mOK [0m Spawn a player process [32mOK [0m Ping player process [32mOK [0m Play score [32mOK [0m Export score as MIDI [32mOK [0m Locate player logs [32mOK [0m Player logs show the ping was received [32mOK [0m Shut down player process [32mOK [0m Spawn a player on an unknown port [32mOK [0m Discover the player [32mOK [0m Ping the player [32mOK [0m Shut the player down [32mOK [0m Start a REPL server nREPL server started on port 49661 on host localhost - nrepl://localhost:49661 [32mOK [0m Find the REPL server [32mOK [0m Interact with the REPL server [32mOK [0m Shut down the REPL server  Logs: bug opened by 715yeung 0 • #### c0 causes a note to play forever, is it working as intended? # 🐞 Bug report 🐞 ## Description c0 causes a note to play forever ## Steps to Reproduce piano: c4 c4 c0 Yes ## Expected Behavior Seems like it should have been an error or forbidden? (I haven't dug into the code but instead just skimmed through the Notes documentation.) ## Actual Behavior ## Environment Operating system and version: Alda version: $ alda version
alda 2.0.5

$alda-player info alda-player 2.0.5 log path: [skipped here]  Health check: $ alda doctor
OK  Parse source code
OK  Generate score model
OK  Ensure that there are no stale player processes
OK  Find an open port
OK  Send and receive OSC messages
OK  Locate alda-player executable on PATH
OK  Check alda-player version
OK  Spawn a player process
OK  Ping player process
OK  Play score
OK  Export score as MIDI
OK  Locate player logs
OK  Player logs show the ping was received
OK  Shut down player process
OK  Spawn a player on an unknown port
OK  Discover the player
OK  Ping the player
OK  Shut the player down
OK  Start a REPL server
nREPL server started on port 51860 on host localhost - nrepl://localhost:51860
OK  Find the REPL server
OK  Interact with the REPL server
OK  Shut down the REPL server


Logs:

bug
opened by xcoderreal 1

# 🐞 Bug report 🐞

## Description

I use Sublime Text as the editor, the error comes out when I build the code with ctrl + B:

{ Oops! Something went wrong: open "C:\ALDA\test.alda": The filename, directory name, or volume label syntax is incorrect.

This might be a bug. For help, consider filing an issue at: https://github.com/alda-lang/alda/issues/new/choose

Or come chat with us on Slack: https://slack.alda.io }

However, I can run it in cmd window with alda play -f C:\ALDA\test.alda I already installed the ALDA package in Sublime Text, the code has color in different syntax.

## Environment

Operating system and version:

Alda version:

$alda version alda 2.0.5  $ alda-player info
alda-player 2.0.5
log path: C: \Users\ASUS\AppData\Local\alda\cache\logs


Health check:

$alda doctor [32mOK [0m Parse source code [32mOK [0m Generate score model [32mOK [0m Ensure that there are no stale player processes [32mOK [0m Find an open port [32mOK [0m Send and receive OSC messages [32mOK [0m Locate alda-player executable on PATH [32mOK [0m Check alda-player version [32mOK [0m Spawn a player process [32mOK [0m Ping player process [32mOK [0m Play score [32mOK [0m Export score as MIDI [32mOK [0m Locate player logs [32mOK [0m Player logs show the ping was received [32mOK [0m Shut down player process [32mOK [0m Spawn a player on an unknown port [32mOK [0m Discover the player [32mOK [0m Ping the player [32mOK [0m Shut the player down [32mOK [0m Start a REPL server nREPL server started on port 54314 on host localhost - nrepl://localhost:54314 [32mOK [0m Find the REPL server [32mOK [0m Interact with the REPL server [32mOK [0m Shut down the REPL server  Logs:   bug opened by mx91064728 1 • #### alda telemetry should be opt-in # 🐞 Bug report 🐞 ## Description Upon using the alda CLI, it mentions it collects data in the following window: ┌─────────────────────────────────────────────────────────────────┐ │ │ │ The Alda CLI collects the following anonymous usage statistics: │ │ │ │ • Operating system │ │ • Alda version │ │ • Command run, without arguments/options (e.g. alda play) │ │ │ │ No personal information is collected. │ │ │ │ If you wish to disable anonymous usage reporting, you can run: │ │ │ │ alda telemetry --disable │ │ │ └─────────────────────────────────────────────────────────────────┘  There are some concerns I have about this: • This should be opt-in rather than opt-out. Let users decide if they want to send data. • Is any data collected when this initial message is sent? • Which endpoint(s) does the data get sent to? ## Steps to Reproduce 1. Install alda for the first time. 2. Use any alda CLI command (Ex. alda play). ### Does the problem happen consistently? Yes ## Expected Behavior alda asks if the user wants to enable telemetry to help improve the software. ## Actual Behavior alda tells the user that telemetry is enabled by default and tells them how to disable it. ## Environment Operating system and version: Linux Mint 20.2 Uma Alda version: $ alda version
alda 2.0.5

$alda-player info alda-player 2.0.5  Health check: $ alda doctor
OK  Parse source code
OK  Generate score model
OK  Ensure that there are no stale player processes
OK  Find an open port
OK  Send and receive OSC messages
OK  Locate alda-player executable on PATH
OK  Check alda-player version
OK  Spawn a player process
OK  Ping player process
OK  Play score
OK  Export score as MIDI
OK  Locate player logs
OK  Player logs show the ping was received
OK  Shut down player process
OK  Spawn a player on an unknown port
OK  Discover the player
OK  Ping the player
OK  Shut the player down
OK  Start a REPL server
nREPL server started on port 44005 on host localhost - nrepl://localhost:44005
OK  Find the REPL server
OK  Interact with the REPL server
OK  Shut down the REPL server

bug
opened by kimimaru4000 1

# 🐞 Bug report 🐞

## Environment

Operating system and version:

Alda version:

$alda version  $ alda-player info



Health check:

$alda doctor [email protected] ~ % alda doctor OK Parse source code OK Generate score model OK Ensure that there are no stale player processes OK Find an open port OK Send and receive OSC messages OK Locate alda-player executable on PATH OK Check alda-player version OK Spawn a player process ERR Ping player process --- Oops! Something went wrong: dial tcp 127.0.0.1:63631: connect: connection refused This might be a bug. For help, consider filing an issue at: https://github.com/alda-lang/alda/issues/new/choose Or come chat with us on Slack: https://slack.alda.io [email protected] ~ % **Logs:** <!--- On macOS and Linux, you can find Alda's logs in either --> <!--- ~/.cache/alda (Linux), or --> <!--- ~/Library/Caches/alda (macOS), or --> <!---$XDG_CACHE_HOME (if you have that set) -->

<!--- On Windows, look in: -->
<!---   %LOCALAPPDATA%\alda\cache or -->
<!---   C:\Users\yourname\AppData\Local\alda\cache -->

<!--- Do you see any logs that might be relevant to the problem? -->
<!--- If so, copy-paste what you found below -->

bug
opened by kksun007 9
• #### Run Alda in the browser

My primary motivation is to have a "Try It" area on the Alda website, similar to what you find on the Haskell website, where you can enter snippets of Alda code, press a "play" button and hear the result.

There was also a request (#391) for playable demos of the example code in the Alda documentation, which I think is a great idea.

I've been thinking about either compiling the Alda client (written in Go) to WebAssembly, or using GopherJS to compile it to JavaScript. That should allow us to parse Alda scores in the browser and hopefully send OSC messages.

We'll also need to implement the player process (written in Kotlin) in the browser. It looks like it's possible to compile Kotlin to JavaScript, so maybe that will help. Although, I used Java inter-op quite heavily, both to use the JVM MIDI synthesizer/sequencer and to do sophisticated things with concurrency. So, I suspect that it might be challenging to try to reuse the same code base to generate a player process in JS. We might end up needing to write a port in JavaScript from scratch instead, which wouldn't be the end of the world. Ideally, we could use the same code base, though, so that we can avoid the two implementations drifting apart over time.

feature
opened by daveyarwood 13
• #### It would be good to have a mini player along side each snippet in documentation

Something like Go playground where the user gets a small icon in the code snippet to execute the code online without installing Go. We can maybe also allow people to try out their own code.

feature documentation
opened by quaintdev 1

# 🔧 Feature request 🔧

## Description

For now we have to select instruments by saying something like midi-steel-drums: or midi-brass-section: etc., which I think is cumbersome in some situations. There are already "program change" numbers in General MIDI, it would be nice if we can also say program 1: for piano, program 12: for vibraphone, etc. (see here)

Also, there are nine standard drum kits/sets in the General MIDI 2 specification (see here, and also Roland GS and Yamaha XG), and most MIDI equipments/general-purpose soundfonts support that. So instead of saying midi-percussion:, it would be nicer if we can say drum-kit standard:, drum-kit power: and drum-kit brush: etc. to switch to different drum kits.

## Examples

To select piano: program 1: o4 c8 d e f g2

To select the "Power" drum kit (which is program number 17): drum-kit power: o2 c4 e c8 c e4

or

drum-kit 17: o2 c4 e c8 c e4

feature
opened by wiwikuan 1

# 🔧 Feature request 🔧

## Description

Alda is great! But the Java Gervill MIDI player's default reverb setting is just too high (I don't want that much reverb in my music), and I don't have control to any other standard MIDI CC message.

## Examples

It would be nice if I can say (reverb! 0) to turn off the reverb globally. And it would be even nicer if I can say something like (chrous 40) or (CC1 100) to set any other MIDI controllers.

Also, the value of MIDI controllers are typically 0-127 (instead of 0-100), I don't know if it's better to map the values from 0-100 to 0-127, or just use 0-127 in the code.

feature
opened by wiwikuan 2
• #### Possibility of supporting backward search

What I refer to by saying backward search is to seek the position in the Alda codes corresponding to a certain point in the music.

This is a natural demand. Music notation software (MuseScore, Overture, Sibelius, etc.) is mostly able to play the score while the user is able to see a cursor moving through the score indicating where in the score it is playing. As for Alda codes, a similar functionality is to backward search. While an Alda score is played, the text editor could select the texts that are being played. (In most cases there are multiple elements being played at the same time, but it should not be a problem for text editors that support multiple selection (Sublime Text, Vim (with proper plugins).)

Here is an idea about how to implement this functionality.

1. Use alda parse to get all the data: at what time (offset) will a note be played.
2. Run alda play to play the score
3. Noting that there is a latency between the time when we run alda play and the time when the score starts to be actually played, there should be a callback for Alda to let other programmes know when the score is actually played.
4. The text editor start timing when Alda tells it that the score is played, while selecting texts according to the time and the data gotten from the first step.

To make this backward searching possible, Alda should be able to do the two things:

• In the output of alda parse, include the info about where a certain event is in the text (from which line and which column to which line and which column);
• While running alda play, call a callback to indicate when the score is actually played (the callback can be some command that we parse as an argument at command line; in the callback, for example, we can use kill command to send a signal (say, USR2) to notify the other program).
feature
opened by UlyssesZh 1
• #### 1.5.0(Jun 30, 2021)

IMPORTANT: This is the last release in the Alda 1.x series, however Alda 2.x is now available!

Or, if you already have Alda (< 1.5) installed, you can run alda update twice. The first time will update to Alda 1.5.0, which has the ability to upgrade itself to Alda 2.0.0. Running alda update a second time will update to the latest version.

## 1.5.0 (2021-06-30)

• Updated the alda update mechanism to support updating to Alda 2.x.

• Print a PSA that Alda 2 is available on startup.

Source code(tar.gz)
Source code(zip)
alda(7.66 MB)
alda.exe(7.69 MB)

## 1.4.3 (2020-09-29)

• Fixed the formatting of the :help load command (help text for the :load command) in the REPL. There were a couple of newlines missing.

• Fixed string formatting in the error message that you get when you place a marker at an unclear location. (See [alda-core PR

Source code(tar.gz)
Source code(zip)
alda(7.66 MB)
alda.exe(7.68 MB)

## 1.4.1 (2020-04-17)

• Fixed a minor bug related to alternate endings / repetitions, where input like the following would fail to parse correctly:

[[c] [d]'1]*1


The bug had to do with using event sequences in combination with the alternate endings feature.

Source code(tar.gz)
Source code(zip)
alda(7.66 MB)
alda.exe(7.68 MB)

## 1.4.0 (2020-03-19)

• The volume change messages that end up in the MIDI sequences generated by Alda (the values come from the Alda track-volume attribute) used to be Channel Volume (7) messages, but are now Expression (11) messages.

As [truj] pointed out in [alda-lang/alda-core

Source code(tar.gz)
Source code(zip)
alda(7.79 MB)
alda.exe(7.82 MB)

## 1.3.4 (2020-03-14)

• Fixed a minor bug where the parser would fail to recognize that a note at the end of a part that ends with a ~ followed by a | is supposed to be slurred.

In other words, it was treating c4~ | at the end of an instrument part as an un-slurred note, when it's supposed to be slurred.

• Fixed buggy error handling logic in the case of an unhandled exception. Before, we were inadvertently hiding the exception and the message ended up being "null." Now the exception message gets through.

Source code(tar.gz)
Source code(zip)
alda(7.79 MB)
alda.exe(7.82 MB)

## 1.3.3 (2019-08-16)

• New alda.lisp function, midi-note, is available as an alternative to pitch that is occasionally useful for algorithmic compositions, etc. For example, instead of (note (pitch :c :sharp)), you can specify the MIDI note number, (note (midi-note 61)).
Source code(tar.gz)
Source code(zip)
alda(7.79 MB)
alda.exe(7.81 MB)

## 1.3.1 (2019-05-05)

• Tabs can now be used as whitespace in an Alda score.

• Fixed a bug where attempting to play an empty score (e.g. c d e, which results in an empty score because there are no instruments) results in a NullPointerException.

The problem was that there were no instruments, so the MIDI system wasn't being set up. However, we expect the MIDI system to be set up even if there are no instruments and no notes to play, because we use the MIDI Sequencer to schedule notes.

Source code(tar.gz)
Source code(zip)
alda(7.69 MB)
alda.exe(7.72 MB)

## 1.3.0 (2019-04-14)

• 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.

Source code(tar.gz)
Source code(zip)
alda(7.69 MB)
alda.exe(7.72 MB)

## 1.2.0 (2019-01-19)

• 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.

Source code(tar.gz)
Source code(zip)
alda(6.81 MB)
alda.exe(6.84 MB)

## 1.1.0 (2018-12-01)

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:

Source code(tar.gz)
Source code(zip)
alda(6.81 MB)
alda.exe(6.84 MB)

## 1.0.1 (2018-11-24)

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!

Source code(tar.gz)
Source code(zip)
alda(6.81 MB)
alda.exe(6.83 MB)

## 1.0.0 (2018-11-24)

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!

Source code(tar.gz)
Source code(zip)
alda(6.81 MB)
alda.exe(6.84 MB)

## 1.0.0-rc85 (2018-10-28)

• 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.

Source code(tar.gz)
Source code(zip)
alda(6.81 MB)
alda.exe(6.84 MB)

## 1.0.0-rc81 (2018-03-08)

• 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!

Source code(tar.gz)
Source code(zip)
alda(7.09 MB)
alda.exe(7.11 MB)

## 1.0.0-rc80 (2018-02-28)

• Fixed a minor bug in the parser: there was an edge case where a "get variable" event wasn't being disambiguated from its earlier, less-specific "name" form if the "get variable" event happened to be the last thing in the definition of another variable.

Thanks to @elyisgreat for spotting the bug!

Source code(tar.gz)
Source code(zip)
alda(7.09 MB)
alda.exe(7.11 MB)

## 1.0.0-rc79 (2018-02-16)

• Fixed a minor bug in the parser that is only evident when using the alda parse command. The bug was that in certain situations where the code is syntactically valid, but there is an error at score build time (e.g. piano: undefined where a variable is referenced that has not been defined), the parser was returning nil instead of throwing an error.
Source code(tar.gz)
Source code(zip)
alda(7.09 MB)
alda.exe(7.11 MB)

## 1.0.0-rc77 (2018-02-03)

• On Windows, Alda processes would show up in Task Manager as "A music programming language for musicians" due to confusion on my part (as a non-Windows user) about the properties of a Windows executable. Now they ought to show up as "Alda" so you can easily identify them.

• Fixed a bug in the Alda REPL where the :play from and to options were being completely ignored.

• Fixed a separate bug where the --from command-line option to alda play was being ignored.

• Fixed issues where ! is not escaped properly in the Alda REPL.

This is something that had been fixed previously in the Clojure version of the Alda REPL, but not ported over when we rewrote the REPL as part of the Java client.

For context, see this issue.

• Enabled persistent history for the Alda REPL. For example, if you start a REPL session and enter a bunch of lines of input, then close the session and start a new one, you can access the lines you typed in the previous session by pressing the Up arrow.

History is stored in a file at ~/.alda-repl-history.

Source code(tar.gz)
Source code(zip)
alda(7.09 MB)
alda.exe(7.11 MB)

## 1.0.0-rc76 (2017-10-30)

• Fixed a bug in the way the program path is determined when a server starts workers. (That code lives in alda.util, in this repo.) The bug was showing itself when the path to the alda (or alda.exe) executable contained spaces or other special characters. This was causing the worker processes not to start in environments where the path to alda (or alda.exe) contains spaces.

Thanks to @Hemaolle for the detective work and PR to fix this issue!

Source code(tar.gz)
Source code(zip)
alda(7.09 MB)
alda.exe(7.11 MB)

## 1.0.0-rc75 (2017-10-17)

• Added a reference-pitch (alias: tuning-constant) attribute, which will have an affect on the pitch of each note in Hz. This number is the desired pitch of A4 (the note A in the 4th octave). The default value is 440 Hz.

However, please note that this value is not currently used. We are still figuring out how to tune MIDI notes in Java -- it is more difficult that one might expect. If you're interested in helping with this, please let us know!

• Added a transposition (alias: transpose) attribute, which moves all notes (either per-instrument, or globally, depending on whether you are using transpose or transpose!) up or down by a desired number of semitones. Positive numbers represent increasing semitones, and negative numbers represent decreasing semitones.

This attribute can be used to make writing parts for transposing instruments more convenient. To see transpose in use, see this example score, a transcription of a saxophone quartet by Juan Santiago Jiménez.

Saxophones are transposing instruments; soprano and tenor saxophones are considered "Bb" instruments, and alto and baritone saxophones are considered "Eb" instruments. This means that an instrument part written for a baritone saxophone, for example, might appear to be written in C major, but when read and performed by a baritone saxophonist, it will sound like Eb major, the intended key.

Thanks, [pzxwang], for implementing these new features!

Source code(tar.gz)
Source code(zip)
alda(7.08 MB)
alda.exe(7.11 MB)

## 1.0.0-rc74 (2017-10-14)

• Minor improvement to the new tempo function overload and metric-modulation function: the supplied note-length can be a string representing multiple note lengths tied together, e.g.:

(tempo "4~16" 120)


Thanks to [elyisgreat] for the issue and [pzxwang] for the pull request!

• Fixed a strange issue in the client where, after updating Alda successfully, a java.lang.NoClassDefFoundError would be printed.

Source code(tar.gz)
Source code(zip)
alda(7.08 MB)
alda.exe(7.11 MB)

## 1.0.0-rc73 (2017-10-12)

• Improved the timing of waiting for the server to stop before starting a new one when running the alda downup command.

Before, this was just guesswork, and often times, the server wouldn't be down yet, so when a new server tried to start, it would fail with the message:

There is already a server trying to start on this port. Please be patient -- this can take a while.


Now, we're actually checking to see when the server stops responding, and waiting until that's the case before we try to start a new server.

Unfortunately, there is still a bit of guesswork here because the message above is triggered by (assuming you're running OS X or Linux) a check to see if there is an Alda server process in your OS that was started on the same port you are trying to use. There is still a brief window of time between when the server stops responding to requests and when the process has terminated.

As such, I think there is room for improvement in the future, and you might still see the message above from time to time. But, with this release, things should at least be better than they were before.

• Expanded the scope of the -t / --timeout option to include how long (in seconds) the Alda command-line client should wait, after running alda down or alda downup, for confirmation that the server has gone down. The default value is still 30 seconds, which should be more than enough time on most systems.

Source code(tar.gz)
Source code(zip)
alda(7.08 MB)
alda.exe(7.11 MB)

## 1.0.0-rc72 (2017-10-09)

• Added an overload of tempo that allows you to specify the tempo in terms of a note value other than (the default) a quarter note.

For example, "♩. = 150" can be expressed as:

(tempo! "4." 150)


(NB: the note value can be either a number or a string containing a number followed by dots.)

It is still OK to leave out the note value; the default behavior is to set the tempo relative to a quarter note. "♩ = 60" can still be expressed as:

(tempo! 60)

• Added a new function, metric-modulation, which sets the tempo based on a metric modulation, i.e. shifting from one meter to another.

Say, for example, that you're writing a score that starts in 9/8 -- three beats per measure, where each beat is a dotted quarter note.

At a certain point in the piece, you want to transition into a 3/2 section -- still three beats per measure, but now each beat is a half note. You want the "pulse" to stay the same, but now each beat is subdivided into 4 half notes instead of 3. How do you do it?

In traditional notation, it is common to see annotations like "♩. = 𝅗𝅥 " at the moment in the score where the time signature changes. This signifies that at that moment, the pulse stays the same, but the amount of time that used to represent a dotted quarter note now represents a half note. When the orchestra arrives at this point in the score, the conductor continues to conduct at the same "speed," but each musician mentally adjusts his/her perception of how to read his/her part, mentally subdividing each beat into 4 eighth notes instead of 3 eighth notes.

In Alda, you can now express a metric modulation like "♩. = 𝅗𝅥 " as:

(metric-modulation! "4." 2)


Thanks, [pzxwang], for the PR to add these new features!

Source code(tar.gz)
Source code(zip)
alda(7.08 MB)
alda.exe(7.11 MB)

## 1.0.0-rc71 (2017-10-07)

• Added an --output (-o) option to the alda parse command that allows you to specify what should be output. Valid values are:

• data (default) is the map of score data that includes instruments, events, etc.

• events is the sequence of events parsed from the score.

For example (using [jq][jq] to pretty-print the JSON for readability):

# score data output
$alda parse -c 'piano: c d e' | jq . { "chord-mode": false, "current-instruments": [ "piano-cnLzW" ], "events": [ { "offset": 500, "instrument": "piano-cnLzW", "volume": 1, "track-volume": 0.7874015748031497, "panning": 0.5, "midi-note": 62, "pitch": 293.6647679174076, "duration": 450, "voice": null }, { "offset": 0, "instrument": "piano-cnLzW", "volume": 1, "track-volume": 0.7874015748031497, "panning": 0.5, "midi-note": 60, "pitch": 261.6255653005986, "duration": 450, "voice": null }, { "offset": 1000, "instrument": "piano-cnLzW", "volume": 1, "track-volume": 0.7874015748031497, "panning": 0.5, "midi-note": 64, "pitch": 329.6275569128699, "duration": 450, "voice": null } ], "beats-tally": null, "instruments": { "piano-cnLzW": { "octave": 4, "current-offset": { "offset": 1500 }, "key-signature": {}, "config": { "type": "midi", "patch": 1 }, "duration": { "beats": 1, "ms": null }, "min-duration": null, "volume": 1, "last-offset": { "offset": 1000 }, "id": "piano-cnLzW", "quantization": 0.9, "duration-inside-cram": null, "tempo": 120, "panning": 0.5, "current-marker": "start", "time-scaling": 1, "stock": "midi-acoustic-grand-piano", "track-volume": 0.7874015748031497 } }, "markers": { "start": 0 }, "cram-level": 0, "global-attributes": {}, "nicknames": {}, "beats-tally-default": null }  # events output$ alda parse -c 'piano: c d e' -o events | jq .

[
{
"event-type": "part",
"instrument-call": {
"names": [
"piano"
]
},
"events": null
},
{
"event-type": "note",
"letter": "c",
"accidentals": [],
"beats": null,
"ms": null,
"slur?": null
},
{
"event-type": "note",
"letter": "d",
"accidentals": [],
"beats": null,
"ms": null,
"slur?": null
},
{
"event-type": "note",
"letter": "e",
"accidentals": [],
"beats": null,
"ms": null,
"slur?": null
}
]


The new "events" output mode can be useful for debugging Alda code that isn't behaving as expected.

Source code(tar.gz)
Source code(zip)
alda(7.08 MB)
alda.exe(7.11 MB)
###### Alda
A music programming language for musicians.
###### A beautiful cross platform Desktop Player for Google Play Music

Google Play Music™ Desktop Player Windows: MacOS / Linux: Run "Google Play Music" as a standalone desktop app. Never again will you have to hunt throu

8.5k Sep 12, 2021
###### A Music programming language. Translates source code into MIDI. Includes a player. Supports MIDI-Karaoke. Includes a MIDI analyzer.

Get Started | Features | Screenshots | Programming | CLI | Contribute | License Midica is an interpreter for a Music Programming Language. It translat

47 Sep 17, 2021

OpenSheetMusicDisplay (OSMD) A MusicXML renderer for the Browser opensheetmusicdisplay.org About OSMD • Demo • Key Features • Limitations • How to Use

800 Sep 15, 2021
###### A music programming language for musicians. :notes:

Installation | Docs | Changelog | Contributing composers chatting Alda is a text-based programming language for music composition. It allows you to co

4.7k Sep 15, 2021
###### Music typeset with the Lilypond system

Intro (from long ago) This repo contains sheet music typeset with the Lilypond typesetter. The music chosen is in favour of cello music (mostly chambe

95 Sep 15, 2021
###### 网易云音乐第三方

ieaseMusic Elegant NeteaseMusic desktop app, Rock with NeteaseMusic ?? Built by Electron, React, MobX, JSS API 由 Binaryify/NeteaseCloudMusicApi 提供。 Pr

8.6k Sep 22, 2021
###### 🎵 Music notation engraving library for MEI with MusicXML and Humdrum support and various toolkits (JavaScript, Python)

Verovio is a fast, portable and lightweight library for engraving Music Encoding Initiative (MEI) digital scores into SVG images. Verovio also contain

426 Sep 22, 2021
###### ChucK Music Programming Language

ChucK Please note that the master branch has been renamed to main. The Internet Engineering Task Force (IETF) points out that "Master-slave is an oppr

497 Sep 10, 2021
###### Music player for deepin desktop environment.

deepin-music Deepin music is a local music player with beautiful design and simple functions developed by Deepin Technology. Dependencies Build depend

155 Sep 16, 2021
###### Mopidy is an extensible music server written in Python

Mopidy Mopidy is an extensible music server written in Python. Mopidy plays music from local disk, Spotify, SoundCloud, Google Play Music, and more. Y

7.2k Sep 17, 2021
###### Frescobaldi LilyPond Editor

README for Frescobaldi Homepage: http://www.frescobaldi.org/ Main author: Wilbert Berendsen Frescobaldi is a LilyPond sheet music text editor. It aims

501 Sep 21, 2021
###### A music composition library for Clojure and Clojurescript.

Leipzig A composition library for Clojure and Clojurescript by @ctford. Use Include it as a dependency in your project.clj, along with Overtone: [over

428 Aug 15, 2021
###### music library manager and MusicBrainz tagger

beets Beets is the media library management system for obsessive music geeks. The purpose of beets is to get your music collection right once and for

10.4k Sep 15, 2021
###### Collaborative Programmable Music

888 888 _ooooooooo._ 888 ,o888PP""""PP88

5.2k Sep 11, 2021
###### Compose music and write score easily in your browser!

inknote Compose music easily in your browser! http://www.michalpaszkiewicz.co.uk/inknote/ Store multiple files, tag them with colours. Made using Type

145 Aug 18, 2021
###### web based music sheet viewer (go, pdfjs) as a single binary

Digital Music Stand A simple cross-platform browser-based pdfjs-based viewer to display and search music sheets. A single binary including all assets.

21 Aug 27, 2021
###### LilyPond mini-score engraving and sharing service for musicians.

Tunefl LilyPond mini-score engraving and sharing service for musicians. The live Tunefl service is at tunefl.com. More sleep lost by tiredpixel. Insta

22 Jun 22, 2020
###### Streaming music player that finds free music for you

Desktop music player focused on streaming from free sources Links Official website Mastodon Twitter Support channel (Matrix): #nuclear:matrix.org Disc

6.8k Sep 17, 2021
###### The git repository of the advanced drum machine

Hydrogen drum machine Hydrogen is an advanced drum machine for GNU/Linux, Mac and Windows. It's main goal is to bring professional yet simple and intu

702 Sep 15, 2021