Close

Overhauling the Sequencers

A project log for OPL Studio - OPL2 / OPL3 MIDI Interface

a MIDI interface for the OPL2 Audio Board and OPL3 Duo!

maarten-janssenMaarten Janssen 08/22/2021 at 10:540 Comments

Ever since I added the melody sequencer to OPL Studio I never was really happy with it. Compared to the drum sequencer it always felt a bit clumsy and awkward to work with. It was time to once again refactor the melody sequencer an take care of all the annoyances I had with it. 

Variable Sequence lengths

One of my issues was that the sequences, both drum and melody, were too short. They were always only 16 steps. So the first thing I changed was to make all sequences have a flexible length between 16, 32, 48 or 64 steps. This ment some rework for the sequence code as well as for the UI where I had do add some spinners to select the sequence length and the bar that's being edited.

Melodt Sequencer Changes

For the melody sequencer my biggest issue was that I never liked how is made its recordings from MIDI. I was always missing the beat and although it could kind of do step recording it was very inconvenient as it would also start the MIDI clock when you entered a note. To fix this I rewrote most of the melody sequencing code. I implemented a step recording mode that works like typing text on a keyboard. When recording is enabled and the MIDI clock is not running you are in step recording mode. The sequence button of the active step will blink and when you play a note on the keyboard it will be registered. When you release the key the sequencer will advance to the next step, just like typing text where the cursor moves to the next character position. To add longer notes to the sequence you simply hold down the key and the sequencer will start to step automatically with a slow interval. Making this change was a game changer for me when it comes to the usability of the melody sequencer. It's now feeling much more solid and usable!

Of course live recording is also still possible when arecording mode is enabled and the MIDI clock is running then key strokes will also be recorded to the sequence.

I also made a change to the clock divider on the melody sequences. Before you could set any arbitrary division between 1 and 16. This is now changed to selecting a note length between 16th, 8th or 4th note.

Lastly, I had moved the setting to switch the metronome on or off during recording to the settings panel in an earlier change. That was a mistake! When I really started to use the melody sequencer I found that I wanted to be able to switch the metronome on or off all the time. So I restored the metronome and I gave it it's own toggle button with a nice icon among the transport controls.

Support for More Instrument Banks

I also spend some time on less sexy things like adding support to load more instrument bank formats. I added support for Adlib Timbre Banks and Apogee Sound System Timbre files. 

In the demo below you can see how I load a new instrument bank from an Apogee file on the SD card and how I use the newly implemented changes on the sequencers.

Discussions