Posts with «midi» label

Pour One Out for This Bottle-Playing Robot

If you have an iota of musicality, you’ve no doubt noticed that you can play music using glass bottles, especially if you have several of different sizes and fill them with varying levels of water. But what if you wanted to accompany yourself on the bottles? Well, then you’d need to build a bottle-playing robot.

First, [Jens Maker Adventures] wrote a song and condensed it down to eight notes. With a whole lot of tinkling with a butter knife against their collection of wine and other bottles, [Jens] was able to figure out the lowest note for a given bottle by filing it with water, and the highest note by emptying it out.

With the bottle notes selected, the original plan was to strike the bottles with sticks. As it turned out, 9g servos weren’t up to the task, so he went with solenoids instead. Using Boxes.py, he was able to parameterize a just-right bottle holder to allow for arranging the bottles in a circle and striking them from the inside, all while hiding the Arduino and the solenoid driver board. Be sure to check it out after the break.

Don’t have a bunch of bottles lying around? You can use an Arduino to play the glasses.

Lo-Fi Orchestra Learns Tubular Bells

Hardware projects often fall into three categories: Those that flash lights, those that make sounds and those that move. This virtuoso performance by [Kevin]’s “Lo-Fi Orchestra” manages all three, whilst doing an excellent job of reproducing the 1973 musical classic Tubular Bells by Mike Oldfield.

Producing decent polyphonic sounds of different timbres simultaneously is a challenge for simple microcontroller boards like Arduinos, so [Kevin] has embraced the “More is more” philosophy and split up the job of sound generation in much the same way as a traditional orchestra might. Altogether, 11 Arduino Nanos, 6 Arduino Unos, an Arduino Pro Mini, an Adafruit Feather 32u4, and a Raspberry Pi running MT32-Pi make up this electronic ensemble.

Arduino Servo & Relay Drumkit

The servo & relay drumkit is a particular highlight, providing some physical sounds to go along with the otherwise solid-state generation.

The whole project is “conducted” over MIDI and the flashing sequencer in the middle gives a visual indication of the music that is almost hypnotic. The performance is split into two videos (after the break), and will be familiar to fans of 70’s music and classic horror movies alike. We’re astonished how accurately [Kevin] has captured the mood of the original recording.

If this all looks slightly familiar, it may be because we have covered the Lo-Fi Orchestra before, when it entertained us with a rousing rendition of Gustav Holst’s Planets Suite. If you’re more interested in real Tubular Bells than synthesized ones, then check out this MIDI-controlled set from 2013.

Rotary Phone MIDI Controller Still Makes Calls

[Kevin] has long wanted to do something musical with a vintage rotary phone and an Arduino, and has finally done so and committed the first of several experiments to HTML in a five-part series. He found a nice old British Telecom number, but it had been converted to plug and socket wiring to work on the modern system. Because of this, [Kevin] wanted to keep it completely functional as a phone. After all, it ought to work fine until 2025, when pulse dialing will no longer be supported in [Kevin]’s locality.

As you can likely understand, [Kevin] was keen to interface with the phone from the outside and leave the inside untouched. He used a sacrificial ADSL filter’s PCB to break out the socket, and added a pull-up resistor between the pin and 5 V.

Pretty quickly, [Kevin] figured out that when the phone is on the hook, it gives a constant high signal, where as the picking up the phone presents as a high signal going low, and dialing each number results in pulses of that quantity that alternate between high and low.

In part two of the series, [Kevin] really gets into decoding the pulse dialing, which is necessary for the third installment when things get musical. Here, [Kevin] adds in a MIDI module and a Roland MT-32 synth to use the dial as a MIDI note generator — each note dialed will sustain until the receiver is replaced on the hook.

Part four focuses on a MIDI patch changer. [Kevin] picks up the phone, dials a code up to three digits long, and hangs up, which this triggers the synth to change to the assigned voice. In part five, the phone becomes a random note sequencer, and each successive spin of the same digit will produce a different, randomly-chosen note. This is really just the beginning, however, so we’ll be checking back for updates. In the meantime, you can listen to the note generator and the random note sequencer demos after the break.

Wouldn’t you like to use a rotary dial all the time? Well, as long as it wasn’t an emergency?

Sending MIDI Wirelessly With The nRF24L01

