A music programming language for musicians. :notes:

Overview

alda logo

Installation | Docs | Changelog | Contributing

Join us on Slack! 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

Planned

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

For an overview of available commands and options:

alda --help

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 interactive Alda REPL session:

alda repl

Documentation

Alda's documentation can be found here.

Contributing

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

For a top-level overview of things we're talking about and working on, 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.

Support, Discussion, Camaraderie

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!

License

Copyright © 2012-2021 Dave Yarwood et al

Distributed under the Eclipse Public License version 2.0.

Comments
  • Alda not starting workers in some cases

    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 +

    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 elydpg 60
  • Javascript implementation of REPL + Web Audio API

    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

    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 elydpg 35
  • Refine and document Alda installation/usage on Windows

    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
  • Run Alda in the browser

    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 31
  • Massive CPU usage

    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:

    2016-09-16-132039_2020x123_scrot

    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
  • MIDI audio is delayed after suspending the server

    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

    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

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

    Make "final product" less(/not) reliant on Boot

    I added boot.properties before Clojure 1.7.0 became the default Clojure version in Boot 2.2.0, as a way of enforcing that Clojure 1.7.0 be used when running Alda boot tasks, which used to be how you would run alda's play, parse and repl tasks, pre-alda.cli (i.e. instead of using the alda executable, you would cd into the Alda project directory and run boot play --file /some/file.alda, or boot alda-repl, etc.)

    Since then, the latest versions of Boot (since 2.2.0) have made Clojure 1.7.0 the default BOOT_CLOJURE_VERSION, and the usage instructions for Alda has moved from cloning the repo and running Boot tasks to copying a provided executable Boot script (bin/alda) to your $PATH and using the alda command as an entrypoint into the tasks defined in the alda.cli namespace.

    Bearing this in mind, does it make sense for us to still have a boot.properties file? With Boot steadily evolving and improving, I'm not sure I like the idea of pinning the Alda project to a specific version of Boot, when really all we want to enforce is Clojure 1.7.0 as a dependency.

    enhancement 
    opened by daveyarwood 21
  • Add check for extra rest duration

    Add check for extra rest duration

    Patch to fix issue #421 . Checks the ending duration of what is sent to the client matches the PartOffset in the Score object. If there is a mismatch (as in the case with a trailing rest), extra duration is appended to the last note.

    opened by kylewilk567 3
  • open /tmp/alda-doctor1917232005/1666820313.mid: no such file or directory

    open /tmp/alda-doctor1917232005/1666820313.mid: no such file or directory

    🐞 Bug report 🐞

    Description

    Fresh download, new user. After problems with the 101 tutorial (alda repl), I tried alda doctor. It errs out at "Export score as MIDI" after hanging a couple of seconds, and after it errs out, I hear an upward broken major chord and see a persisting java process of alda-player.

    Steps to Reproduce

    1. Download current alda and alda-player, make executable and put on PATH
    2. Execute alda doctor

    I am using Gentoo Linux an a laptop with an external soundcard (USB) that does not seem to be used. I have both Pipewire and ALSA installed.

    Expected Behavior

    I would hope that the self-test passes. Furthermore, I would not expect remaining Java background processes after exit of the command I launched.

    Actual Behavior

    It errs out at "Export score as MIDI" after hanging a couple of seconds, and after it errs out, I hear an upward broken major chord and see a persisting java process of alda-player.

    Environment

    Operating system and version: Gentoo Linux, rolling.

    Alda version:

    $ alda version
    alda 2.2.3
    
    $ alda-player info
    alda-player 2.2.3
    log path: /home/seb/.cache/alda/logs
    

    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
    ERR Export score as MIDI
    
    ---
    
    Oops! Something went wrong:
      open /tmp/alda-doctor1917232005/1666820313.mid: no such file or directory
    
    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
    

    Logs:

    gip INFO  2022-10-26 23:38:33 StateManager.cleanUpStaleStateFiles:72 - Cleaning up stale files in /home/seb/.cache/alda/state/players...
    gip INFO  2022-10-26 23:38:33 StateManager.cleanUpStaleStateFiles:72 - Cleaning up stale files in /home/seb/.cache/alda/state/repl-servers...
    gip INFO  2022-10-26 23:38:33 Main.run:77 - Starting receiver, listening on port 37209...
    gip INFO  2022-10-26 23:38:54 MidiEngine.<init>:276 - Initializing MIDI sequencer...
    gip INFO  2022-10-26 23:38:54 MidiEngine.<init>:281 - Initializing MIDI synthesizer...
    gip INFO  2022-10-26 23:38:56 Main.run:90 - Starting player...
    gip DEBUG 2022-10-26 23:38:56 Parser.parse:238 - received ping
    gip DEBUG 2022-10-26 23:38:56 Player.invoke:346 - TRACK 1: startOffset is 0
    gip DEBUG 2022-10-26 23:38:56 Player.invoke:349 - eraBefore: 0; eraAfter: 0
    gip DEBUG 2022-10-26 23:38:57 MidiEngine.meta:334 - Received Set Tempo meta event
    gip DEBUG 2022-10-26 23:38:59 MidiEngine.meta:291 - Received CONTINUE meta event
    gip DEBUG 2022-10-26 23:39:00 MidiEngine.meta:291 - Received CONTINUE meta event
    gip DEBUG 2022-10-26 23:39:01 MidiEngine.meta:291 - Received CONTINUE meta event
    gip DEBUG 2022-10-26 23:39:02 MidiEngine.meta:291 - Received CONTINUE meta event
    gip DEBUG 2022-10-26 23:39:03 MidiEngine.meta:291 - Received CONTINUE meta event
    

    Afterwards:

    $ ps aux | grep alda
    seb      20347 10.3  0.6 4566324 106200 pts/2  Sl   23:38   0:02 /usr/lib64/icedtea8/bin/java -XX:+UseG1GC -XX:MaxGCPauseMillis=100 -Xmx1024m -Xms256m -DlogPath=tmplog -jar /home/seb/bin/alda-player -v run -p 37209
    seb      20387  0.0  0.0   7648  2284 pts/2    S+   23:38   0:00 grep --colour=auto alda
    
    bug 
    opened by SebAlbert 5
  • Alda REPL

    Alda REPL "skips" rests at the end of a line

    🐞 Bug report 🐞

    Description

    @litan on Alda Slack observed that if you run the following command twice in succession:

    alda repl \
      --client \
      --port 43009 \
      --message '{"op": "eval-and-play", "code": "percussion: o2 (tempo 240) c4 r4 c4 r4 | c4 r4 c4 r4 | c4 r4 c4 r4 | c4 r4 d4 r4"}'
    

    It appends the two together as expected, however, the r4 at the end gets stripped off, so the c4 at the beginning of the second command ends up happening a quarter note too soon.

    I was also able to reproduce this in an interactive Alda REPL session.

    Steps to Reproduce

    1. Run alda repl to start a REPL session.
    2. Enter percussion: o2 (tempo 240) c4 r4 c4 r4 | c4 r4 c4 r4 | c4 r4 c4 r4 | c4 r4 d4 r4 and press Enter.
    3. Before that line finishes playing, press Up arrow, Enter to enter the same line again.

    Expected Behavior

    The notes you hear are all spaced apart by quarter note rests.

    Actual Behavior

    It sounds like the r4 quarter note rest at the end of the first line is omitted, and there is a "hiccup" where the second line starts a quarter note too early.

    Environment

    Operating system and version: Ubuntu 20.04

    Alda version: 2.2.3

    bug 
    opened by daveyarwood 0
  • CLI wonky with readline fix

    CLI wonky with readline fix

    Reference Issues/PRs

    Addresses #405

    What does this implement/fix? Explain your changes.

    • Changed the color library for client to support windows by using the "github.com/gookit/color" library
    • Changed the readline library for client to support windows and prevent background changes, replaced with "github.com/peterh/liner"
    • Added tempfile ".alda_history" in temp directory for handling previous inputs, and reverseSearch added.

    TODO:

    • need to connect zerolog with the new liner library to handle Stderrs
    • need to test multiLine mode, and to understand how it works ... to make playing instruments easier.
    opened by KenP97 6
  • Exiting Alda REPL in

    Exiting Alda REPL in "server only" mode kills all player processes

    🐞 Bug report 🐞

    Description

    Player processes are supposed to outlive the execution of the Alda client, and they generally do, except, for some reason, in the case of running an Alda REPL in "server only" mode.

    Steps to Reproduce

    1. In a separate terminal, monitor the state of the player processes by running watch alda ps.
    2. Start from a clean state by running alda shutdown to shut down all current player processes.
    3. Run alda repl -s to start a REPL server.
    4. Interrupt the process.

    Expected Behavior

    • The REPL server process disappears from the alda ps output.
    • The player processes remain alive and continue to be present in the alda ps output.

    Actual Behavior

    All of the processes die and disappear from the alda ps output.

    Environment

    Operating system and version: Ubuntu 20.04

    Alda version:

    $ alda version
    alda 2.2.1
    
    $ alda-player info
    alda-player 2.2.1
    log path: /home/dave/.cache/alda/logs
    

    Health check:

    $ alda doctor
    (all passing)
    
    bug low-hanging fruit 
    opened by daveyarwood 0
  • Alda REPL server sometimes

    Alda REPL server sometimes "claims" more than 1 player on startup

    🐞 Bug report 🐞

    Description

    When starting an Alda REPL session, the REPL server finds an available player process (i.e. one in the "ready" state) and "claims" it by sending it a ping message. This puts the player process into the "active" state, which makes Alda more eager to spawn new player processes in order to have them readily available.

    This works reliably, but it seems to be a little too reliable in that, for some reason, two player processes seem to go from "ready" to "active" when the REPL server starts.

    Steps to Reproduce

    1. In a separate terminal, monitor the state of the player processes by running watch alda ps.
    2. Start from a clean state by running alda shutdown to shut down all current player processes.
    3. Run alda -v2 repl to start a REPL session in verbose mode.
    4. Exit the session and start a new one.
    5. Repeat step 4.

    Expected Behavior

    Each time a REPL session is started, only 1 of the players in the "ready" state goes into the "active" state.

    Alda spawns more player processes as needed, but it shouldn't need to do that too much, because only one process becomes unavailable for each REPL session.

    Actual Behavior

    The first time I start a REPL server session, I see 5 players in the "ready" state and 1 player in the "active" state. The REPL server output shows that it is using the 1 player in the "active" state.

    When I exit that session and start another one, 2 of the players that were in the "ready" state go into the "active" state. One of them is the one that this new REPL session is using. We are now down to 3 players in the "ready" state.

    If I keep going, exiting and starting new REPL sessions, more and more player processes are spawned to ensure that there are always player processes available in the "ready" state.

    Environment

    Operating system and version: Ubuntu 20.04

    Alda version:

    $ alda version
    alda 2.2.1
    
    $ alda-player info
    alda-player 2.2.1
    log path: /home/dave/.cache/alda/logs
    

    Health check:

    $ alda doctor
    (all passing)
    
    bug low-hanging fruit 
    opened by daveyarwood 0
