Using JFugue with External DAW

Written by on January 2, 2021 in LISP, Music, Programming with 0 Comments

Let this New Year 2021 bring health and happiness to us all!

In the last article, I talked briefly about JFugue and showed how to access it from LispWorks Lisp on a PC running Windows 10. In that example, the music was rendered by the built-in synthesizer. Although this is fine, it is sometimes desirable to play the generated MIDI notes through an external DAW because it usually allows us to take advantage of a much wider range of musical instruments and sounds. How to do that is the focus of today’s article.

I had written about UVI Falcon in an earlier article. I installed Falcon on my Windows 10 machine, along with the “Falcon Factory” soundbank. In order to play notes through an external MIDI device, JFugue requires us to create a new MusicReceiver object, bound to a suitable MIDI device. For this purpose, I had to download and install the free “Springbeats Virtual MIDI”.

To check if it is installed, I wrote the following Lisp function:

Checking Available MIDI Devices

Checking Available MIDI Devices

When I ran it, this is what I got:

Available Devices

Available Devices

For this, as well as to create a new MusicReceiver, I had to declare additional Java methods in Lisp:

Declaring Java Methods

Declaring Java Methods

Not much of a hassle, really.

After this, I had to configure the MIDI settings in Falcon. See this image:

Falcon MIDI Settings

Falcon MIDI Settings

 You can see that I have mapped Port A to Springbeats Virtual MIDI.

And here is the Falcon view with the two instruments I selected for playing the notes. I need two tracks because one of the statements uses two “voices” (or tracks).

Falcon with Two Tracks

Falcon with Two Tracks

As mentioned earlier, I had to create a new player to play notes through the external device:

Creating New MusicReceiver

Creating New DAW Player

I used the 5th element (0-based index 4) in the list of printed MIDI devices for creating the MusicReceiver. Here is the code for the “play” method:

The Play Method

The Play Method

Here are the notes that we play:

Playing Sample Notes

Playing Sample Notes

Note that the second statement uses two voices, V0 and V1. When we run the “test-play” method, this time, the music is rendered on the external DAW, Falcon.

Playing the Notes

Playing the Notes

So, using JFugue with an external instrument is not that hard at all. Although it is unlikely that I will be using JFugue for my composition experiments, I wanted to make sure I am aware of its possibilities and limitations.

Here is my Lisp code.

Have a great weekend and a wonderful year ahead!

Tags: , , ,

Subscribe

If you enjoyed this article, subscribe now to receive more just like it.

Subscribe via RSS Feed

Leave a Reply

Your email address will not be published. Required fields are marked *

Top