Music box concept

With the datasleeve abandoned, I need to repurpose the parts for something.

With the CNC keyboard presser idea, 3D printers, and Bohemian Rhapsody bouncing around in my head, I came up with a very, very interesting concept.

You've probably seen the Wintergatan marble machine. If you haven't go watch it now. And crawl out from that rock you're living under. It's an amazing contraption, but it's missing one vital thing.

Electricity.

As a hobbyist specifically interested in mechatronics, I began poking into the world of electromechanical music. I've come up with a few things so far.

  1. The contraption would be a box about the size of an Ender 3 made of aluminum extrusion, with the instruments mounted inside and on top.

  2. It would feature a mixture of string instruments, percussion instruments, and wind-based instruments.

  3. The string instrument would be a two-string bass strummed by a servo motor. The strings would be held down by a moving gantry that travels up and down the strings and pressed down on them with servos

  4. Any and all percussion instruments would be played by the same high-speed consolidated SCARA robot controlled using some crude guesstimation forward kinematics.

  5. Wind-based instruments would be played by solenoid valves pushing compressed air over containers with a resonance frequency of whatever the note is. Basically a pan flute.

  6. Synthesizer music using either relays or stepper motors.

  7. A hardware programming system like the wheel on the marble machine. I thought of a similar wheel with magnets that activate hall effect sensors as they move past.

Design challenges:

  1. Keeping the mechanism quieter than the music being played. The servos in the SCARA arm and the solenoids powering the woodwind instrument in particular must be very quiet. The solenoids can be modified but the only way I can think to silence a servo motor is do the old "fill the entire thing with oil" trick.

  2. Powering the thing. The SCARA arm is going to have a stepper motor and three high-speed servos and the bass is going to have four low-power servos and a stepper. The relay/stepper synth are also going to require a lot of power.

  3. Synthesizer music is going to be hard either way. With relays I feel like I would be replacing them every fifteen minutes trying to oscillate them at 2000Hz. With stepper motors, I would have to program them, and from what I've seen, the coding required is miles above my level.

  4. I want to do a vibraphone but I don't know how to mount the keys.

I have no idea if I'll do this. It's still not even close to a fully formulated idea and I'm not by any means a music expert. I just like messing with it.

If anyone has any suggestions on how to solve the issues I listed or have anything to add. Go ahead. It's why I make posts like this.

I think part of the charm of music boxes is the clicking and whirring of the mechanism, but of course it can't be tooooo loud.

1 Like

I'm not an expert myself but do you know about MIDI? I call it "sheet music for computers". Basically it's "notes & timing" and some other information.

So you can have a MIDI controller that generates the MIDI messages they can be sent to a MIDI instrument (which generats the actual sounds) which can also be a keyboard (most MIDI keyboards are both) or it can be a computer. (Of course I'm talking about a musical keyboard like on a piano or organ, although you can use a computer keyboard.)

The controller can also be a computer or an Arduino. MIDI files are small so they don't need a lot of memory or processing power. It's "easier" than regular digital audio. (That's the controller making the notes & timing that can be simple, not the MIDI instrument that generates the actual sound.)

If you've recorded/captured the MIDI data into a computer there are virtual instruments (software) so you can play the MIDI file on the computer or you can connect a physical MIDI instrument and have the computer play it.

Once you have a MIDI file on your computer you can edit the notes & timing, or you can create the MIDI file entirely in software without a separate keyboard/controller, although most people start with a keyboard.

And you can change the virtual instrument so you can play the same file as a piano or a trumpet or you can play multiple instruments at once, even a whole orchestra. Most of the background music you hear on TV and in movies is now MIDI. In the old days they would use a real band or orchestra. About the only thing MIDI can't do is sing vocals.

Building a MIDI instrument is more difficult. I recommend you start with one very-simple instrument, or maybe something that can just pluck one string. If you try to do this all at once you'll just get lost and you'll never finish...

With a synthesizer, the sound is usually generated electronically or digitally. Certain simple-sounds (like square or rectangular waves) are easy to generate. There is a Melody Example with the Arduino but it's not very "musical" and it's not the kind of sound you'd want to sit and listen to.

It gets pretty complicated trying to generate/synthesize realistic-sounding instruments but it's now common to use "samples" (i.e. a recording of each piano key or each note or drum sound, etc. ). That's pretty easy with a computer but you need more than an Arduino. (The regular Arduino doesn't have enough memory or processing power and it doesn't have a DAC so there's no true analog output.)

I'm not clear what you are doing at (or with) 2kHz, but yes that's too fast for a relay. You can use MOSFETs (or transistors) to control solenoids, etc., but a solenoid isn't going to operate at 2kHz either. MOSFETs are also silent and overall they would be cheaper. But... There are relays with clear covers so you can see them operating and that might be more visually interesting and more "retro".

P.S.
You can find & download MIDI files and they will play in Windows Media Player. People doing "serious" music production use more advanced software and better virtual instruments than whatever Microsoft supplies but It should give you an idea.

And then when you build one or more MIDI instruments you can play those files on your instruments. But you'll need some actual MIDI software... Windows Media Player can play it's own software MIDI instruments but it can't communicate with a real-physical MIDI instrument.

Also, you'll probably need one Arduino for each MIDI instrument you build. And if you build your own controller that will be a separate Arduino. There are advantages to using an computer as a controller if the thing doesn't need run stand-alone.

There's a lot of reasons I didn't go the MIDI route. I think it would be more difficult for the same end result. I also don't want to have to integrate a computer, and because my attention span is way too short to make any okay music on a PC. The only downside is that I can't integrate my favorite instrument going fully acoustic, which is the electric guitar.

I don't want to make the purely electronic instruments sound like other instruments. I want the stepper motors to sound like stepper motors, etc.

The relays would be one of the instruments. They make noise when oscillated. It's a buzzing noise though so it probably wouldn't be nice to listen to.

I do. Is there a book open on this somewhere?

a7

What do you mean?

One other challenge I didn't mention is the speed of the thing. To play music at tempos higher than a couple BPM, I would need to optimize every little thing on the device.

I would also have to figure out how to source/construct musical components.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.