Releases(1.5.0)
  • 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!

    Please go to https://alda.io/install to download and install the latest version of Alda.

    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.4(Mar 7, 2021)

  • 1.4.3(Sep 29, 2020)

    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.2(Jun 16, 2020)

  • 1.4.1(Apr 18, 2020)

  • 1.4.0(Mar 19, 2020)

    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(Mar 15, 2020)

    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(Aug 17, 2019)

    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.2(Jun 27, 2019)

  • 1.3.1(May 6, 2019)

    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(Apr 15, 2019)

    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(Jan 20, 2019)

    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(Dec 1, 2018)

    1.1.0 (2018-12-01)

    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:

    Source code(tar.gz)
    Source code(zip)
    alda(6.81 MB)
    alda.exe(6.84 MB)
  • 1.0.1(Nov 24, 2018)

    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!

    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. :)

    Source code(tar.gz)
    Source code(zip)
    alda(6.81 MB)
    alda.exe(6.83 MB)
  • 1.0.0(Nov 24, 2018)

    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(Oct 28, 2018)

    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-rc84(Aug 26, 2018)

  • 1.0.0-rc83(Aug 26, 2018)

  • 1.0.0-rc82(Jul 2, 2018)

  • 1.0.0-rc81(Mar 8, 2018)

    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(Mar 1, 2018)

    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(Feb 17, 2018)

    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-rc78(Feb 5, 2018)

  • 1.0.0-rc77(Feb 4, 2018)

    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(Oct 30, 2017)

    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(Oct 17, 2017)

    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(Oct 14, 2017)

    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(Oct 12, 2017)

    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(Oct 9, 2017)

    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(Oct 8, 2017)

    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)
