Close

Creating a beat demo & Fun with SD cards

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

The ultimate dual OPL3 MIDI syntesizer with touch screen

maarten-janssenMaarten Janssen 05/05/2021 at 15:220 Comments

wrapping up some left overs first

What I still had to do last time is to add a dialog box in the melody sequencer to choose a color and pattern for your sequence. This will make it easier for you to recognise sequences later in the composer module that I still have to get started on. The idea for the composter is that you can arrange drum and melody sequences to create bigger sequences, loops and maybe simple tunes.

Next to this dialog I also managed to fix a few bugs in the mixer panel. It would not always update the patch names when a program change happened and the solo / mute also had a very subtle bug where it would mute the wrong channel very briefly. For the mixer panel that should wrap things up for now. Maybe some small additions later...

SD card reader

This week I've spent most of the time n getting the SD card to work. This has been kind of a pain due to broken SD cards, confusing library code and faulty wiring. For the SD card I want to use an external module instead of the card reader on the Teensy. This is so that I'm not tied to the layout of the Teensy and I can put the SD card anywhere I want in the final version. I decided to use the cardreader that's built-in to the back of the LCD display for now. For the library I thought to use SdFat since I had used it in the past and it had a smaller footprint than the default SD library. Unfortunately there was a new version that I couldn't get to work. Too many configuration options and confusing code. Since I have the luxury of a Teensy I opted for the regular SD library to get the job done!

So after spending a lot of time on the very basics of just getting the interfact to the SD card working I got to the point where I can now list the items in a folder and draw them on the screen. I made a little test screen as you can see below. Still a long way from loading / saving files.

There is something strange with the SPI interface of the SD card reader on the LCD display. If the card reader is connected to the SPI bus then it will clobber any data sent to the OPL3 Duo after writing to the LCD. This happens regardless of having an SD card in or not. It's strange, but given that the card reader seems to be added to the display as a 'nice to have since we have the space for it on the PCB' it wouldn't surprise me if some corners were cut...

Demo time!!

Finally for this log I made a longer demo video that shows the current state of the OPL Studio. In this one I'm sampling the MIDI events on one of the channels from a song I'm playing from my laptop. It shows how to trigger a recording when a note-on MIDI event is received. After recording the sequence I move it to MIDI channel 1 so I can change the parameters of the instrument patch and hear the result at the same time. I play around with the patch until I have something I like and finally i'm adding a drum sequence to finish things off.

Discussions