Zynq and the OPL3 Music Synthesizer

We’re big fans of the Zynq, which is an answer to the question: what do you get when you cross a big ARM processor with a big FPGA? So it isn’t surprising that [GregTaylor’s] project to emulate the OPL3 FM Synthesis chip in an FPGA using the Zynq caught our eye.

The OPL3 (also known as the Yamaha YMF262) was a very common MIDI chip on older PC sound cards. If you had a Sound Blaster Pro or 16 board, you had an OPL3 chip in your PC. The OPL3 was responsible for a lot of the music you associate with vintage video games like Doom. [Greg] not only duplicated the chip’s functions, but also ported imfplay from DOS to run on the Zynq’s ARM processors so he could reproduce those old video game sounds.

The Zybo board that [Greg] uses includes an Analog Devices SSM2603 audio codec with dual 24-bit DACs and 256X oversampling. However, the interface to the codec is isolated in the code, so it ought to be possible to port the design to other hardware without much trouble.

To better match the original device’s sampling rate with the faster CODEC, this design runs at a slightly slower frequency than the OPL3, but thanks to the efficient FPGA logic, the new device can easily keep up with the 49.7 kHz sample rate.

Using an FPGA to emulate an OPL3 might seem to be overkill, but we’ve seen worse. If you prefer to do your synthesis old school, you can probably get a bulk price on 555 chips.

Continue reading “Zynq and the OPL3 Music Synthesizer”

Forgotten Rock Band Drum Controller as a MIDI Instrument

Happen to have an old Rock Band drum controller collecting dust in your living room? If you also have a spare Arduino and don’t mind parting with that plastic college memento then you’ve got the bulk of what could potentially be your new percussive MIDI instrument. In his project video [Evan Kale] outlines the steps necessary to turn that unloved plastic into a capable instrument for recording.

The whole process as outlined by [Evan] in under seven minutes. This looks like a great weekend endeavor for those of us just starting out with MIDI. After cracking the back of the Guitar Hero drum kit controller open, the main board within is easily replaced with a standard sized Ardunio (which matches the present mounting holes exactly). About 4:50 into the video [Evan] explains how to add a basic perf-board shield over the Arduino which connects the piezo sensors in each of the drum pads to the analog pins of the micro-controller. The MIDI jack that comes built into the back of the kit can also be reused as MIDI out when wired to the Arduino’s serial out pin. By adjusting [Evan’s] example code you can dial in the instrument’s feedback to match the intensity of each hit.

The video with all of the details is after the jump. Or you can check out a MIDI hack that goes the other way and uses a drum kit as a Guitar Hero or Rock Band controller instead

Continue reading “Forgotten Rock Band Drum Controller as a MIDI Instrument”

Hackaday Prize Entry: Orchestral Invention Defies Convention

Like many of us, [Laurens] likes video game music and bending hardware to his will. Armed with a Printrbot, a couple of floppy drives, and some old HDDs, he built the Unconventional Instrument Orchestra. This 2015 Hackaday Prize contender takes any MIDI file and plays it on stepper and solenoid-based hardware through a Java program.

A while back, [Laurens] won a Fubarino in our contest by using a MIDI keyboard and an Arduino to control the Minecraft environment with Legend of Zelda: Ocarina of Time songs. The Unconventional Instrument Orchestra uses that Fubarino of victory to control the steppers of two floppy drives. He only needed three pins to control the drives—one to enable, one to set the head’s direction, and one to make it step once per pulse.

If ever you’ve been around a 3D printer, you know they make music as a natural side effect. The problem is getting the printer to obey the rests in a piece of music. In order to do this, [Laurens] used his software to control the printer, essentially withholding the next command until the appropriate time in the song.

The percussive elements of this orchestra are provided by a hard drive beating its head against the wall. Since it’s basically impossible to get an HDD to do this as designed (thankfully), [Laurens] replaced the control board with a single transistor to drive the coil that moves the head.

[Laurens] has made several videos of the orchestra in concert, which are a joy all their own. Most of the visual real estate of each video is taken up with a real-time visualization of the music produced by the software. There’s still plenty of room to show the orchestra itself, song-specific gameplay, and a textual commentary crawl in 16-segment displays. Check out the playlist we’ve embedded after the break.

The 2015 Hackaday Prize is sponsored by:

Continue reading “Hackaday Prize Entry: Orchestral Invention Defies Convention”

Transmitting MIDI Signals With XBEE

What do you do when you want to rock out on your keytar without the constraints of cables and wires? You make your own wireless keytar of course! In order to get the job done, [kr1st0f] built a logic translator circuit. This allows him to transmit MIDI signals directly from a MIDI keyboard to a remote system using XBEE.

[kr1st0f] started with a MIDI keyboard that had the old style MIDI interface with a 5 pin DIN connector. Many new keyboards only have a USB interface, and that would have complicated things. The main circuit uses an optoisolator and a logic converter to get the job done. The MIDI signals are converted from the standard 5V logic to 3.3V in order to work with the XBEE.

The XBEE itself also needed to be configured in order for this circuit to work properly. MIDI signals operate at a rate of 31,250 bits per second. The XBEE, on the other hand, works by default at 9,600 bps. [kr1st0f] first had to reconfigure the XBEE to run at the MIDI bit rate. He did this by connecting to the XBEE over a Serial interface and using a series of AT commands. He also had to configure proper ID numbers into the XBEE modules. When all is said and done, his new transmitter circuit can transmit the MIDI signals wirelessly to a receiver circuit which is hooked up to a computer.

An Electronic Woodwind With An Onboard Synthesizer

About a year ago, we saw a project on Hackaday.io for a MIDI wind controller. Keyboard MIDI controllers are a dime a dozen, but if you want something that actually sounds like a brass or woodwind instrument, you need something that’s controlled by a breath sensor. Since then, this project has been updated with an onboard synthesizer. It sounds great, and thanks to some interesting components, the part count is actually really low.

The synthesizer used for this project is just a single chip – the DSP-G1 from [Jan Ostman]. This isn’t a custom ASIC or anything fancy; it’s just an 8-pin ARM microcontroller in DIP format, the LPC810.

The rest of the instrument is just a series of pressure sensors along the body, and a breath sensor. The plan is to stuff all the electronics – a microcontroller to read the touch and breath sensors, the DSP-G1 chip, and the battery  – inside the body of the instrument. That’s something that would be incredibly cool, and much more capable than the wind controllers that are available today.

You can see a few videos of the wind controller below.

Continue reading “An Electronic Woodwind With An Onboard Synthesizer”

SamplerBox Uses Raspberry Pi 2 to Make Music

[JosephErnest] wanted a cost-effective alternative to the commercially available MIDI samplers and expanders on the market. He also wanted to avoid being tethered to a computer all the time. His solution is the SamplerBox, a standalone drop-and-play sampler that costs less than 100 euros to make. Simply insert an SD card with your sample set in WAV format, boot it up, and play it through your keyboard or MIDI controller to your heart’s content!

[JosephErnest] used a Raspberry Pi 2 in the SamplerBox because it provided higher performance. He wasn’t thrilled with the sound quality of its built-in soundcard, so he installed a USB DAC PCM2704 (an older model, but any USB DAC will do) to output the audio. He also installed a USB card reader to make switching SD cards containing sampler sets easier while keeping the Pi 2’s own microUSB card exclusively for the OS and software. Both a DIN MIDI connector and USB are included as MIDI inputs in the design. If you only plan to use a USB, the MIDI connector can be omitted from the build. The software is written in Python and cython which allows the Pi 2 to have over 128-voice polyphony. Users can also create their own sample sets to use with the SamplerBox. Preset changes can be made on the fly. All we need to rock out are some music lessons!

Continue reading “SamplerBox Uses Raspberry Pi 2 to Make Music”

Pendulum MIDI Controller Really Swings

Once in a while, we see a project that makes us want to stop whatever we’re doing and build our own version of it. This time, it’s Modulum, a pendulum-based MIDI controller. It’s exactly what it sounds like. The swinging pendulum acts as a low-frequency oscillator. In the demo video configuration, you can hear it add a watery, dreamlike quality, sort of like a lap steel guitar on LSD.

The pendulum’s motion is detected by four pieces of stretchy, conductive cord. These are wired to an Arduino Nano in a voltage divider fashion. [Evan and Kirk] used the Maxuino library to determine x and y mapping of possible pendular positions as well as perform the necessary MIDI processing. Get your groove on after the break, and check out some of the many other fantastic MIDI controllers we’ve had the pleasure of covering.

Continue reading “Pendulum MIDI Controller Really Swings”