Articles are a practical way to provide additional guidance beyond
API documentation. Please refer to the documentation to learn more about using them.

Namespaces

We couldn't find any namespaces in this artifact. Most often the reason for this is
that the analysis failed or that the artifact has been mispackaged and does not
contain any Clojure source files. The latter might be on purpose for uber-module
style artifacts. Please open
an issue and we'll be happy to look into it.

Interaction with servers is done via ZeroMQ TCP requests with a JSON payload. The Alda client takes command-line arguments, translates them into a JSON request, and sends the request to the server. For more details about the way we use ZeroMQ, see ZeroMQ Architecture.

Unless specified via the -H/--host option, the Alda client assumes the server is running locally and sends requests to localhost. The default port is 27713.

Running alda start forks a new Alda process in the background, passing it the (hidden) server command to start the server. Server output is hidden from the user, although the client will report if there is an error.

To see server output (including error stacktraces) for development purposes, you can start a server in the foreground by running alda server. You may specify a port via the -p/--port option (e.g. alda -p 2000 server) -- just make sure you're sending requests from the client to the right port (e.g. alda -p 2000 play -f my-score.alda).

These are integration tests that rely upon an alda executable being available at a known location. By default, it is assumed to be in /usr/local/bin, but if you have alda in another location (using /usr/bin here as an example), you can specify the location via the ALDA_EXECUTABLE environment variable:

The -x argument must be a single string containing everything you would put after alda when using a release build of the Alda client.

For example, to test changes to the way the alda play command plays a file, you can run:

boot dev -x "play --file /path/to/file.alda"

One caveat to running the client this way is that the boot process does not have the necessary permissions to start a new process. This means you won't be able to start an Alda server via the client by running boot dev -x "up" or boot dev -x "server", for example.

You can, however, start a server via a release build (e.g. alda -v -p 12345 server) and use the boot dev task to talk to that server on that port.