arduino midi bass pedals

Upload: buditux

Post on 28-Feb-2018

243 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/25/2019 Arduino MIDI Bass Pedals

    1/12

    http://www.instructables.com/id/Arduino-MIDI-Bass-Pedals/

    Food Living Outside Play Technology Workshop

    Arduino MIDI Bass Pedalsby rczarnikon July 2, 2014

    Table of Contents

    Arduino MIDI Bass Pedals .......................................................................................................

    Intro: Arduino MIDI Bass Pedals ...............................................................................................

    Step 1: Gutting the Piano ....................................................................................................

    Step 2: Making the Pedals Fit .................................................................................................

    Step 3: Cleanup and Paint Job ................................................................................................

    Step 4: Making the Pedals Work (Part 1) .........................................................................................

    Step 5: Making the Pedals Work (Part 2) .........................................................................................

    Step 6: Wiring to Arduino .....................................................................................................

    Step 7: Programming (Reading and testing the pedal switches) ........................................................................

    Step 8: Programming (Debouncing the switches x 12) ...............................................................................

    Step 9: Programming (MIDI Output) ............................................................................................. 1

    Step 10: Finishing Touches ................................................................................................... 1

    Step 11: Demo Video ....................................................................................................... 1

    Related Instructables ........................................................................................................ 1

    Advertisements ............................................................................................................... 1

    Comments ................................................................................................................ 1

    http://www.instructables.com/member/rczarnik/?utm_source=pdf&utm_campaign=titlehttp://www.instructables.com/tag/type-id/category-workshop/http://www.instructables.com/tag/type-id/category-technology/http://www.instructables.com/tag/type-id/category-play/http://www.instructables.com/tag/type-id/category-outside/http://www.instructables.com/tag/type-id/category-living/http://www.instructables.com/tag/type-id/category-food/
  • 7/25/2019 Arduino MIDI Bass Pedals

    2/12

    http://www.instructables.com/id/Arduino-MIDI-Bass-Pedals/

    Intro: Arduino MIDI Bass PedalsI've always liked bass pedals. I'm a big fan of the band Rush, and their bass player Geddy Lee. Most of my favorite Rush albums use the Moog Taurus pedals whichhave become synonymous with their sound of that era. I don't know what it is. The deep, droning sound - that you play them with your feet (name another instrument is exclusively played with the feet). That they are a synthesizer. Maybe a combination of all three. There is just something special about them. They are not found ineveryday music.

    A few years ago I bought a Hammond M2 organ off of Craigslist. It had no tubes in the amplifier. In fact, when I went to the guy's house who listed it, it had stuff piled over it. It was literally buried to where you couldn't see it. He showed me that it at least ran. When I got it home (an ordeal in itself, since it weighs over 300 lbs) and fotubes, got it running and making noise, the bass pedals didn't sound right. They were triggering multiple notes at the same time. I found that 3 of the wires going to thefoot pedals were broken, probably from being snagged on something when it was moved. I soldered them back together, put heatshrink tubing over the problem areasand.... had the same problem. I have read or have been told that on this series of organ the pedals don't sound very good to begin with. So I extracted them. Snipped13 wires connecting them to the tone generator.

    And they sat on my shelf for over a year. They were heavy, had sharp metal edges, old cloth-covered wire. There was not much incentive to mess with them. I had the

    idea of making bass pedals out of them, and in my mind I was looking for some kind of old suitcase I could house them in, with holes cut in it for the keys to stick out. never found one.

    One day, a few houses down, in the trash at the side of the road, was a kid's toy "grand" piano. It was beat up, chips in the wood, marker on the yellowed keys, dusty,musty. It made sound though, kind of a xylophonish sound made by plastic hammers banging on metal rods. I brought it home and proudly showed my wife the greatprize that I had saved from the landfill. She frowned disapprovingly. I opened it up to make sure it wasn't full of bugs, and then it sat on my shelf for many months waitfor a purpose.

    Then one day the two pieces were sitting on the shelf next to each other, and a lightbulb appeared over my head. I thought "What if....?"

    Since this was a fairly easy project of jamming two things together (with a little bit of wiring added in) the first step was to see if they would even fit together. The guts the piano would have to be torn out and cleaned up.

  • 7/25/2019 Arduino MIDI Bass Pedals

    3/12

    http://www.instructables.com/id/Arduino-MIDI-Bass-Pedals/

    Step 1:Gutting the PianoAfter removing the lid and "Kiddy Keys" faceplate and setting it to the side, a couple of screws and some nails held the metal rods in place. The metal rods were allattached to one board and came out as one piece, to be saved for a later project. The plastic keys and hammers floated in place and were unceremoniously tossed in trash.

    This left a couple of "cheek blocks" (to steal an organ term) on the left and right which were pried out with screwdriver and hammer. The wooden teeth that the piano krested on was easily pried out with pliers. This left a nice open and clean space to put the pedals.

  • 7/25/2019 Arduino MIDI Bass Pedals

    4/12

    http://www.instructables.com/id/Arduino-MIDI-Bass-Pedals/

    Step 2:Making the Pedals FitAs you can see in the first pic, the pedals didn't go in without a fight. There was some heavy overlapping metal that had to be dealt with. I bought a pair of aircraftaluminum snips that are pretty amazing. They cut through the metal like refrigerated butter. Excess rough edges were sheared off with a metal file.

    That got the pedals in almost all the way, but they didn't quite go deep enough into the case due to the shorter rounded back edge of the piano case. After some moresnipping, filing, and ultimately hammering, they slid right in to the point where the faceplate could be reused with nothing majorly sticking out. It was a great feeling asthey satisfyingly *kachunked* into place and fit like a glove.

    Image Notes1. This will not do.

    Image Notes1. Sticking out way too much

  • 7/25/2019 Arduino MIDI Bass Pedals

    5/12

    http://www.instructables.com/id/Arduino-MIDI-Bass-Pedals/

    Image Notes1. Still sticking out just a wee bit too much.

    Image Notes1. Apply hammer HERE!

    Step 3:Cleanup and Paint JobI removed all of the plastic "ribs" that were attached to the solid metal pedal bars and gave the black metal a good rubdown with some WD-40. The 50 years of dust wquite attached, but eventually came off enough where I was happy with i t. I wasn't trying to make it look perfect since the piano case was kind of beat up to begin withalso gave the plastic ribs a good wiping off with a wet cloth.

    I used some glossy orange RUST-OLEUM spraypaint (ALSO BONDS to PLASTIC!) and ended up using the whole can since I wanted a durable surface. I did 2 coatseventually ran out during the second coat. It got a nice smooth finish except where I went a little heavy.

  • 7/25/2019 Arduino MIDI Bass Pedals

    6/12

    http://www.instructables.com/id/Arduino-MIDI-Bass-Pedals/

    Step 4:Making the Pedals Work (Part 1)There are few specific resources on the Internet for exactly how these M2 pedals are wired. I did find that the M series (M1, M2, M3) all use the same pedals, whichhelped. I had the original Hammond M2 schematic, which helped some, but I was still baffled as to how exactly they would be wired to an Arduino. I had 12+1 old wirecoming out of the pedals, and there were small metal "bridge" wires going between each keycomb. Really a fascinating mechanical and electrical design (the M2 orgawas designed in 1952). There was also some kind of copper tube and switch mechanism that "clicked" every time you pushed a new pedal (which I found out was thelatch feature that holds the last note you played).

    I solicited the advice of the wonderful HAMTECH (Hammond technician) mailing list that I lurk on. In my plea for help I admitted I didn't understand how the wiring wordespite sitting and staring at it for hours, but that I wanted to keep these beautiful switches rather than use something more modern. I received several different replies

    "It can be done, but it won't be as obvious how to do it because of the slightly odd way they are wired. My rudimentary understanding of the circuit is that all tones arenominally shorted and by pressing a pedal, you un-short it so that it can sound. Consequently, when more than one pedal is pressed, the tones are combined *in serierather than *in parallel*. There is also a latch so that the slow decay and sustain features can work (The M3 has a sustain, but I don't think the M2 does.)"

    "I would leave the original contact system of the M-100, and install 13 new microswitches, or 13 fork photocells, and blinders. You could have a look at the 4532 CMOIC, which is often used in organ pedal arrangements, because you can make a lowest or highest key priority."

    "What you could do is to ground one end of the series of switches, use apull-up resistor to Vcc on the other end, then sense the bridge wire between each switch to

    determine which pedal has been pressed, if any.That should avoid re-wiring your switch bank."

    All of these answers made my head spin. And then out of the blue, I got the reply I needed!

    https://archive.org/details/HammondOrganServiceManual-ModelsMM2M3M-100
  • 7/25/2019 Arduino MIDI Bass Pedals

    7/12

    http://www.instructables.com/id/Arduino-MIDI-Bass-Pedals/

    Step 5:Making the Pedals Work (Part 2)I received a critical email from Michael Smokowicz of Trek II, modern-day makers of great Hammond add-ons and accessories.

    "Hello Ron,

    I don't think we've spoken before. My name is Michael and I've had some experience (though not very recent) working with M-100 pedal switches. I see that you areworking on a similar project and I thought this information might be of interest / benefit to you. (I believe this information will translate more or less intact to the 12 note2 pedal switch... by ignoring all references to the high C pedal.)

    As you know the M series pedal contacts are:A) Mechanically configured with a latching mechanism to hold open the contact for the last note played.B) Strung in series.C) Normally closed.

    A) It is possible to easily (and non-destructively) disable the latching mechanism as follows:

    Depress any pedal and note the pivot arm that moves against the felt bumper located between the E & F pedals. Using a nylon ziptie through the eyelet holes in the febumper, secure the pivot arm against the bumper so that it is immobile. This will convert the contacts to momentary action.

    B) As previously mentioned, the contacts are strung in series. It would probably be preferable to have them wired so that the individual contacts make to a common buYou can save a little bit of work by utilizing half of the jumpers that already exist between switches (and removing the other half):If you haven't already, cut the pedal switch harness from the switch contacts.Cut the jumpers going between the following pedals: C# & D, D# & E, F & F#, G & G#, A & A#, B & high C

    Using short lengths of hook-up wire, connect the remaining jumpered switch terminals together. If applicable, also connect one of the high C contacts to this group. Thnow your common keying bus.(There should be one empty switch terminal on each of the pedal's switches.)

    C) The fact that the contacts are normally closed can be addressed in software.... or by connecting the common bus to logic 0 (ground?) and using a pull-up resistor oeach line. When the contact associated with the played pedal opens, the pull-up resistor will provide a logic 1 for that note to your system.

    Note: The pair of switch contacts located on the side of the pedal assembly that used to close when any pedal was pressed will not be utilized.

    Good luck,Michael

    Michael SmokowiczTrek II Products"

    This was IT! This couldn't have been described in more common terms and instruction. Yet I still hesitated. For several months. Step A was a no-brainer. Step B, Iunderstood the concept of there being a common bus that all contact switches are on, preferrably to ground. But cutting the jumpers between the pedals was scary.. asat and stared at them, I realized I was still having trouble "getting" it. Eventually I took a deep breath and started following the directions exactly as stated, cutting the

    jumpers between each of the listed notes. Halfway through the list it became apparent exactly why I was doing these particular cuts. Sometimes you have to see it tounderstand. Thank you, Michael!

    http://www.trekii.com/
  • 7/25/2019 Arduino MIDI Bass Pedals

    8/12

    http://www.instructables.com/id/Arduino-MIDI-Bass-Pedals/

    Image Notes1. Originally there were small single wires chained between each of theseterminals. Every other one was cut as per instructions.

    Step 6:Wiring to ArduinoI used an Arduino Pro Mini purchased from Sparkfun. The brown wire is what I used for jumping between the unconnected switch terminals to form the common bus. Tsignal wires going from the switches to the Arduino came from CAT5 network cables and I used a twisted pair for each of the 12 pedal switches. After it was all wired

    cleanly to the ground (common bus) and 12 inputs on the Arduino I used small cable ties to clean everything up.

    I drilled a 1/2" hole in the back of the piano case for a MIDI connector (from Skycraft) and wired it to the TX pin of the Arduino, as well as 5V (with a resistor). Now to sprogramming..

    http://www.skycraftsurplus.com/https://www.sparkfun.com/
  • 7/25/2019 Arduino MIDI Bass Pedals

    9/12

    http://www.instructables.com/id/Arduino-MIDI-Bass-Pedals/

    Step 7:Programming (Reading and testing the pedal switches)Whenever I start a new hardware project and I'm ready to write the code, I will always test all the inputs and outputs with a little sketch that just spits all their values outhe serial monitor. That way I can see that everything is working before even starting the real code. Saving this project-specific code for later comes in handy as there times where I will have to upload it again, either because something isn't working, or because I've added another switch/knob that needs initial testing. Using serialmonitor to debug and test is always tricky with MIDI applications, because they share the Serial TX port on the Arduino. (only one or the other can use the serial port) requires commenting out your Serial communication lines and uncommenting the MIDI lines, or vice versa. You want to make sure your output is right before you startsending MIDI messages, since you will be somewhat blind unless you use a MIDI monitoring application.

    byte pedalPins[12] = { 2,3,4,5,6,7,8,9,10,15,17,16 }; // the pins on the Arduino each pedal are onbyte lastPin[12] = { 0,0,0,0,0,0,0,0,0,0,0,0 };byte currentPin[12] = { 0,0,0,0,0,0,0,0,0,0,0,0 };

    for (int x=0;x

  • 7/25/2019 Arduino MIDI Bass Pedals

    10/12

    http://www.instructables.com/id/Arduino-MIDI-Bass-Pedals/

    }

    Works great! No repeating triggers now. Just clean up and down events. Let's make MIDI!

    Step 9:Programming (MIDI Output)The change from serial monitoring to MIDI is very easy. First, import the MIDI libraryto your project. Remove or comment out the Serial.begin statement from the setuloop. Add the following to the setup loop:

    MIDI.begin(1);

    This initializes the MIDI library. Here is our new loop with MIDI commands:

    if (currentPin[x] != buttonState[x]) {buttonState[x] = currentPin[x];

    if (currentPin[x]==0) { MIDI.sendNoteOff(basenote+x,127,1);} // PEDAL UP, NOTE OFFif (currentPin[x]==1) { MIDI.sendNoteOn(basenote+x,127,1);} // PEDAL DOWN, NOTE ON}}

    The parameters of the sendNote commands are (Note Number to Send, Velocity (volume), Channel). We know from looking at our MIDI Note Chart that C on octave 1number 36. Octave 0 is just a little low to be useful. So in our variables for this program we set a basenote:

    int basenote=36;

    This variable could be used to adjust what octave your bass pedals play on.

    And that's all we do in this program. Cleanly read the pedals to see what is pushed, send a MIDI Note On message with the corresponding pedal, and when the pedallifted send a corresponding MIDI Note Off.

    Step 10:Finishing TouchesI used wood glue to attach some scrap wood to replace the cheek blocks I tore out. These are what the lid of the piano case get screwed to.

    To avoid painting the faceplate, I used a Moog bumper sticker I got while visiting the Moog Music factory in Asheville, NC. It was black and blended in, covering up the"Kiddy Keys" logo. Looks pretty decent and pays homage to the original! I notched out a small rectangle of wood from the bottom of it so it fit cleanly over the pedals, aattached 2 magnets to the back with glue. It sticks to the metal case of the pedal assembly with the magnets.

    I also added a power switch to the left side and a 9V battery holder inside the case, so that it could be moved around and operated wirelessly.

    http://playground.arduino.cc/Main/MIDILibrary
  • 7/25/2019 Arduino MIDI Bass Pedals

    11/12

    http://www.instructables.com/id/Arduino-MIDI-Bass-Pedals/

    Step 11:Demo VideoHere's a quick video of the pedals hooked up to an iPad running Animoog. I didn't have great bass speakers at the time to make a proper demo video, so I used somemore trebly patches.

    Related Instructables

    Arduino MIDIFoot Pedal

    Keyboardby

    roycetaft

    Arduino Midi

    Foot Pedalby

    robtoole

    Arduino Air

    Drumsby

    PoCoBro

    Easy MIDI BassPedals fromyour old MIDI

    keyboardbyElectronicMelodist

    Arduino MidiFoot Controllerfor Ableton Live

    by scottavey

    What is MIDI?

    byamandaghassaei

    http://www.instructables.com/member/amandaghassaei/?utm_source=pdf&utm_campaign=relatedhttp://www.instructables.com/id/What-is-MIDI/?utm_source=pdf&utm_campaign=relatedhttp://www.instructables.com/id/What-is-MIDI/?utm_source=pdf&utm_campaign=relatedhttp://www.instructables.com/member/scottavey/?utm_source=pdf&utm_campaign=relatedhttp://www.instructables.com/id/Arduino-Midi-Foot-Controller-for-Ableton-Live/?utm_source=pdf&utm_campaign=relatedhttp://www.instructables.com/id/Arduino-Midi-Foot-Controller-for-Ableton-Live/?utm_source=pdf&utm_campaign=relatedhttp://www.instructables.com/id/Arduino-Midi-Foot-Controller-for-Ableton-Live/?utm_source=pdf&utm_campaign=relatedhttp://www.instructables.com/id/Arduino-Midi-Foot-Controller-for-Ableton-Live/?utm_source=pdf&utm_campaign=relatedhttp://www.instructables.com/member/ElectronicMelodist/?utm_source=pdf&utm_campaign=relatedhttp://www.instructables.com/id/Easy-MIDI-Bass-Pedals-from-your-old-MIDI-keyboard/?utm_source=pdf&utm_campaign=relatedhttp://www.instructables.com/id/Easy-MIDI-Bass-Pedals-from-your-old-MIDI-keyboard/?utm_source=pdf&utm_campaign=relatedhttp://www.instructables.com/id/Easy-MIDI-Bass-Pedals-from-your-old-MIDI-keyboard/?utm_source=pdf&utm_campaign=relatedhttp://www.instructables.com/id/Easy-MIDI-Bass-Pedals-from-your-old-MIDI-keyboard/?utm_source=pdf&utm_campaign=relatedhttp://www.instructables.com/id/Easy-MIDI-Bass-Pedals-from-your-old-MIDI-keyboard/?utm_source=pdf&utm_campaign=relatedhttp://www.instructables.com/member/PoCoBro/?utm_source=pdf&utm_campaign=relatedhttp://www.instructables.com/id/Arduino-Air-Drums/?utm_source=pdf&utm_campaign=relatedhttp://www.instructables.com/id/Arduino-Air-Drums/?utm_source=pdf&utm_campaign=relatedhttp://www.instructables.com/id/Arduino-Air-Drums/?utm_source=pdf&utm_campaign=relatedhttp://www.instructables.com/member/robtoole/?utm_source=pdf&utm_campaign=relatedhttp://www.instructables.com/id/Ardurino-Midi-Foot-Pedal/?utm_source=pdf&utm_campaign=relatedhttp://www.instructables.com/id/Ardurino-Midi-Foot-Pedal/?utm_source=pdf&utm_campaign=relatedhttp://www.instructables.com/id/Ardurino-Midi-Foot-Pedal/?utm_source=pdf&utm_campaign=relatedhttp://www.instructables.com/member/roycetaft/?utm_source=pdf&utm_campaign=relatedhttp://www.instructables.com/id/Arduino-MIDI-Foot-Pedal-Keyboard/?utm_source=pdf&utm_campaign=relatedhttp://www.instructables.com/id/Arduino-MIDI-Foot-Pedal-Keyboard/?utm_source=pdf&utm_campaign=relatedhttp://www.instructables.com/id/Arduino-MIDI-Foot-Pedal-Keyboard/?utm_source=pdf&utm_campaign=relatedhttp://www.instructables.com/id/Arduino-MIDI-Foot-Pedal-Keyboard/?utm_source=pdf&utm_campaign=related
  • 7/25/2019 Arduino MIDI Bass Pedals

    12/12

    htt // i t t bl /id/A d i MIDI B P d l /

    vertisemets

    Comments

    4 comments Add Comment

    sonicasesays: Jul 9, 2014. 6:47 PM REPawesome

    bergerabsays: Jul 9, 2014. 8:02 AM REPWow looks awesome! Great idea and thanks for sharing

    thepixelartistsays: Jul 8, 2014. 10:01 PM REPBass kick drum is another instrument that you play solely with your feet

    jessyratfinksays: Jul 8, 2014. 4:09 PM REPThis project is amazing! It looks super professional. :D

    http://www.instructables.com/id/Arduino-MIDI-Bass-Pedals/?utm_source=pdf&utm_campaign=comments#DISCUSShttp://www.instructables.com/member/jessyratfink/?utm_source=pdf&utm_campaign=commentshttp://www.instructables.com/member/jessyratfink/?utm_source=pdf&utm_campaign=commentshttp://www.instructables.com/id/Arduino-MIDI-Bass-Pedals/?utm_source=pdf&utm_campaign=comments#DISCUSShttp://www.instructables.com/member/thepixelartist/?utm_source=pdf&utm_campaign=commentshttp://www.instructables.com/member/thepixelartist/?utm_source=pdf&utm_campaign=commentshttp://www.instructables.com/id/Arduino-MIDI-Bass-Pedals/?utm_source=pdf&utm_campaign=comments#DISCUSShttp://www.instructables.com/member/bergerab/?utm_source=pdf&utm_campaign=commentshttp://www.instructables.com/member/bergerab/?utm_source=pdf&utm_campaign=commentshttp://www.instructables.com/id/Arduino-MIDI-Bass-Pedals/?utm_source=pdf&utm_campaign=comments#DISCUSShttp://www.instructables.com/member/sonicase/?utm_source=pdf&utm_campaign=commentshttp://www.instructables.com/member/sonicase/?utm_source=pdf&utm_campaign=commentshttp://www.instructables.com/id/Arduino-MIDI-Bass-Pedals/?utm_source=pdf&utm_campaign=comments#comments