MIDI is a standard known by musicians and instruments all over the world. The basic twist on regular serial has helped studios around the world to work more efficiently. [Kevin] wanted to try sending MIDI data wirelessly, but rather than the typical Bluetooth solution, decided to use the humble nRF24L01 instead.

The circuitry used is simple: [Kevin] simply wired up two Arduino Unos with nRF24L01 radio modules, which communicate over SPI. Alternatively, an even quicker solution is to use a Keywish Arduino RF Nano, which packs a nRF24L01 on board. One Arduino can then be hooked up to a MIDI OUT port on an instrument, and it will send out MIDI signals wirelessly. The second Arduino can then be plugged into a MIDI IN port and repeat out what it receives over the air.

The real work was in the firmware, which takes MIDI data and packages it in a suitable form to send out over the nRF24L01. The system can operate in a one-to-one mode, emulating a single MIDI cable, or a multicast mode, where one sender transmits information to many receivers.

It’s a neat hack and one we could imagine would be useful in some fun performance situations. We’ve seen others do work on wireless MIDI interfaces for Eurorack hardware, too. Video after the break.

You Can Send MIDI Over I2C If You Really Need To

The Musical Instrument Digital Interface has a great acronym that is both nice to say and cleanly descriptive. The standard for talking to musical instruments relies on a serial signal at 31250 bps, which makes it easy to transmit using any old microcontroller UART with a settable baud rate. However, [Kevin] has dived into explore the utility of sending MIDI signals over I2C instead.

With a bit of hacking at the Arduino MIDI library, [Kevin] was able to get the microcontroller outputting MIDI data over the I2C interface, and developed a useful generic I2C MIDI transport for the platform. His first tests involved using this technique in concert with Gravity dual UART modules. After he successfully got one running, [Kevin] realised that four could be hooked up to a single Arduino, giving it 8 serial UARTS, or, in another way of thinking, 8 MIDI outputs.

At its greatest level of development, [Kevin] shows off his I2C MIDI chops by getting a single Raspberry Pi Pico delivering MIDI signals to 8 Arduinos, all over I2C. All the Arduinos are daisy-chained with their 5V and I2C lines wired together, and the system basically swaps out traditional MIDI channels for I2C addresses instead.

There’s not a whole lot of obvious killer applications for this, but if you want to send MIDI data to a bunch of microcontrollers, you might find it easier daisy-chaining I2C rather than hopping around with a serial line in the classic MIDI-IN/MIDI-THRU fashion.

We’ve seen [Kevin]’s work before too, like the wonderful Lo-Fi Orchestra. Video after the break.

Hack a Day 16 Feb 06:00

Harp Uses Frikin’ Lasers

We aren’t sure if you really need lasers to build [HoPE’s] laser harp. It is little more than some photocells and has an Arduino generate tones based on the signals. Still, you need to excite the photocells somehow, and lasers are cheap enough these days.

Mechanically, the device is a pretty large wooden structure. There are six lasers aligned to six light sensors. Each sensor is read by an analog input pin on an Arduino armed with a music-generation shield. We’ve seen plenty of these in the past, but the simplicity of this one is engaging.

We’ve used the copper tape writing trick ourselves and it is quite effective. The tape is often used for stained glass work and sticks to many surfaces. You can solder to it and solder overlaps where you need connections. The results are often as good as a simple single-sided PCB.

The code attached to the post is fairly straightforward and the MIDI shield does the bulk of the work. It should also make it easy to create some really impressive musical effects with a bit of extra coding.

If you want an artsy self-contained version, check out this previous Hackaday Prize entry. We’ve seen several of these at different levels of complexity.

Touchscreen Makes For A Neat Wavetable Synth

A popular tool in chiptune software like LSDJ allows the user to draw a waveform and use it as the basis for a wavetable synth. It’s fun and it can produce some great bleeps and bloops. [Kevin] has created a similar tool using an Arduino and a touchscreen.

You can draw the waveform! That’s neat.

The build is based on the Arduino Uno, the humble mainstay of the Arduino line. It’s hooked up to an ILI9488 color touchscreen display, which acts as the primary user interface. Using a stylus, or presumably a finger, the user can draw directly on the screen to specify the desired waveform for the synth to produce. The Arduino reads the step-by-step amplitude values of the drawn waveform and uses them to synthesize audio according to MIDI messages received over its serial port. Audio output is via PWM, as is common in low-cost microcontroller projects.

