Close

We're Not Done Yet!

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/07/2022 at 18:510 Comments

After I reimplemented the melodic sequences and allowed them to be polyphonic again, I realised how bad the old melodic sequences were! Monophonic and very static allowing almost no room to put any dynamics into the music. This simply isn't good enough to be released. I'm too much of a perfectionist to even consider putting it out there as a 1.0 release of the software.

The good news is that the melodic sequences have now been fully reimplemented and the melodic sequencer module is almost fully updated as well. What still remains is to put back the step recording and copy / paste functionality. Also the OPS file format that saves OPL Studio sessions needs to be updated to support the new PolyMelody format, but this will be a trivial change now the sequence data is much more simple to save and load. Lastly the composer module needs some changes to support the new PolyMelody sequence format and also this will be a relatively simple change.

Another Sequencer

So what's taken me all this time then since the last log if most changes were quite simple? Well, I did some more fundamental changes in the way how sequences are managed, edited and played. When all was almost set and done it made a lot of sense to also add a new 4-track sequencer that I was hinting at in the previous log.

The new sequencer can play up to 4 different drum or melodic sequences at a time and also play them in the background, for example when you're editing instrument patches or changing the synthesizer setup. You can immediately hear your changes!

The new sequencer also adds a lot of potential for live playing with OPL Studio. You no longer have to prepare a song in the composer module beforehand (you still can), but now you can start playing a bunch of sequences, add more, change them, edit them all on the fly! The new PolyMelody sequence format has opened up so much more freedom that it feels wrong not to add the new sequencer module. 

This doesn't mean that the current drum and melody sequencers will be removed. They will remain in place as the editors for your individual sequences.

The new 4-track sequencer is still in an early stage, but this screenshot should give you an idea. Of course the familiar play / stop and tempo controls are there. In addition there is a control that lets you retrigger the sequencer every n steps. Below you see the four sequencer slots. Each slot can be set to any of the drum or melodic sequences and they will be represented by a big toggle button in the color and pattern associated with the sequence. The buttons can be click to toggle playing or muting a sequence. A little progressbar shows how far along the sequence playback is. Clicking the ... button opens the sequence selection dialog that's also used by the composer module and it allows you to change the sequence that's assigned to the slot. Lastly below each sequence button there is a big button to open the sequence editors to edit the sequence that's playing in the given slot.

Some Future Changes

Now that sequences have been completely refactored one thing that still remains 'legacy code' are the drume sequences. These are stored as very simple byte arrays where individual bits tell whether a drum sound should be played on a sequence step. This made sense at the time when I really wasn't sure about the demand on the Teensy's RAM and therefor I wanted to be very conservative on the memory footprint of all the things I needed to store. 

It now starts to make a lot of sense to store the drum sequences also in the new PolyMelody format, same as the melodic sequences. This would get rid of the limit of having just 8 drum tracks per sequence and also allow for things such as volume or panning changes in a drum sequence. Again it would also make all sequece code more simple since there will be just a single type of sequence data to handle. Yet it means more refactoring to come and I must make sure first that the additional memory requirement of using the PolyMelody format for drum sequences will not tip memory consumption over the edge, especially on a Teensy 3.6.

But this will come later after the 1.0 release and this time I mean it!!

Discussions