Friday, November 2, 2018

Filtering MIDI volume and expression with an Arduino

I need a MIDI filter that simply filters volume and expression CC messages. I use a Hammond XK3c for organ and as a controller for a Yamaha Motif-Rack ES. The organ has two manuals, so in many cases I am playing organ on one and synth on the other. In such cases, I need to be able to change the organ's volume, but I don't want the synth to change volume (at least not the same as the organ). Thanks to Arduino community,  the awesome SparkFunMIDI tutorial, and other places on the Web, I came up with the working code below. This controls an Arduino and the MIDI Shield very well. I'm happy with the functionality.

#include
/*
* MIDI_FilterExp.ino 
* David Summers
* 2018.01.03

* Reads MIDI IN, passes every message except
* CC mnessages for Expression (CC11) and Volume (CC04).
* Useful for controllers that send such data, 
* but you wish for the controlled tone module to ignore it. 
* I use this to control a Yamaha Motif-Rack ES from 
* a Hammond XK3c; I want my expression pedal to
* effect the organ, but not anything on the Motif.
*/
MIDI_CREATE_DEFAULT_INSTANCE();
static const unsigned ledPinG = 6;      // LED pin on Arduino Uno
static const unsigned ledPinR = 7;      // LED pin on Arduino Uno

void setup() 
{
  pinMode(ledPinG, OUTPUT);
  pinMode(ledPinR, OUTPUT);
  MIDI.begin(MIDI_CHANNEL_OMNI);
  digitalWrite(ledPinG, LOW);
  digitalWrite(ledPinR, HIGH);
  MIDI.turnThruOff();
}

void loop()
{
  //digitalWrite(ledPinR, LOW);
  if (MIDI.read())
  {
    
    switch(MIDI.getType()) // Get the type of the message we caught
    {
      //Capture Control Change messages     
      case midi::ControlChange :
        
        //Capture Expression OR Volume CC messages
        if (MIDI.getData1() == 11 || MIDI.getData1() == 4)
        {
          //Don't pass data
          digitalWrite(ledPinR, LOW);
        }
        //All other CC messages
        else
        {
          MIDI.sendControlChange(MIDI.getData1(), MIDI.getData2(), MIDI.getChannel());
        }
        delay(0);
        digitalWrite(ledPinR, HIGH);
      break;
      
      default:
        //digitalWrite(ledPinR, LOW);
        MIDI.send(MIDI.getType(),
                   MIDI.getData1(),
                   MIDI.getData2(),
                   MIDI.getChannel());
        delay(0);
        //digitalWrite(ledPinR, HIGH);
      break;  
      
    }
  }
}

Thursday, June 19, 2014

'69 beetle and the turn signal indicator that wanted to be grounded

I found that the light bulb assembly for my turn signal indicator was wired in a non-standard way. Somebody in the past had soldered a wire to the metal jacket and hard wired it to ground. They also wrapped it in rubber insulation so that the assembly would not conduct through the socket in the speedometer. The generator and oil lights remain unmolested and work as the should. My inner picture-straightener took over, and I began to undo this - I want close to stock electrical and the assembly did not fit inside the socket very well anyway (which caused a dim turn signal indicator). With the light assembly returned to normal, the light no longer flashes with the turn signals (they work fine, by the way). I confirmed that there is good conductivity by testing with a DVM and swapping light assemblies. The generator light assembly, when moved as a whole into the socket for the turn signal, works as expected; the turn signal assembly, when moved to the generator's socket, does not work.

The wiring between the speedometer and the top of the fuse box seems to be correct, per Bentley. There is a single wire coming from all three indicator lights going into the left-most (front is front) two fuses.

My turn signals work as expected regardless of how the indicator light is wired.

The flasher is part  DNI 0214 S4. Here is a photo:

And here is a schematic:
http://www.dni.com.br/media/Manual_DNI_0412S4.pdf


I found this hint:
"NOTE! If the Turn Signal Indicator Bulb does not blink when the turn signals are on, move the wire from the KBL terminal to the 49a terminal (use a piggyback or jumper connection) with the Black/White/Green wire."
here:
http://www.jbugs.com/product/211953215C.html?Category_Code=vw-bug-switches-flashers-relays-1968-70

I hookled the light up to terminal 49a and it is working fine.


Here is a nice wiring diagram:
http://www.oldvolkshome.com/6870turnswitcht1_OVH.pdf

Glutamoto has a great explanation at:
http://www.thesamba.com/vw/forum/archive/index.php/o-t--t-508609--.html

Friday, September 20, 2013

How to be a keyboardist in a band

A friend asked if I would teach his classically trained pianist daughter how to play in a band. I said "no"....

