The ultimate dual OPL3 MIDI syntesizer with touch screen
To make the experience fit your profile, pick a username and tell us what interests you.
We found and based on your interests.
Today's log will be about the new composer module. In the past I think I already mentioned how the composer has become the most legacy part of the OPL Studio code and that it was due for an update. Now it is finally time to talk about this as I've made some great progress on the new composer.
I started really optimistically with the kind of mindset that every manager in the tech field has these days: "I'm going to use AI and all the work will be done in 2 weeks!!". And sure enough things progressed really quickly. I asked the AI to generate the code for all the algorithms I needed to build songs from sequences. I asked the AI to generate the code for some new playback routines. I asked it to generate the code I needed for the editor. It all looked very convincing and the small issues that I found were quickly fixed. But as soon as the implementation had to move on from just the basics of the composer and playback to something more advanced things started to fall apart. The code was turning into slop and it was getting out of control quickly with some very fundamental bugs. I ditched the AI and all of its code. It was time to take over the wheel again and face the reality that it would be some very challenging code to write...
The most challenging part of the composer to write was the new workflow. In the old composer sequences are dropped into the song by clicking on a track and then you're more or less stuck. You can't move the sequence, let alone move multiple sequences. And copying / pasting is done more or less blindly. This makes for a very clunky user experience and a frustrating workflow where you're often spending a lot of time correcting mistakes due to a simple miss-click.
The new composer streamlines the workflow of creating songs mostly thanks to its drag and drop capabilities. You can now select a bunch of sequences and as you move them around the song the composer grid will show you a ghost of your selection so you're no longer working blind. This also counts when pasting a block into the song, you now know for certain where you're pasting your selection. Which also helps is the new zoom control for the composer grid. You're no longer restricted to an extreme close-up of your song which makes editing a lot simpler.
Another improvement in the new composer is that it can now switch between the sequence editors and the composer without having to close the app. For example if you're adding an empty sequence to the song it will launch the drum or melodic sequencer depending on the type of sequence that you're adding. Once you're done creating the sequence and you close the editor you will return to the composer with your new sequence added to the song. Also if you're not happy with one of your existing sequences, simply press the edit button to launch the editor without having to close the composer first.
Thanks to the improved handling of the playback routines, OPL Studio will also better handle playback in the background. You can play the song from the composer or a sequence in a sequence editor and open the patch editor to tweak some of the instruments, or get into the synthesizer setup to change some synthesizer parameters and immediately hear the result.
It will still be a few weeks before the composer is ready. As you can tell from the screenshots the UI is not ready yet and there are still some bugs that need fixing. The upcoming release will also fix some of the bugs from the current v2.5.0 that are fixed as part of the composer branch. Since I initially thought it would be a quick development cycle I didn't put these fixes into separate branches to get them released quicker.
For those of you familiar with Tindie you may know what an absolute shit show this platform has become over the last couple of months. It all started with intermittent breakdowns followed by weeks of the website being down after it was acquired by its new Chinese owners. Apparently to...
Read more »At the end of the year there is one more OPL Studio software update. It's v2.5.0 and probably the longest I've ever spend on updating one of the application modules. In v2.5.0 the media player has gotten a big update. The new software can be downloaded from the OPL Studio Github page.
The media player has a nice new UI with big 7-segment displays for the playout time. You can click the time to switch between count up and count down time. Indicator LEDs for the OPL type and a better VU meter that now shows all 18 OPL3 channels. Of course the floppy disk is still there and there are two additional buttons for repeat and shuffle that work with the new playlist.
I wanted to have a playlist for the media player since I first implemented it and OPL Studio users have also requested this feature several times. So a few months ago it was finally time to implement what I though would be a simple addition. I was so wrong!
The playlist is nothing more than an array of media file paths. While that's easy enough on your regular computer, it quickly becomes a problem on a micocontroller with 1MB of memory. A user might download the full OPL Archive, drop it on an SD card and use it as a playlist. That's never going to fit in memory. So how to deal with this?
My first idea was that a playlist can only be a reference to a folder on the SD card and that the user needs to take care of compiling the playlist offline on their computer. It's a simple solution but not very flexibe and user friendly. Still it required some significant extra UI work, because apart from all of the additions to the player I also need new dialogs, for example a folder selection to select the playlist folder.
I didn't like this idea so what I went for was to have the playlist as a file on the SD card. It eliminates the issues with large playlists, though I still need to be a bit smart about performance when updating the playlist and searching through a potentially large file, but the implementation in the media player app would be much simpler.
So this is what I ended up doing and once I was able to select files add / remove them to my playlist I though I had passed all hurdles. However some very strange things started happening... Whenever I needed to go from one song to the next on the playlist OPL Studio would give me a bunch of errors about not being able to load a file and generic SD card errors. Also whenever I was opening the playlist while one song was playing it would just jump to another song.
After a lot of head scratching I found the issue and I was not happy. The SD library I was using was unable to deal with multiple File handles at a time it seemed. A quick look at the SD.h file confirmed what I was fearing:
// Note that currently only one file can be open at a time.
A look at the Github repository showed that also the latest version of the library does not support multiple files at once. I started to think... Should I look for a different library? Should I extend my SD card controller to simulate multiple files by quickly opening, closing and seeking between files? It seemed difficult but doable (maybe), but really not worth it just for a playlist.
Back to the drawingboard! Finally what I ended up doing was to have the playlist reserve 2kb of memory when the media player is opened. This is where the file entries will be stored. The playlist will still be loaded and saved from the SD card when the media player opens and closes. But the number of entries on the playlist will be limited by the 2kb memory block. So the full OPL Archive in one playlist is not going to happen, but a playlist of about 100 songs is still possible. Though you need a lot of patience to make such a playlist as for now adding a complete directory at once is not yet supported.
The coolest the new feature in the media player is the analyzer. Another feature that I started working...
Read more »Yesterday the OPL Studio software v2.4.1 was released. No major changes in this one, but still some interesting things to mention...
When you have OPL Studio connected to your PC you can select it as a MIDI device in GZDoom. However in older OPL Studio versions the DOOM music, which a lot of us probably know very well, would sound off. Just a few seconds into E1M1 when the first pitch bends happen the music would break and sound terrible.
This is now fixed in this software update, but it requires chaning a setting on the MIDI settings panel. The problem is that GZDoom is not resetting the pitch bend, or it's assumes that pitch bend is reset on key release, while OPL Studio uses a continuous pitch setting.
In order to have proper pitch bends in GZDoom go to Settings > MIDI and disable the 'Continuous pitch bend' checkbox.
What has also changed in the MIDI settings is that you are no longer limited to a 1 or 2 semi tone pitch bend. You can now choose from anywhere between 1 and 12 semitones, but 2 remains the default.
And if I can make a little recommendation: get the Dead See Scrolls mod. The music for which was made by Shapeless Cube using OPL Studio.
I've added additional background patterns to the display settings that allow you to customize the home screen more to your liking. The new patterns were all taken from the Windows 95 background settings to stick with the theme of the UI.
Version 2.4.1 now allows you to map MIDI controls for play, stop and record. So you no longer have to use the touch screen for the transport controls, but you can control playback from your MIDI rig.
OPL Studio v2.4.0 is here and I'm happy to introduce the new patch editor and most of all the new patch effects feature! The new release can be found on Github and on the website www.cheerful.nl
In the previous log I already talked about patch effects. If you know about Adlib Tracker II macro's then you'll be instantly familiar with OPL Studio's patch effects, but if you're not then let me explain.
Patch effects allow you to create much more complex and better sounding instrument patches, because you can change the parameters of a patch for individual notes while they are playing. A good example of this would be a bass drum. The regular bass drum patch of OPL Studio is a very familiar DOS / Windows 95 / Sound Blaster MIDI instrument that sounds very flat. But thanks to patch effects we can make it much better sounding. We will do this by, after the initial kick, quickly lowering the pitch of the drum note. Something you may be familiar with if you ever listen to C64 SID tunes or other chip tune music.
When a note starts playing it gets assigned a tick counter which is incremented every 1/60th of a second. If the patch that's being used by the note has an effect, or multiple effects, that should be applied on the current tick then OPL Studio will update the OPL parameters for the OPL channel where the note is playing. This works on an individual note basis and you can still apply MIDI CCs or analog CCs on top of this for the MIDI channel. In other words patch effects allow you to completely change the patch for a note while it's playing!
This may sound very complicated, but once you start to play with it it all starts to make sense.
Of course with the new patch effects the Patch Editor module needed an update. On top of the screen there are two tabs to select between the melodic and perussive instrument banks. This replaces the small slider we had before and it makes room for the editor mode selection where you can choose between the familiar operator ecitor and the new patch effects editor.
When you select the effects editor the screen will change and shows you a list of all the effects that have been set for the patch. The list shows you at which note tick a prticular effect will be applied, the type of effect, it shows you the operator(s) that will be changed when applicable and it show you the value of the effect.
Below the list we have the buttons to add, remove, clear or bypass the effects. This should be clear, though bypass may need a little more explanation. When bypass is enabled (it will show red) all patch effects will be bypassed and you will only hear the basic sound from the operators and any MIDI CCs that you have applied. This can be handy when you're tweaking your instruments.
Nelow the buttons there are the controls to setup the effect. You choose the effect to apply, clicking on the effect name will open a list where you can select from all available effects. Next you can set the note tick where to apply the effect. Notice that as you change the tick your effect will move up / down the list. Finally we can set the effect parameter value and choose the operator where to apply the effect to.
The menu bar also has received a little update to make it less cluttered with clear Bank, Patch and Edit submenus. The Bank and Patch menus now allow yout to save / load full instrument banks or individula patches in a more clear way. You are now also able to restore the instrument bank back to default patches when you select Bank --> New instead of having to start a new session.
OPL Studio v2.4.0 also instroduces 2 new file formats *.OSB and *.OSI. These are to store full instrument banks and individual instruments respectively. Some new file formats were needed as the existing file formats were not suitable to save the patch effects. Documentation for these formats will follow soon in the updated OPL Studio manual.
The existing OPL Studio session file...
Read more »It's a month since the last update and I'm very happy to announce that the new patch editor is almost ready!
It's had a complete rewrite over the course of several weeks with many small improvements such as the tabbed view to make it more clear that you're working with melodic or percussive patches.
The menu bar at the bottom of the screen is much cleaner now with bigger buttons and sub menus that are indicated by small tabs at the bottom right corner of a button. Now that the menu has been broken up features like loading and saving have also becom more clear. On the old patch editor, for instance, there would be a load and save button that was both used to load/save complete instrument banks or indiidual patches. This has now been made more clear: the 'Bank' menu is used to access functions for the instrument bank such as new, load and save. The 'Patch' menu is used for patch functions such as clear the patch, revert, import and export a single instrument patch.
However the biggest change in the Patch Editor comes from the Operator and Effect buttons in the top part of the window. This changes the editor between the operator editor and the all new patch effects editor.
Patch effects allow you to change patch parameters while a note is playing, similarly to how many trackers work. For instance apply a pitch slide to a patch and every note that is played will have a built-in pitch change without any MIDI input needed.
The patch effects editor shows a list of the effects that have been added to the patch and the order in which they are applied when a note is played. Each effect has a tick, a 60 Hz update tick that starts counting when a note starts playing. On every tick OPL Studio will apply all the patch effects that are supposed to be triggered on that tick. So the list shows you the tick where the effect occurs, the effect to apply, the affected operators and the parameter value to set. This means that you can almost completely reconstruct your patches while they are playing and allowing for some really cool effects!
Now that the Patch Editor is feature complete I will spend some time to test it all and to update some of the related code. For example the OPL Studio session files need to be updated in order to save patch effects. There will also be two new file types for OPL Studio banks and individual instruments to handle the patch effect data.
A little while ago I was the guest in the 2nd episode of Arman Bohn's new podcast Tiny Synths and Friends. A podcast about small synthesizers and the people who create them. We had a fun conversation about old computers and games, music and the joy and struggles of creating these little devices. Be sure to give it a listen here: https://www.buzzsprout.com/2442026
A few days ago I released the v2.3.1 software for OPL Studio. The main change, apart from some bug fixes, in this release is that the media player is now much more capable of playing more complex tunes.
I was contacted by a user who was trying to play a VGM tune that seemed really extreme with regards to all the register updates it was doing. Playback speed was all over the place making it very unpleasant to listen to. This was caused by not having implemented any proper buffering strategy in the media player. It would pretty much read the data directly from the SD card when it needed it, assuming that the delays between register updates would be sufficient to not affect the playback speed. That was quite an oversight as this song made painfully obvious. After implementing some proper buffers this is now fixed.
Having these buffers also opens the door for some exciting future upgrades to the media player such as an OPL inspector where you can see the registers of the OPL chips being updated while the song plays, you can step through the song update by update and grab the data from a channel and import it into a patch. Some early experimenting with this can be seen below. It will be added to a later release...
The whole reason to rewrite the synthesizer engine of OPL Studio last year was to have support for MIDI CCs that change OPL parameters and to add support for patch effect. And after many months of failed attempts and overcomplicated implementations now is the time that I can say that the next release of the OPL Studio software will add support for patch effects!
But what are patch effects? Patch effects will allow you to change OPL parameters while a note is playing without MIDI CCs or analog synth inputs. The parameter changes come from the patch itself. For example when you play a bass drum from the default instrument bank you might say that it sounds a bit shallow when you compare it to some OPL2 VGM music that was created with a tracker. The secret is that those tracker programs will change the parameters of the OPL2 instrument while a note is playing. Take our bass drum again and you might find that the tracker is rapidly decreasing the note frequency after the initial key on to get a more convincing sound. OPL Studio on the other hand is just playing the initial note frequency and this causes the drum sound to be a bit shallow.
With patch effects you can change the pitch, change output level, set wave form, set frequency multiplier or set feedback of all operators and this allows these tracker effects on OPL Studio! Patch effects are implemented as an effect chain. This means that every effect has a certiain tick wehere it occurs, it has the effect parameters and then it points to the next effect that may immediately trigger on the same tick, or on a later tick. The ticks are counted from when a note starts in steps of 1/60th of a second, so every 1/60th of a second OPL parameters may change due to a patch effect. And because patch effects have the ability to jump to a certain point within the effects chain you can create effect loops to add modulation or to create very nice arpeggios without the need to sequence this from MIDI or analog inputs.
I don't have any UI yet for this, but the patch effect editor will be added to the Patch Editor module. I'll probably do some cleanup of the UI there as well especially around the menu since it's a very crowded screen!
Today I released new v2.3.0 OPL Studio software. It took a while to get this one finished, cause being sick 3 times in 2 months doesn't make you very productive. Anyway, in this release the big new feature is the drum sequencer.
The old drum sequencer has been with OPL Studio and left mostly unchanged since the beginning of the project and it was showing a bit. The new drum sequencer is a lot nicer to use with a piano roll style editor where all drum tracks are visible, instead of just one at a time. Other new features that I will probably bring to the melody sequencer as well are the extend sequence button and looped recording.
The extend sequence button is used to increase the number of steps in the sequence and at the same time copy the last 16 steps to the newly extended part of the sequence, saving a lot of time copying parts.
Looped recording is added so a MIDI recording will wrap around to the beginning of the sequence instead of stopping at the end. This works better when, for example, you have the metronome enabled and you're getting a feel for the beat while the recording loops, or if you want to add additional drum sounds to the sequence.
You can see the new drum sequencer in action in the video below.
Version 2.3.0 also marks the end of the software releases that support the Teensy 3.6. The 3.6 is too limited to run OPL Studio at its full potential and besides that, OPL Studio now includes a Teensy 4.1 in every order so it doesn't make much sense anymore to keep support going for it.
The new software can be downloaded from the OPL Studio project page at www.cheerful.nl.
By now OPL Studio software v2.2.2 has been released and together with v2.2.1 it contains many improvements to fix bugs and annoyances. Only a few small new features were added, these being the biggest two:
In this version of the software OPL Studio's Patch Editor got support for the *.OPLI single instrument format used by the OPL3 Bank Editor. This format is one of the more flexible as it can store 2-OP, 4-OP and pseudo 4-OP patches. Full instrument bank support will be added in a future release.
The Live Sequencer got a few bugs fixed and it received two new buttons to copy all sequences from one bank to the other with a single click.
Something that I didn't pay enough attention to while working on the software of OPL Studio was keeping the manual up to date. The manual was still showing the 1.something software and in some places some very outdated information. This has now been rectified with the updated OPL Studio Manual that targets the v2.2.2 software. This has taken me much longer than I had hoped for and now I finally updated it I will try to do a better job keeping it up to date.
The next big thing will be the update of the drum sequencer. This part of the UI has been left untouched almost since the first release of OPL Studio and it shows if you compare it to the rest of the UI.
For the new drum sequencer the biggest change will be that there is going to be a piano roll style editor, like the melody sequencer. The big improvement here is that you can see all drum tracks in one view instead of having to switch between the different tracks. Editing will be more streamlined in that you will be able to draw notes by dragging the stylus.
Also the sequence editors, patch editor and the live sequencer need to play nicer with each other. Currently the interection is a bit lacking if you're trying to edit patches or sequences while the live sequencer is playing, or the navigation overall to switch between the different app modules needs to be improved.
Currently development is well underway and the new drum sequencer is taking shape!
Although calling it a facelift may be too big of a statement, there will be an update to the front panel of OPL Studio soon. Nothing too big, just going to make it look more interesting. This will be something for the next log when I have the new front panels available.
The OPL Studio v2.2.0 software is now available! I held off releasing this version a little longer, because there was one additional improvement that I wanted to make specially for the Maker Days. The new software can be downloaded here.
This release contains the MIDI CC mapper and auto save fearures that I talked about in the previous project update, but it also has an update on what was previously the Quad Sequencer.
The Quad Sequencer was previously intended as a module that you could use for live playing with your OPL Studio sequences. It was functional, though it had some big limitations. There were only 4 slots available and there was no ability to switch a bunch of sequences at once. In the v2.2.0 software this has been changed and the Quad Sequencer had now become the live Sequencer.
There are now 2 banks of 6 sequences for you to play with. You can play sequences from one bank while you're preparing the sequences in the second bank and then cue the bank to start playing at the next transition. A bit like a DJ preparing the next record to play on a second turn table.
This update I wanted to add especially for the Maker Days!
On September 14 and 15 it's Maker Days in Eindhoven, The Netherlands! If you're in the area be sure to come to the event on the Stadhuisplein where I will be present to show OPL Studio and my other projects such as the OPL2 Audio Board, OPL3 Duo!, my LED signs and indoor / outdoor thermometers. I'll have a limited number of kits available for purchase at the event, but in any case if you have the chance be sure to visit and say hi!
I'll have OPL Studio set up with a MIDI keyboard so you can try it out for yourself, there will be an OPL2 setup to drum and play piano and you can listen to some awesome DOS game music played by an old XT PC through one of my OPL2 Audio Boards.
This year I'm also participating in the Maker Night on Friday September 13 where I'll give a live demo of OPL Studio
Time for some new updates. The v2.2.0 software is ready and contains two new features that I will talk a bit about today.
The MIDI CC Mapper that I've been talking about for a long time is ready! You can use it to map MIDI controls to Synthesizer controls. By default OPL Studio maps volume, panning and modulation to channel volume, panning and vibrato. But now you can map additional controls for example to control the vibrato rate and depth, tremolo, or have direct control over OPL patch parameters.
The MIDI CC Mapper can be found in the Synthesizer Setup app. To add a new control simply click add and choose the MIDI control and the synthesizer control where it gets mapped to. To make your life a bit easier you can click on Sample MIDI, change the control and OPL Studio will detect it as the MIDI control to be mapped.
With mappings for OPL parameters in place you can now also use your MIDI equipment in the patch editor to change parameter values.
In the last decade we've become used to applications that auto save our work. You type a note in a text editor like Sublime Text, you close the app and when you open it again a day later your note is still there, even though you didn't explicitly save it. This is really handy and it started to annoy me that OPL Studio didn't do this, especially while working on the MIDI mapper. Each time I changed something in the code OPL Studio would reboot and forget all of the changes I had made. This had to change!
You now have the option to auto save your current session to the SD card. Each time you close one of the app modules OPL Studio will write your current session to the SD card. When OPL Studio restarts and it finds a previous session on the SD card it will restore the session and you can immediately continue where you left off.
Auto save is enabled by default, but can be disabled in the OPL Studio settings.
The v2.2.0 software update that includes the MIDI CC Mapper and Auto Save feature will be available two weeks from now when I get back from holiday.
The other day I was contacted by an OPL Studio user who wasn't happy that the unit was sitting flat on his desk. So what he did was design a stand that clips around the sides of OPL Studio to have it sit at an angle. He contacted me to share the model and I must say I'm not sure how I could've lived without it. The two legs fit snugly around the unit and it makes it really comfortable to use, plus it just makes the unit look nicer.
You can download the STL for the stand here to give your OPL Studio some legs. You might as well want to flip the stylus holder when you're using this stand. You can do this by 3D printing the stylus holder model and mirroring it around the Y-axis in your slicer. You can find all parts for the OPL Studio enclosure on Printables.
Create an account to leave a comment. Already have an account? Log In.
Hi, sorry for taking so long to reply! But yes that’s possible. OPL Studio shows up as a MIDI device on your PC or you can play the MIDI files from SD card on OPL Studio’s built in media player. It uses the same instrument definitions as back in the day so it will sound exactly the same or at least really really close to the original.
This thing is incredibly well thought out and beautiful! Thanks a lot for making this.
I just ordered one of the current boxes with the external opl3 chips. I wonder If I could mod the chip so that I can make the box have multiple outs?
I have read that one chip has in theory four output channels. And it's a dual so there should be 8 possible outs for this, correct?
Would it be possible to tinker with the hardware a bit and then assign the channels in the software so that half the audio channels go to the second channel? Or to have the drum channels on a separate out?
Would be bloody useful to be able to mix that separately or record multi tracks. Thanks in advance for any help or pointers! Really looking forward to the opl studio :))
Unfortunately it's not possible to mod OPL Studio this way. With the 2 OPL3 chips you can indeed have 8 differen output channels, but the OPL3 board and OPL Studio lack support for this. It would require two additional DACs, filters and maybe some more changes to the hardware as well as implementing all the routing of the outputs in the software to make this possible.
If you're willing to sacrifice panning then you can use the OPL3's hard panning to separate the channels over outputs A and B which are used for the left / right audio channels.
Wow! That is very cool! I'm searching for OPL3 standalone device. Yours is even more interesting!
This is great, really love the dos look to the ui. Whenever boards are available I'll take a set, bare is fine. Can source and assemble myself, take my money please.
I would like to place a preorder for a preorder. Lol
This project is awesome. I just bought one of your OPL3 Duo. Would it be possible to replicate this build? If you need beta tester or maybe help. I studied music recording than Multimedia at university and worked on app/interface development. I also own a professional recording studio and can produce real good demo. Im getting back into Arduino coding after a long break. Really like where your going with all your implementation. I currently jam a lot sequencing all the channel of a Roland MT-32 like you do with your build. Keep up the great work.
Sorry for the late reply. Thanks for your interest! I want to have the project ready for an early beta in a month or two. By then some feedback on the features, workflows and connecting it to an existing setup will be really appreciated. I'll reach out to you around that time to let you know :)
Become a member to follow this project and never miss any updates
Greg Kennedy
DeckerEgo
Michael Wessel
AndrewMcDan
This is a great product. Very interesting.
I don't have much knowledge so let me ask you a question.
I like old games from the time of Windows 95.
Their BGMs are MIDI and are made for Sound Blaster 16.
I am interested in OPL Studio since it has OPL3, just like Sound Blaster 16.
With OPL Studio, is it possible to play those games' BGMs on my Windows 10 PC with the same sound as the originals?
Those games will not run on my Windows 10 PC, but I would be happy if I could play the MIDI files of the BGMs on a real chip.