Some thoughts on being (mostly) self-taught

Apologies for the site being offline for so long after a server upgrade.  Hopefully everything is back to normal now.

My musical skills (as meager as they may be right now), along with much of my electronics skills, are mostly self-taught.  Yes, I did attend RIT for a while and took electronics courses, but nothing that even mentioned microcontrollers and programming them.

I have, on several occasions, had the benefit of music teachers from time to time, when I could afford them and could devote enough time to practice.  But most of what I’ve learned musically has been on my own.

I never thought much about it until I spoke with someone about the piano exams offered by Trinity College London (available in the US), which I was considering just to check my progress.  Early on in our conversation after I told her I did not have a teacher and was learning on my own, she asked (seemingly with an air of disbelief), “How do you learn on your own?” as if the possibility had never occurred to her before.  I don’t remember my answer; it seemed such an absurd question.  After all, don’t we all have an innate ability to learn, if we allow ourselves?

There is a word for what I’ve been doing.  It’s autodidactism: self-teaching. And there are many autodidacts in the world of music, especially in jazz and rock music.

The autodidact, or self-directed learner, identifies by himself what he wishes to learn or his goal, and sets about acquiring the needed knowledge.  With music, this is often a little reading and lots of time spent practicing.  The autodidact sets his own pace, too, which is especially important for adult learners who often have other competing commitments.

One thing that has pushed my learning faster than it ever did under a more formal educational path has been performance.  By a peculiar series of events, I am now attending a small church where, if I don’t play the organ, all music is recorded.  Which isn’t bad–the pastor picks some nice music I haven’t heard before.  But I have been encouraged to play.  And since I want to play well on Sunday, I commit myself to practice and improve my playing each week.  I think formal music education seriously under-emphasizes the importance of performance early in a student’s education, whether that student is 5 years old or 50.  Performance motivates more than anything a teacher can say.

So how do I learn on my own?  Naturally.  And quite well, thank you.

If you have a desire to learn something, whether music or something else, and you don’t have or can’t afford a teacher, don’t wait.  You may be your own best teacher.

 

Key Scanner

At this point, the organ conversion is nearly complete (still other things I’d like to add at a later time). Some minor debugging remains.

In this post, I’ll be giving a little overview of the workings of the key scanner used to scan both manuals, pedals, and stop tabs/pistons. Pretty much everything except the swell shoes.

Here’s a picture of the first completed scanner:

Swell Key Scanner
Swell Key Scanner

The basic design is an 8×8 matrix scanner (plenty of sites explain the details better than I would), which reads the state of 8 keys at a time, cycling through the 8 groups. The microcontroller (a PIC16F18346, with white label on it) selects a group (or “row”) of 8 keys via a 74LS137 3-to-8 decoder chip, then reads the state of each key (with individual key debouncing), compares it to the last read state, and if it has changed, the microcontroller queues a 1 byte key state message and notifies the master controller that data is waiting. No actual MIDI messages are generated on this board’s processor.

There was one unexpected bug in my original prototype. I had created a similar scanner for a 16 button keypad, which worked fine. But there, only one button would be pressed at any time, which is far from the case when playing music, and I quickly found the organ sounding “ghost” notes. The solution was that each key had to be connected to the decoder chip with individual diodes so current couldn’t travel between keys in a group. Hence the row of 64 diodes on the right side. On the “column” side, keys were grouped again (keys 1,9,17,25, 33, 41, 49, 57 in group 1, etc.) to be read by the software. PIC microcontrollers have built-in pull-up resistors, which are needed since the inputs are otherwise floating when a key isn’t pressed. At a scanning speed of about 2kHz, these proved too weak, and 5.1k resistors were added (partially obscured by the 8 pin column connector).

The scanner boards then communicate to the master over a 6 wire cable using SPI. Beyond the 4 standard SPI connections (Clock, Master to Slave data, Slave to Master data, and Slave Select), there is a Data Ready line to notify the master that data is ready to be transmitted from the scanner, and a common ground connection.

It turned out that the flat ribbon cable was susceptible to electromagnetic interference (EMI), probably from the scanner itself.  To reduce errors, I had to do a minor rearranging of wire ordering and shield both the data wire individually and the entire cable with foil. This helped, as did placing a sheet of foil behind the board (not shown). In software, I generate a parity bit and send each message twice. The master checks the parity and drops any with errors.

One note on voltage: The entire system running on a +5 volt power supply. I’m not sure how well the contacts would behave with a lower voltage such as 3.3V. In the original organ, these contacts likely had 12 volts or more and significantly higher current through them, leaving them with perhaps a higher resistance and more “bounce” at the lower voltage and current. I had to give them all a good cleaning for them to play well.

That’s about all there is to this part. At some point I hope to show a picture of the actual organ contacts themselves and how they were (minimally) modified to work with the scanner.

Comments and questions are always welcome.

 

Welcome

Welcome to my Organ Adventures blog, documenting my process of converting a mid-20th century pipe organ console to MIDI for use with GrandOrgue virtual pipe organ software. My plan is to post about the technical aspects of this conversion, and hope it will be useful to others who might wish to do a similar conversion.

More posts will be forthcoming, showing the circuit boards and PIC microcontrollers that are the brains of the system. In the meantime, here is a short video of me playing the Largo from Dvorak’s New World Symphony (apologies for the poor image quality).

If it doesn’t stream well, you can download the video instead.

This was performed using a first prototype of the manual/pedal scanner connected to the Swell manual and generated MIDI messages directly. The final conversion will have four such scanners (2 manuals, pedals, and stops/pistons/controllers) feeding into a master controller to generate a combined MIDI stream.