Actually I declined because I don't have any time and I don't think I have very much to teach. I want to share what I do know though.


  1. Learn your chords. Sight reading is great, but doesn't help you communicate with a lot of amateur musicians. Most of them will know their chords though and so should you. First know all the simple triads, both minor and major. Next learn the dominant chords, with the lowered 7th. Next learn what diminished and augmented chords are. Finally, learn the rest such as 13th, b9 major 7th, etc. I won't go into what these are here. It is incredibly valuable to be able to instantly recall any of these. This skill will be used in many of the following points.

  2. Chart out the tunes you will be playing. When you know what songs you will be playing, get a copy of each and listen to them. Listen to them again, paying attention to the general structure like verse 1, chorus, verse 2, chorus, bridge, chorus (I prefer simple section labels like "A", "B", "I" for intro, etc.). Listen for where sections can be defined and where they are repeated. Write this down, and then study each section. Determine what the chord changes are (more on this later), where you'll play what, articulations, etc. Marking sections first saves you time because once you've figured out how one section goes, you don't have to do so again for the repeats. With the cart, you can see the flow of the song and what to play when. Write it all down and use it to rehearse until you have memorized the song.

    Many amateur musicians do not do this - maybe even most; they rely on their memory of when they heard the song over the radio or in their car. Many of them are very good at doing it this way, and many of them are not as good at this as they think they are. Charting forces you to study the tune and helps you play it correctly and consistently.

  3. Be prepared and able to change a song. Don't feel frustrated if you spent time charting a song only to have another band member argue that it is wrong. There could be many reasons for this, such as different recordings or maybe that person has played it a different way for years and is more comfortable. Be a team player, discuss the implications of playing the song one way or another, and come to an agreement. It is easy to become adamant about a way a song should be played, but this makes the band less fun. If you feel strongly about how a song should go, make your case in a friendly way and allow the majority to win.

    Related to this, you should also be adept at transposing songs. Many keyboards have a built in transpose function; that is alright if you are careful to set it back when you are done. I've forgotten to do this enough times that i just avoid using the transpose button. You'll be a valuable asset to any band if you can transpose on the fly, especially to vocalists.

  4. Don't always play. You don't have to fill every empty space of a song. If you don't hear keyboard parts in a section, try staying out of it. Amateur musicians have a hard time with this and with dynamics in general, but it is a critical part of music.

  5. Steal solos. This is related to number 2, but I don't do this at the same time. Listen to, write out, and memorize solos that you enjoy. I use a program called trascribe! to help me with this. It allows you to slow down a song to help you figure it out (it does much more as well - I highly recommended this tool).
That's what I can think of for now.

Tuesday, May 10, 2011

10 years

Today University of Idaho is holding a Staff Appreciation ceremony. If I were to go, they'd give me a mug or something for 10 years of being employed at UI (it's actually been longer, I don't know how they calculate it). This isn't where I imagined I'd be when I would day dream of my future life as a teenager; but it pays the bills I suppose. I hope they will mail my mug to me, because I'm a bit too busy with work to attend the ceremony.

Tuesday, April 19, 2011

Motorcycling - Spring 2011

I got my motorcycle out and rode it to work this morning.

Now I am torn. I had convinced myself that I would sell the ninja to help pay off my keyboard. Also, there are things I just don't like about the ninja.

This morning's ride reminded me how much I enjoy riding. It's going to be hard to convince myself to go ahead and sell the ninja.

Monday, March 7, 2011

Repairing the vibrato in my Hammond A100

Recently and suddenly, the quality of the vibrato and chorus on my Hammond A100 went bad.

I posted questions at the Hammond Zone yahoo group and Keyboard magazine forums and got some great advice.

Using this advice, I tested the wires that connect the scanner to the vibrato filter box and the switches. These all tested good.
There appears to be evidence that someone has (poorly) resoldered these wires in the past:



























Here is an image of the scanner in the A100. It is the round thing on the left:



Googling the issue led me to learn about zinc dendrites that tend to grow in some of the electronics in these old organs.

I used a continuity tester to see if there was a connection between any of the brass screw connectors on the scanner and the scanner case (which is grounded). As you can see in the video below, there indeed was a connection on one of them.

Since the connections proved to be sound, my options were to either open the scanner up to clean or try the "zap" method to fry the zinc dendrites that tend to grow in these old organs.

On the Web there seem to be two lines of thought: zapping is too risky and zapping is fine (with proper precautions).

I really didn't want to open the scanner up, since there are fragile parts such as the oiling wicks and the axle.

After reading about the zapping method, and learning more about how the scanner works and what connections it has, I decided I was comfortable trying it.

The idea is that you apply a voltage across the dendrite, effectively turning it into a fuse which you "blow". In my case, I used a pair of 9 volt batteries in series to achieve an 18 volt source.




























I used an alligator clip to connect the positive post of the battery to the scanner body:


























With a wire connected to the negative post of the battery, I touched the brass screw on the scanner that allowed current through when previously tested with the continuity tester. There was no spark or pop etc. Continuity test failed after this, proving the dendrite was no longer conducting electricity.

After disconnecting the battery, I turned the organ on and the vibrato was back to its old self!

Here's a video I shot of the sound and testing for the dendrite:


And here are the photos I took during the operation:
https://picasaweb.google.com/davyyd/FixedA100Vibrato#

Thursday, December 23, 2010

Hammond A100 connected to Leslie 3300

Long time no post.

Using a very slightly modified version of the circuit you can find here, and information about the 11-pin connector here, I built a box to connect my Hammond A100 to my Leslie 3300. Here are some images:


























The red button is connected to Leslie pins 5 & 6 so that I can turn the Leslie on and off from the box.



























The toggle switch is my Main-Echo-Ensemble switch, though since it is a DPDT Toggle switch it is just an M-E for now. I will consider putting in a proper switch to allow a mix option between the internal and external speakers, but for now I am happy being able to easily switch between the two.


























For the most part, I am quite happy with the results. I do need to hide the wires (where do people run the half-moon switch wires on an A100?).


























Since I no longer have reverb when using the Leslie (since I tapped into the preamp and not the main & reverb amp outputs), I've been hearing reverb in Hammond recordings lately. I think it would be easy to put an insert into the circuit that would let me put a reverb foot pedal in; but that is down the road.

The 3300 is a fabulous Leslie, especially after replacing the factory 12AX7 with a 12AT7 (thanks Jim Alfredson!). A new concern though, is that with the higher fidelity of the 3300 compared to the A100s internal amps and speakers, is that pops, clicks, and crackling noises are much more noticeable now. My next step is to order some de-oxit and clean all of the tube sockets in the A100 - I hope that resolves the noises.

Thanks to Jeff Dairiki and Harvey Olsen for the original circuit schematic.