It’s a fun build and we’re sure [Kevin] learned plenty about wavetable synthesis along the way. We’ve seen his work on other Arduino synthesis projects before, too! Video after the break.

MIDI Mouse Makes Marvelous Music

It’s an old misconception that digital musicians just use a mouse and keyboard for their art. This is often far from the truth, as many computer music artists have a wide variety of keyboards/synths, MIDI controllers, and “analog” instruments that all get used in their creative process. But what if one of those instruments was just a mouse?

Well, that must have been what was going through [kzra]’s mind when he turned an old ps/2 roller ball mouse into an electronic instrument. Born out of a love for music and a hate for waste, the mouse is a fully functional MIDI controller. Note pitch is mapped to the x-coordinate of the pointer, and volume (known as velocity, in MIDI-speak) is mapped to the y-coordinate. The scroll wheel can be used as a mod wheel, user-configurable but most often used to vary the note’s pitch. The mouse buttons are used to play notes, and can behave slightly differently depending on the mode the instrument is set to.

Not satisfied with simply outputting MIDI notes, [kzra] also designed an intuitive user interface to go along with the mouse. A nice little OLED displays the mode, volume, note, and mouse coordinates, and an 8×8 LED matrix also indicates the note and volume. It’s a fantastic and versatile little instrument, and you’ve gotta check out the video after the break to see it for yourself. We’ve seen some awesome retro-tech MIDI controllers before, and this fits right in.

Thanks to [midierror] for the tip!

Hack a Day 18 Jul 18:00

Turning GameCube & N64 Pads Into MIDI Controllers

It’s fair to say that the Nintendo 64 and GameCube both had the most unique controllers of their respective console generations. The latter’s gamepads are still in high demand today as the Smash Bros. community continues to favor its traditional control scheme. However, both controllers can easily be repurposed for musical means, thanks to work by [po8aster].

The project comes in two forms – the GC MIDI Controller and the N64 MIDI Controller, respectively. Each uses an Arduino Pro Micro to run the show, a logic level converter, and [NicoHood’s] Nintendo library to communicate with the controllers. From there, controller inputs are mapped to MIDI signals, and pumped out over traditional or USB MIDI.

Both versions come complete with a synth mode and drum mode, in order to allow the user to effectively play melodies or percussion. There’s also a special mapping for playing drums using the Donkey Konga Bongo controller with the GameCube version. For those eager to buy a working unit rather than building their own, they’re available for purchase on [po8aster’s] website.

It’s a fun repurposing of video game hardware to musical ends, and we’re sure there’s a few chiptune bands out there that would love to perform with such a setup. We’ve seen other great MIDI hacks on Nintendo hardware before, from the circuit-bent SNES visualizer to the MIDI synthesizer Game Boy Advance. Video after the break.

If you wanna be a cool nerd who uses video game controllers to play music, I’m doing a birthday sale, 20% off all the things!

Code/Link RTs appreciated pic.twitter.com/GqBpGUFWLe

— Po8aster (@Po8aster) April 30, 2021

[Thanks to Chris D for the tip!]

12-Arduino Orchestra Plays Star Wars Fanfare

Back in the early days of the musical synthesizer, some designers who wished for polyphony in their instruments would simply build multiple tone-generators for as many notes as they wished to play. [Kevin] took that same approach with his Arduino orchestra, and set about having it play the closing number from Star Wars: A New Hope.

The build consists of twelve Arduino Nanos, each wired up to power, a speaker, and the same MIDI cable. The MIDI cable carries note data for each Arduino on a separate MIDI channel, allowing each to play its own role in the orchestra. [Kevin] then set about arranging the Star Wars music into a MIDI file suitable for the Arduinos, roughly setting six voices to high parts and six voices low. The Arduinos play the notes received using the simple tone() function. The result is a very chiptune rendition of the end of the fourth episode of the world’s most famous space opera.

It may not be neat, tidy, or efficient, but it certainly is fun. Twelve Arduinos bleeping away with their flashing LEDs and cute little speakers makes quite the conversation piece. It’s a similar approach to the Floppotron, which plays more notes by adding more floppy drives. We’ve also seen the same thing done with SEGA sound chips. Video after the break.

Hack a Day 11 Jun 16:00