Close
0%
0%

Christmas Orchestra

Taking stepper music to absurd levels, with a dash of Christmas cheer

Similar projects worth following
Completed video is here! http://youtu.be/bhChYJzw4FM

What do you get when you mix TSO's Wizards in Winter with four floppies, three scanners, two LED strips, and an inkjet printer? It's a little something I like to call... Wizards in Printer.

Build Log and details: http://hackaday.io/project/3533-christmas-orchestra

Credits:
Mike Anderson -- Director of Special Projects, Audio Engineer
Blue Ridge Community Church -- Location
Estrada -- Original MIDI Track
Josh Etheridge -- Director of Photography
Logan Patton -- Video Equipment
Marlin Shrock -- Arduino Equipment and Lead Scanner
Trans-Siberian Orchestra -- Making Christmas Brighter
Jeremy Weatherford -- Hacker in Chief

I'm not much of a musician myself, but I love wiring up devices to make music. My first project used stepper motors and servos, which was fun, but it was hard for people to understand what was actually making the music. A friend had the idea of using consumer electronics to make the device more approachable for non-hackers, so I started collecting scanners from Craigslist, and it kind of took off from there. The end result is as much of a light show as it is a music performance, so what better track to use than TSO's epic Wizards in Winter, or, as this performance is known, Wizards in Printer.

The inkjet was rescued from a dusty storage closet, and the floppies were surplus from a family member's basement. A friend graciously loaned me his Arduino Mega and RAMPS board to drive everything, and some awesome people at my church volunteered their time to help record and edit the audio and video. Total cost was about $30 including pizza for the volunteers.

Technical challenges were numerous... dissecting the devices without destroying them, extending motor and light leads to reach the RAMPS board, getting all the fiddly bits of wire right (33 I/O pins!), speeding up the main loop so it could run every 40usec for decent pitch accuracy, speeding up digitalWrite(), fitting the 4000 note events in flash memory, parsing MIDI files correctly, etc. There were some creative challenges as well, such as figuring out which instruments were best suited to different parts of the music, and arranging the music to fit the instruments and increase the visual appeal and drama.

This has been an awesome project to work on, and I hope you get inspired to go forth and hack!

Credits:
Mike Anderson -- Director of Special Projects, Audio Engineer
Blue Ridge Community Church -- Location
Estrada -- Original MIDI Track
Josh Etheridge -- Director of Photography
Logan Patton -- Video Equipment
Marlin Shrock -- Arduino Equipment and Lead Scanner
Trans-Siberian Orchestra -- Making Christmas Brighter
Jeremy Weatherford -- Hacker in Chief