Owner
Alda
A music programming language for musicians.
Alda
Unlock Music Project - CLI Edition

Unlock Music Project - CLI Edition Original: Web Edition

Unlock Music 733 Nov 2, 2022
Go library for searching on YouTube Music.

ytmusic Go library for searching on YouTube Music and getting other useful information. Installing go get github.com/raitonoberu/ytmusic Usage Search

Denis 11 Oct 15, 2022
Self-hosted music streaming server 🎶 with RESTful API and Web interface

Self-hosted music streaming server ?? with RESTful API and Web interface. Think of it as your very own Spotify!

Doychin Atanasov 448 Dec 1, 2022
Download and listen music in the terminal!

?? this cli still has a lot of bugs ?? A simple tool to download and listen music in the terminal. You will need: golang deno v1.16+ youtube-dl Instal

pai 80 Nov 23, 2022
A tool coded by GO to decode cryptoed netease music files and qqmusic files

nqdumpgo A tool coded by GO to decode cryptoed netease music files and qqmusic files 一个使用 Go 语言编写的用于解密被网易云音乐或 QQ 音乐加密的文件的程序,Go 程序在拥有与 C++程序相近的效率的同时,大大

null 7 Nov 14, 2022
Small application to convert my music library folder structure to 'crates' in the open-source DJ software Mixxx

Small application to convert my music library folder structure to 'crates' in the open-source DJ software Mixxx

Bart van Oort 3 Nov 18, 2022
Gomu is intuitive, powerful CLI music player.

Gomu (Go Music Player) Gomu is intuitive, powerful CLI music player. It has embedded scripting language and event hook to enable user to customize the

Raziman Mahathir 94 Nov 26, 2022
Kwed-dl - A tool to download latest music files from remix.kwed.org

kwed-dl A small program to download latest tracks from remix.kwed.org. Keeps a counter in your home-folder (_kwedrc on windows and .kwedrc on linux).

Brian Schau 0 May 24, 2022
Muclean - A simple music file renamer

Muclean A simple music file renamer Installation go install github.com/CJ-Jackso

Christopher John Jackson 0 Jan 23, 2022
MIDI tunneling through BGP, for times when you want to broadcast your music instead of your IP packets.

BGPiano MIDI tunneling through BGP, for times when you want to broadcast your music instead of your IP packets. Usage bgpiano-send and bgpiano-recv Po

James Swineson 16 Jun 9, 2022
Floppa programming language inspired by the brainf*ck programming language. Created just for fun and you can convert your brainf*ck code to floppa code.

Floppa Programming Language Created just for fun. But if you want to contribute, why not? Floppa p.l. inspired by the brainf*ck programming language.

null 19 Oct 20, 2022
T# Programming Language. Something like Porth, Forth but written in Go. Stack-oriented programming language.

The T# Programming Language WARNING! THIS LANGUAGE IS A WORK IN PROGRESS! ANYTHING CAN CHANGE AT ANY MOMENT WITHOUT ANY NOTICE! Something like Forth a

T# 92 Jun 29, 2022
Yayx programming language is begginer friendly programming language.

Yayx Yayx programming language is begginer friendly programming language. What have yayx: Easy syntax Dynamic types Can be compiled to outhers program

null 1 Dec 27, 2021
Yayx programming language is begginer friendly programming language.

Yayx Yayx programming language is begginer friendly programming language. What have yayx: Easy syntax Dynamic types Can be compiled to outhers program

Yayx Programming Language 7 May 20, 2022
Advent of Code is an Advent calendar of small programming puzzles for a variety of skill sets and skill levels that can be solved in any programming language you like.

Advent of Code 2021 Advent of Code is an Advent calendar of small programming puzzles for a variety of skill sets and skill levels that can be solved

Kemal Ogun Isik 0 Dec 2, 2021
Zach Howell 0 Jan 4, 2022
:notes: Minimalist websocket framework for Go

melody ?? Minimalist websocket framework for Go. Melody is websocket framework based on github.com/gorilla/websocket that abstracts away the tedious p

Ola 2.6k Nov 27, 2022
textnote is a command line tool for quickly creating and managing daily plain text notes.

textnote is a command line tool for quickly creating and managing daily plain text notes. It is designed for ease of use to encourage the practice of daily, organized note taking. textnote intentionally facilitates only the management (creation, opening, organizing, and consolidated archiving) of notes, following the philosophy that notes are best written in a text editor and not via a CLI.

Daniel Kaslovsky 161 Nov 16, 2022
:notes: Minimalist websocket framework for Go

melody ?? Minimalist websocket framework for Go. Melody is websocket framework based on github.com/gorilla/websocket that abstracts away the tedious p

Ola 2.6k Dec 2, 2022
A simple Git Notes Key Value store

Gino Keva - Git Notes Key Values Gino Keva works as a simple Key Value store built on top of Git Notes, using an event sourcing architecture. Events a

Philips Software 24 Aug 14, 2022