abcjs 5.8.1 published!

There is a new version of abcjs and a new version of the WordPress plugin. This contains a way to add an animated cursor to follow the music along.

This is a demo of the engraving, playing, and coordination between the two.

abcjs version 4.1.0 released!

A new version of abcjs is ready!

This has a lot of bug fixes, and a lot of small improvements to the audio control to make the overall experience better.

As an experiment, I’ve been working on a viewer for all the charts in my Trad Jazz band, and in the process I’ve uncovered some rough edges. This is a first pass on making the experience smoother and the next version of abcjs will have even more.

If you have any suggestions for further improvements, let me know.

To install this on a WordPress site, search the plugins for “ABC Notation”.

Deploying Laravel

There is surprisingly little information about deploying a Laravel app. I’ve got an EC2 and wanted to deploy a couple of experiments and had no idea what needs to happen. So, this is a quick overview that I wish I had read on the first day.

The Overview

All of the source files need to be put on the server as well as the compiled javascript and css.

When composer.json changes, then composer needs to run on the server. It does not need to run for every deploy, but that doesn’t hurt anything.

The javascript does NOT need to be processed on the server. It is processed on the development machine and just the compiled assets are copied to the server.

In addition, there are some folders that need to be expressly marked writable by the server.

One Time Server Task

Composer must be installed, and it can be installed on the server like this:

cd ~
curl -sS | php
sudo mv composer.phar /usr/local/bin/composer

The Initial Preparation

Laravel is built with PHP, so the basic setup is the same as WordPress. So start with the same steps as deploying WordPress:

1. Point the DNS records to your server.
2. Add a my-project.conf file to the nginx/apache config that is similar to the WordPress configuration.
3. The one difference to the conf file is to add “public” to the path. Here is the example for nginx:

root $ROOT/my-project/public;

4. Don’t forget to restart apache or nginx.

The next few steps require that you have your project stored in git and that you have ssh access to your server.

1. Make a script file in the root folder of your project called DO NOT CHECK THIS FILE INTO GIT. It will contain your secrets. It should look like this:

#!/usr/bin/env bash

#The location that all of the deployments are on this server.
# The folder that will contain this deployment (often the domain name)
# The SSH line (That is, "ssh $SSH" should work.)
# On the server, "git clone $REPO" needs to work.


2. Then make another script called that contains:

#!/usr/bin/env bash
. $(dirname "$0")/
ssh $SSH "cd $BASE_DIR && git clone $REPO $DIR_NAME"
ssh $SSH "cd $ROOT/public && mkdir js"
ssh $SSH "cd $ROOT/public && mkdir css"
ssh $SSH "cd $ROOT/public && mkdir fonts"
scp .env $SSH:$ROOT/.env
ssh $SSH "cd $ROOT && chmod -R 777 ./storage"
ssh $SSH "cd $ROOT && chmod -R 777 ./bootstrap/cache"

3. Run this script. That should leave a new folder on the server with all of the source files.

4. On the server, edit the file .env to be correct for the server. At least change APP_ENV to “production”, and APP_URL to the actual URL. There are likely other app-specific things to change.

5. Create the following deployment script, and call it

#!/usr/bin/env bash
. $(dirname "$0")/
npm run production
ssh $SSH "cd $ROOT && git pull"
scp -r public/js/* $SSH:$ROOT/public/js
scp -r public/css/* $SSH:$ROOT/public/css
scp -r public/fonts/* $SSH:$ROOT/public/fonts
ssh $SSH "cd $ROOT && composer install --no-dev"

Each Deployment Iteration

Each time you want to push the latest code to production, check your code in, compile it, and run the script. This compiles the assets, gets the latest code from github, and runs composer just in case something changed.

I put the following two scripts in package.json for convenience and documentation:

"deploy-production": "./",
"deploy-production-setup": "./"

Then I can deploy with:

npm run deploy-production

Note that and are completely generic, so the same files can be used for all projects. It is just the values in that change.

abcjs 3.2.0 released!

There’s a new version of abcjs. It has some bug fixes in general, support for the overlay feature of ABC, and improvements to the npm packaging.

Behind the scenes, I’m improving my testing scaffold and experimenting at the same time. For years, I’ve had a suite of over 500 ABC strings that test various parts of my code and I’ve run them as part of a Rails program. I’m not doing any Rails anymore, and I decided to rewrite the program in Laravel, with a Vue front end. This is also an experiment to see if I should start recommending that environment for projects that are basically JS apps, but require an API.

So far, so good. I like that it is PHP because that means that it is really easy to deploy. I don’t like working in PHP much, but version 7 has really improved.