Fun facts:
- Old electronics sound better: the lead scanner is an ancient Visioneer, the lead guitar is an ancient and gigantic Epson inkjet. The newer scanners are much quieter and have smaller musical ranges.
- The paper feed motor at the end is playing an E along with everything else for the big finish
- The project paid for itself, since the salvaged inkjet printer had two full-sized NEMA17 stepper motors in it, which will be repurposed
- Inserting the floppy does trigger playback, but it's not reading from the floppy drive
- Floppies have to be accessed in order to detect disk insertion/removal, that's why the light is on before I inserted the disk
- This also means that removing the disk doesn't stop playback until that drive actually tries to play a note -- not quite an e-stop button
- The Epson scanner/printer was recorded by sticking a microphone inside of it, like a kick drum

  • 1 × Epson C3000 inkjet With not one, but two NEMA17 stepper motors!
  • 2 × LED strips One to replace the fried CCFL in the Epson multifunction, and one on the inkjet's ribbon cables (why aren't those standard by now?)
  • 3 × Surplus scanners: HP, Epson, Visioneer The Visioneer has the best tone by far
  • 4 × Surplus 3.5" floppy drives A motley crew indeed, missing one of their number that went to join the great smoke monster in the sky (12V is not the same as 5V)
  • 1 × Arduino Mega+RAMPS 1.4 Brains, stepper drivers, and MOSFETs for switching the scanner CCFLs

  • That's a wrap!

    Jeremy Weatherford12/11/2014 at 19:08 0 comments

    Got everything recorded today with the help of two awesome people, Mike Anderson on audio and Josh Etheridge on video. I felt kind of useless at this stage, since I was just there to push the play button and make sure nothing caught fire. Mike and Josh have volunteered their time to record, mix, and edit the video, so now I get to take everything apart and daydream about how epic the finished product is going to be.

  • Limit switches would have been awesome

    Jeremy Weatherford12/11/2014 at 15:14 0 comments

    Somewhere along the line I considered and rejected the idea of wiring up the limit switches on the scanners and inkjet, thinking it would be too much trouble. Instead I've been moving each of the motors to a reasonable starting position before starting playback. After several near-misses (always keep a hard-wired "motor power off" switch handy!), I'm reconsidering that position... there are simply too many ways for the software to break and potentially cause something to run out of limits. Additionally, re-homing the motors each time is getting pretty old.

    In order to mitigate the homing problem, I taught the Arduino to reposition the motors at the end of the song (or when it's stopped by ejecting the floppy). That should make it a little bit easier to run headless (without a laptop driving). I had several more near-misses in the process of programming that function, though, which tells me I should have just wired up the limit switches in the first place! I don't know if any of the scanners or inkjet could physically self-destruct by hitting mechanical limits, but I'd prefer not to find out. The floppies are a little smarter and won't step past their limits.

    Got a director lined up, hopefully recording today, woohoo!

  • Major timing improvement

    Jeremy Weatherford12/10/2014 at 14:42 0 comments

    The weak point in the playback chain for this project and the music box has always been the PC (or RPi) sending note data to the Arduino. Most of the time it worked great, but occasionally a timer wouldn't get called in a timely fashion and the playback would glitch. That's not a huge problem for a one-off project, but this time I'm planning to record the audio and video tracks separately and then sync them, music-video style, so I need the performance to be as repeatable as possible.

    So yesterday I finally dug into the docs and figured out how to put the 10kbytes of note data into PROGMEM instead of RAM so the Arduino could hold the entire song without needing an external source of note data. By the way, I think it's criminal that the Arduino IDE can't detect when you're allocating too much SRAM for variables -- the sketch just silently fails to boot. Or is that fixed in newer bootloaders now? I was worried about the flash access being slow, but it's fast enough to index through the note data every 0.4msec. Playback is now bulletproof and doesn't require an external laptop.

    To add the finishing touch and make the rig completely self-contained, I now have it triggering playback when a floppy disk is inserted in the top drive, and stopping when it's ejected. :) I'm also planning to have it re-home the motors to the start position when the disk is ejected, so that I don't have to do that manually every time (since that does require a laptop connection at the moment).

    If all goes according to plan (and how likely is that, really?) we should be recording tomorrow.

  • Getting close

    Jeremy Weatherford12/08/2014 at 21:11 0 comments

    After several hours of soldering to extend cables, everything is wired up and waiting in the studio... won't be too long now!

  • Some improvements on pitch accuracy

    Jeremy Weatherford12/04/2014 at 06:48 0 comments

    Took a look at Moppy (the floppy music program for Arduino) and identified some improvements that could be made. Rewriting everything to count 40usec cycles instead of comparing micros() improved efficiency, as did being careful about data types -- changing unsigned ints to bytes where possible, and getting rid of the unsigned longs that I used when everything was measured in microseconds. I'd love to get an even faster cycle time, but 40usec is decent, and it seems to crash at 35 when things get busy, so that may be the working solution for now.

  • Initial commit

    Jeremy Weatherford12/03/2014 at 14:41 0 comments

    Project is well underway, so I thought I'd publish some work-in-progress photos and information.

    So far I have the RAMPS board happily driving three different scanners. Two of them have their CCFL lights hooked up to the MOSFETs on RAMPS for blinkenlights. Apparently I blew up the CCFL driver on the third scanner by connecting it backwards, so it has some LED strip lighting instead.

    The four floppies were the easiest part, since they have their own electronics onboard. They just need +5V and GND on the power connector, then ENABLE, DIR, and STEP pins connected to the microcontroller. With the pins configured as OUTPUT, their sense is inverted, so digitalWrite(LOW) means to ground the pin, which makes the floppy actually do something. ENABLE needs to be LOW in order to do anything with the stepper (and it turns on the light, as a bonus). The floppies I have are 80 steps in each direction, and have built-in limits (electrical or mechanical) so it doesn't hurt them too bad to run into the limits (I hope, since it's the only way I have to home them).

    I have the PC software mostly done, it reads raw MIDI files this time (instead of needing a MIDI-to-XML conversion), maps channels to instruments, reduces them to monophonic note sequences, applies octave shifts as needed and some post-processing (like a staccato effect to repeated notes) and sends commands out via serial to the Arduino.

    I'm a little worried about the Arduino software because it's struggling with pitch accuracy when driving 9 instruments (go figure). Some more optimization is definitely in order. I may also have to punt and drop the higher parts down an octave where the timing accuracy isn't as important. I'm already dreaming about using an FPGA as a frequency generator to get the timing more accurate... maybe next time.

    Tentatively planning to set up and film this the week of December 8th, stay tuned for updates!

View all 6 project logs

Enjoy this project?

Share

Discussions

Hacker404 wrote 12/07/2016 at 14:16 point

This is still my all time favorite hack at hack a day. 

  Are you sure? yes | no

Coye Knoll wrote 12/30/2014 at 11:39 point

take the scanner lamp and cut it away from the light, and u should get an arc from it.

  Are you sure? yes | no

Hacker404 wrote 12/26/2014 at 00:08 point

+1000, Everything about this is perfect! The lighting and timing, the music and the video recording / editing. It all looks sooooo professional!

Love it!!!!!, it's the best retro hardware / music hack I have seen.

Thanks to all for making my day.

  Are you sure? yes | no

Tachyon wrote 12/23/2014 at 17:17 point

Dude, posting all this _before_ the video was ready! Not cool!! :')

I've been checking back like twice a day hoping the video has been uploaded.

  Are you sure? yes | no

Jeremy Weatherford wrote 12/23/2014 at 18:14 point

This is just the build log... I wasn't planning to submit it to HaD until the video was done. Hang in there, should be ready soon!

  Are you sure? yes | no

Hacker404 wrote 12/23/2014 at 22:39 point

Cool! I am waiting patiently and I am sure lots of other people are to. This is way cool!

  Are you sure? yes | no

Jeremy Weatherford wrote 12/25/2014 at 14:29 point

It's up! It's up, it's up, it's up! Woooo!

  Are you sure? yes | no

Jeremy Weatherford wrote 12/17/2014 at 21:19 point
Will do... I paid my editor in pizza, though, so I don't have too much control over the timeline. :)

  Are you sure? yes | no

Jasmine Brackett wrote 12/17/2014 at 19:42 point
Can't wait to see the video. Get it up soon and we may feature it.

  Are you sure? yes | no

Jeremy Weatherford wrote 12/25/2014 at 14:28 point

Video's up! Don't know if it counts as soon or not. =)

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates