Sunday, April 19, 2009

Electricity for Synth-DIYers: Resistors

As the name suggests, the purpose of a resistor is to restrict the flow of electricity through a circuit. Here's a few things that a synth-DIYer needs to know about resistors.

What are Resistors For?

Resistors are used to control the voltage in a circuit, or to control the flow of current through a circuit. We saw an example of the latter in the first installment of this series, where we used a resistor to limit the amount of current flowing through an LED. Resistors are often used to create a drop in voltage in a circuit. For example, if two resistors of equal value are wired in series between the two poles of a battery, the voltage at the point in between the two resistors will be half the battery voltage; this type of circuit is known as a voltage divider. Unequal values create different in-between voltages.

Resistors can be used to "convert" a current into a voltage. An example often seen in synth circuits is a resistor wired to the output of an OTA, an IC frequently used in analog synts. The OTA produces a specific output current which is proportional to its inputs. By placing a resistor on the output, a voltage is developed in between the OTA output and the resistor which is proportional to the OTA's output current.

A pull-up resistor is used to apply voltages to the inputs of components which act as electronic switches, such as JFET transistors and bilateral switches. The switch has an "open" or "closed" position, but in order for another circuit to sense that, some voltage must be applied to the switch input. A pull-up resistor between a supply voltage and the switch input provides the necessary voltage. With the output of the switch connected to ground, when the switch is closed, the measured voltage at the switch input will be zero. When the switch opens, the voltage at the switch's input will rise to the supply voltage, due to the pull-up resistor. The pull-up also limits the current when the switch is closed; otherwise, the switch would short out the supply voltage.

Similarly, a resistor wired between a voltage source and ground acts as a "pull-down". A high-value resistor is often wired to the external input of a circuit to provide some protection against static charges. Static electricity may have very high voltage, but very low current. A high-value resistor dissipates the static charge without "loading down" the circuit's normal input signal.

A resistor in series with a capacitory has an effect which is similar to reducing the capacitance value of the capacitor. This will be covered further in a later installment.

Ohm's Law

The degree to which a resistor resists is measured in ohms. The definition of an ohm is: if a voltage of one volt is applied to a resistance of one ohm, a current of one amp results. This leads to a basic formula of electricity, known as Ohm's Law:

E=IR

where E is the voltage, I is the current, and R is the resistance. (Why is E the voltage and I the current? E comes from an old term for voltage, "electromotive force". You do sometimes see the letter V used instead. "I" for current, I have no idea, other than the fact that "C" was already taken for something else.) Of course, you can do simple algebraic manipulations to find any quantity needed, given the other two; for example, if you know the voltage and the resistance and you want to find the resulting current, divide both sides by R, and you get:

I = E/R

Specifying and Choosing Resistors

In specifying resistance values, the ohm is represented by the Greek letter omega, which is: Ω. The usual metric multiplier prefixes can be added to this for larger values, for instance, 6 kilo-ohms would be written as 6kΩ, or sometimes just 6k if the context is understood. One ohm isn't much; typically, in electronics about the smallest resistance one encounters is 100Ω, and resistors with values in the megaohms range are sometimes called for. In practice, the omega symbol is often omitted when it is understood from context. A convention that is sometimes seen is that the resistance value will be written with either the letter "R" or the metric multiplier prefix placed in the number where the decimal point would go. So for example, 100Ω might be written as 100R; 1000Ω would be written as 1k, and 6800Ω would be written as 6k8.

Two other parameters are commonly given in specifying a resistor: the tolerance and the maximum power dissipation. Resistors are mass produced, in very large quantities, and the manufacturing processes are not perfect. As a result, it's actually rare for a resistor to measure as being exactly the specified value; it may be some small percentage more or less. Manufacturers measure and grade their resistors as to how close to the spec value they actually are, and then "bin" them up into tolerance ranges. As one might expect, the tighter tolerance ranges cost more. The most common tolerance range sold today is 5%, meaning that if a resistor is marked as a 10KΩ, 5% resistor, its actual value may be anywhere from 9500Ω to 10,500Ω. Besides 5% resistors, the other commonly available ranges are 1% and 0.1%. Electronic products built prior to about 1980 may contain 10% resistors, but resistor manufacturing processes have improved to the point where the 10% range is no longer marketed much, since there is no cost savings. When designing a circuit, the circuit designer will determine for each resistor in the circuit how much tolerance is allowable in order for the circuit to work, and then specify the tolerance based on that information.

Power Dissipation

Whenever a current passes through a resistor, some of the energy contained in that current is converted into heat. A resistor can only dissipate so much heat before it reaches a high enough temperature to destroy itself or nearby components. This waste heat, along with all other measures of energy and power production in the electrical world, is measured in watts. Note that the watt is not a quantity of energy; that's a common mistake. It is rather a rate at which energy or power is produced, flowed, or consumed. (In order to drive your car down the highway at a given miles or kilometers per hour rate, the engine must produce power at a certain rate. That rate of power production can be measured in watts, although in the case of automobile engines, "horsepower" is usually used instead. Horsepower is simply a different unit for the same thing: 1 horsepower roughly equals 750 watts.)

The power dissipated as heat will of course raise the temperature of the resisitor. To avoid cooking the resistor, the dissipation needs to be kept below the rating. If you know the voltage across the resistor and the current flowing through it, the dissipation is given by:

Watts = EI

Many times, in circuit design, you won't know the exact current, only the voltage applied to the resistor. Using Ohm's Law, you can substitute for I in the above:

I = E/R

so,

Watts = E(E/R) = E^2/R

The most common dissipation rating for the types of resistors used in electronics is 1/4 watt. 1/8 watt and 1/2 watt types are also common. In general, the dissipation rating is directly proportional to the physical size of the resistor. Types rated for more than 1 watt are usually large and difficult to package; they are also often built as "wirewound" types which have other effects on a circuit that must be taken into account in the circuit design.

Substituting Resistors

A few rules of thumb for resistor substitution:

  1. You can always use a resistor of tighter tolerance than specified. If a parts list calls for a 5% resistor, you can use a 1% or better resistor of the same value.

  2. You can use a higher-dissipation resistor than specified, provided that it physically fits in the space where it needs to go, and as long as you avoid wirewound types. If the parts list calls for a 1/4 watt resistor, a 1/2 watt or 1 watt one will work as long as it fits on the board. Don't use wirewound resistors unless the schematic specifically calls for it.

  3. If you are in a pinch for a resistor value you don't have, or if you need an oddball value, you might be able to assemble using some combination of series and/or parallel resistors; see the next section.
Resistors in Series and in Parallel

Sometimes, you need a resistance value that is not a standard value or not easily available. You can build different values by wiring up two or more resistors in series and parallel. The rule for combining resistors in series is simple: their resistance values add. Example: a 10K resistor in series with a 6.8K resistor adds up to 16.8K. Resistors wired in parallel are more complicated: the rule there is often called "reciprocal sums". Suppose you have three resistors, R1, R2, and R3 in parallel. You first take the reciprocal of all of their values and add those:

1/Rsum = 1/R1 + 1/R2 + 1/R3

Then, take the reciprocal of 1/Rsum to get the result. So, for example, if R1 = 1K, R2 = 2200 ohms, and R3 = 5000 ohms, the calculation is:

1/Rsum = 1/1000 + 1/2200 + 1/5000

1/Rsum = 0.001 + 0.00045 + 0.0002 = 0.00165

Rsum = 1/0.00165 = 604 ohms

Note that the resulting value is less than the lowest-valued resistor in the set. This will always be true for resistors in parallel. The technique can be extended to any number of parallel resistors. Simplification: if all of the parallel resistors have the same value, the result will be that value divided by the number of resistors.

To figure the dissipation of series or parallel resistors, you would have to work out the applied voltage for each resistor, which can be some work. Try this shortcut first: figure the dissipation treating the resulting value of the series or parallel combination as if it were a single resistor. If that is within the dissipation of all of the resistors in the combination, then it's okay.

Resistor Markings

Resistors often do not have their value printed on the resistor body; instead, they use what are known as the RETMA codes, which are the colored rings you see painted on the resistor body. In current usage, this will be a sequence of four or five color bands. Four bands, with one of them being a gold or silver band, indicates a 10% or 5% tolerance. To determine the value, orient the resistor so the gold or silver band is on the right. Then, read the other bands according to this code:

0 = black
1 = brown
2 = red
3 = orange
4 = yellow
5 = green
6 = blue
7 = violet
8 = gray
9 = white

For a 10% or 5% type, the first two bands indicate the first two digits of the resistance value. The third band indicates that the specified number of zeroes should be added on (Note: this is not the same thing as specifying a power of ten! Some resistors use more digit bands, and the same color last band indicates a different power of ten on these. To keep it straight, don't worry about powers of ten; just add on the specified number of zeroes.) So, for example, a resistor with the color code orange/green/red indicates:

orange: 3
green: 5
red: 00 (two zeroes)

The value is 3500 ohms. A gold band at the end indicates it's a 5% tolerance; a silver band indicates 10%.

1% and better types will have five bands instead of four. It can be a bit difficult to determine which end is the left and which is the right, but if you know the type, a brown band at one end will indicate a 1% type. A violet band indicates a 0.1% type; other values are possible. Read the other bands the same way: red/red/violet/orange indicates:

red: 2
red: 2
violet: 7
orange: 000 (three zeroes)

This is a 227K ohm resistor. Below are pictured five resistors. See if you can make out their values.



Top: violet (hard to see in the photo), green, brown, gold = 750 ohms, 5%, 1/4 watt. Second: red, red, red, gold = 2200 ohms, 5%, 1/4 watt.
Third: orange, yellow, orange, gold = 34K ohms, 5%, 1/2 watt (note larger size).
Fourth: red, red, yellow, gold = 220K ohms, 5%, 1/4 watt
Bottom: brown, black, green, gold = 1.5M ohms, 5%, 1/4 watt

Below are some 9.09K, 1/4 watt, 1% types. Note that they use a printed designation instead of the RETMA markings. This seems to be the way the high-precision types are going.





Here are some old 10% types -- note the silver stripes. You don't see these much anymore.






Specialized Resistors

We mentioned wirewound resistors earlier. You normally want to avoid these because they have a property called induction, which will be covered in a later installment. The induction can mess up the circuit that the resistor is in. You will seldom need one of these in music gear, but there is one place where you may run into one -- amplifiers. Reason: wirewound resistors can be made to tolerate very high dissipations, 5W and up. These are often called "power resistors", and sometimes they are needed to control the high currents found in a high-power amp.

A specialized type often found in synthesizers is the temperature-compensating resistor, or "tempco" for short. All resistors are somewhat temperature-dependent. But a tempco's resistance change at different temperatures follows a very specific formula. This can be used to compensate for other circuit characteristics that change with temperature. All VCO circuits that have volts/octave response need a circuit called an "exponential converter" to transform the input control voltage to drive the oscillator core, but the implementation that is generally used in analog VCOs is very temperature-sensitive. A tempco is essential to offset this in order for the VCO's tuning to remain stable as the circuit heats up.


Summary

Resistors are one of the most frequently used of the electrical components. They are available in a huge array of types and values. Sorting out the markings can be tricky, so look closely. If you have trouble remembering the color codes, there are "RETMA" calculators that have little wheels where you can dial up the colors and it will tell you the value.

Next installment: capacitors.

Thursday, April 16, 2009

Adventures in Backlighting Part 2



The glowing blob you see above is a piece of a cut-to-size EL sheet, glowing on my workbench. I finally got it to work last night. Here's a pic of it unpowered (and with the lights on):



And here is what it looks like in low light -- kind of spooky:




If you read the previous post, you know that I was having trouble with it: every time I connected a piece of the EL sheet to the inverter, the +5V power supply would shut down. I was getting the power from one block of the Discombobulator, which had a Condor triple-voltage linear supply, with the +5 rated at 3A. There was only one module using the +5 in that block, but I figured maybe it was drawing a lot of current, so I disconnected it. With this, there was nothing but the EL inverter drawing from the +5. Still no joy; it shut down as soon as I connected the EL sheet. The second thing I tried was to go get another Discombobulator block. One of the three has a switching +5 power supply rate at 5A. Trying it with this, the power supply didn't shut down -- the inverter itself did.

Well, this left me completely puzzled. Was the sheet I was trying to light too big for the inverter? I tried cutting off a small piece (the piece you see above) and just using that. No difference. What was going on? I checked the piece with an ohmmeter, and was surprised to get readings ranging from about 1300 ohms to 20K. An EL light, being a capacitive device, should read open on a DC ohmmeter.

Tried it again, under low light. When I did this, I noticed that I could see small arcs when I pressed the EL sheet's tabs against the connector, just before the inverter shut down. The arcs evidently weren't in the EL sheet itself, since they weren't leaving burned or melted spots. They had to be in the connector. I looked over the connector and didn't see any obvious shorts. But, just to see, I removed the connector and rigged up a pair of jumper wires with some copper foil tape to connect the EL sheet to the inverter.

Voila! That worked. Something in the connector is creating a low-impedence short circuit path. Perhaps it's the adhesieve that was used to glue the metal contact surfaces to the plastic case. But in any event, that connector doesn't work. That's okay; I will rig up something to install it in the K5m when I get ready to do that.

Here's a larger piece, illuminated. This is the piece I'm going to cut to size to fit in the K5m's display. The crennelations are where the connecting tabs are.




By the way, if you play around with these things long enough, and you aren't very careful about the conductive surfaces, you will get zapped by the inverter eventually. And it will hurt. 90V at 400 Hz really stings. Lesson learned from recent experience.

Sunday, April 12, 2009

Adventures in Backlighting Part 1

My K5m needs a new backlight.  Has for some time, actually... and, unfortunately, most of the places that were carrying them a few years ago seem to have disappeared.  So I figured I'd try a DIY approach.  

I know from having tested it previously, using a battery-powered inverter and a length of EL wire, that both the backlight itself and the inverter are bad.  I ordered a sheet of EL material and connectors from Electroluminescence.com's small-quantity online store, along with some connectors.  It's a cut-to-size sheet, so I can cut it to fit into the space inside the K5m's LCD display.  For the inverter, I ordered a Hantronix HVI-5E from Mouser; it appears to be about the same shape and size as the existing one, and should be easy to retrofit.  The inverter's output is spec'ed as 90V at 400 Hz.  

First, I set it all up on my workbench:




I'm using the power supply from one of the function blocks of the Discombobulator to power this experiment.  The inverter is shown plugged into the experimenter socket in the center of the picture.  It takes +5V DC.  The EL sheet is the foil-colored panel to the right (this picture shows the reverse side).  Here's a close-up of the connection:




Here's the front side.  It's only pink when it is not powered; it is supposed to light up white.




Unfortunately I haven't gotten it to work yet.  Every time I connect the sheet, the power supply shuts down.  It also does that if I try to probe the inverter output with the scope.  If I just hold the probe close to the connector, I can see the AC waveform on the scope and it looks good, but the moment the scope probe touches the conductor, no more power.  Haven't figured that out yet; I don't know if it's overloading the +5, or if the inverter does something nasty that tricks the protection circuit.  I guess I'll need to try a different supply.  


Sunday, April 5, 2009

Electricity for Synth-DIYers: Volts and Amps

This is the beginning of a series that I'm starting to talk about the basics of electricity, as it applies to synth players and DIYers. I'm not going to get too much into theory in this series, but I'll start it with a basic discussion of what electricity is and how it's measured. Later posts will focus on electronics components, what they do, and how they are specified, as well as provide a few basic circuit examples.


What is Electricity?

All materials are composed of atoms, and molecules composed of atoms. An atom is made up of a nucleus surrounded by electrons. In non-conducting materials, all of the electrons are pretty tightly bound to their respective nuclei. However, in conducting materials (metals mainly), each atom has one or more electrons that are loosely bound and can swap around with electrons from adjacent atoms. Normally, they do this at random, zinging around in arbitrary directions. However, if one applies an electromagnetic force to the conducting material, the electrons can be made to move in a certain direction. Since each electron carries a specific amount of electric charge, this movement constitutes electricity.


No, Really, What is Electricity?

Electricity, for most practical purposes, is the flow of electric current from one place to another. Electronics is the engineering craft of designing electrical circuits to create and process various forms of signals that are converted to or from electrical signals. (One of the advantages of electrical energy is that it is easily converted into other forms of energy, and modern industry has invented all kinds of devices for doing so.) In our context, we are mainly talking about electrical currents that will eventually, when piped through an amp and speaker, be converted into sound. Our first concerns about any flow of electrical current are always: (1) Which direction is it going? (2) How much electricity is flowing? (3) How much "pressure" is there motivating the electricity to flow? The quantity of electricity flowing, and in what direction, is referred to as "current" or "amperage", and is measured in amps. The unit is designated with the letter A in a specification, such as 1.5A for one and one-half amps. The "pressure" is referred to as "voltage" and is measured in volts, designed with the letter V in a specification, e.g., 15 volts is 15V. The usual metric prefixes can be used for millivolts/amps, kilovolts/amps, etc, so 30 mA is thirty milliamps.

Water analogies are often used to explain the basics of electricity. It's something one has to be careful about, because the analogy only goes so far, but it does help explain the basics. Electricity is similar to water in that you cannot "compress" it; if you push a certain amount of electrical current into one end of a wire, an equal amount of curent has to come out somewhere else. You can "use up" voltage, but current in always equals current out. If you think about a water supply pipe, there are two things that determine how much water you can get out of it: how much water is in the line, and how much pressure there is making the water move. Voltage is analagous to the amount of pressure in a water pipeline, while current (amps) is the amount of water moving through the pipe. The amount of pressure has an effect on how much water moves through the pipe, but the size of the pipe has an effect too. A bigger pipe can carry the same amount of current as a smaller pipe, at a lower pressure.

Lighting is an example of an electrical current with high voltage but a relatively modest number of amps flowing. Electricity produced by a van der Graaf generator is an even more extreme example: the voltage is in the millions of volts, but the current is very close to zero. At the opposite extreme, in the 1980s, I worked on some computer systems that had power supplies that output 400 amps at only 2.6 volts. This is sort of the electrical equivalent of the Mississippi River -- there's an enormous amount of water flowing through the Mississippi, but at a very low downstream pressure.

How much is a volt? One volt isn't much. Small batteries of the AAA/AA/C/D types put out 1.5V nominally. You'll note that you can hold these in your hand, with one finger on the positive terminal and the other on the negative terminal, and not feel any electricity flowing. "Square" batteries that use the snap-on connectors are 9V; most automobile batteries are 12V. Modular synths often use plus and minus 15V power supplies. The minimum voltage that is usually considered to pose any threat of electrocution to a human (assuming that one is in reasonably good health, and not doing anything stupid like standing in water while working on a circuit) is about 20V. A moderate-powered modern amplifier might have power supplies running at about 60V. Old vacuum tube (valve) circuits needed higher voltages; 200-300V is common for guitar amps. These voltages are definitely lethal and must be respected. Power distibution in homes in most countries takes place at 220-240 volts; 120V is used in the USA, Canada, and a few other countries.

By comparison, one amp is a fairly generous amount of current. On North American power, a 100W incandescent light bulb uses about 1A of current. Power distribution branch circuits in houses are usually in the 15-30A range. Electronics circuits (other than power amplifiers) usually deal with currents in milliamps or smaller.


You Can't Compress Electricity

I already said it above: as in the case of water, you can't compress electricity. If you push an electric current into one end of a conductor, an equal amount of current has to come out somewhere else. This is an important concept, and it leads directly to the notion of electrical circuits. Wherever electric current comes from, it eventually has to go back there, in a closed loop. Water can be "conducted" by almost anything; nearly all substances allow water to flow over, around, or through them, so building a water circuit isn't that hard conceptually. However, there are a lot of things that don't conduct electricity, at least not very well, including the air around us. As in the case of stagnant water, electricity that isn't moving and has no path to move cannot do useful work. So it is always necessary for electrical circuits to be constructed in closed loops. Current in always equals current out; wherever the source of current is in a circuit, there has to be a path for the "used up" current to get back there. That's way batteries and generators have two poles: current comes out of one pole, and goes back in the other one.


Resistance and Ohm's Law

Outside of semiconductors, all electrical circuits have some resistance in them; they tend to resist the flow of electrical current to at least some degree. The amount of current that flows through the circuit is inversely proportional to this resistance, and directly proportional to the voltage that is motivating the current. Turning to the water analogy again, if you consider a pipe that is straight and has very smooth walls, it has little resistance to the flow of water through it. So it doesn't take much pressure to make a lot of water move through the pipe. On the other hand, if the pipe has rough interior walls (e.g., old galvanized pipe) and a bunch of twists and turns, it has higher resistance, and requires higher pressure to deliver the same amount of water flow.

The same thing happens in electrical circuits. Increased voltage will make more current flow through the circuit; increased resistance will lessen the current flow. These relationships are described by Ohm's Law, which is the basic law of electricity:

E=IR

where E=voltage (in volts), I=current (in amps), and R=resistance (in ohms).


A Few Basic Circuits

Below is the most simple circuit possible.  It consists of a battery and a resistor.  The symbol with the short and long lines represents the battery; the plus sign shows which end represents the positive pole of the battery.  The squiggly symbol represents the resistor.  This is standard symbology for electrical circuit drawings.  

This circuit doesn't do much; all it does is create heat when the current flows through the resistor.  The next circuit is more interesting.  It adds a light-emitting diode, or LED, to the circuit.  


You're familiar with LEDs; they generate light of a specific color when electricity passes through them.  The round symbol containing the triangle and line, plus the squiggly arrows coming out, represents the LED.  The arrows have to be there to emphasize that this is an LED and not a regular diode, which doesn't create light and is used for a different purpose.  

What is the resistor doing in this circuit?  It limits the flow of current through the LED.  The LED itself (unlike a regular light bulb) has very low resistance; if it were connected directly to the battery, so much current would flow through it that it would quickly burn up.  

The third circuit is a variation of the above.  It allows the brightness of the LED to be varied:


The resistor circuit with the arrow through it represents a variable resistor, one that has some mechanical means (such as a knob) for adjusting its resistance.  The two resistors together, the fixed one and the variable one, make up what is known as a "voltage divider".  Depending on the setting of the variable resistor, some of the current will flow through the variable resistor and bypass the LED; the rest will instead take the "short cut" through the low resistance of the LED.  You've probably heard of a potentiometer, or "pot" for short.  A variable resistor is one way a potentiometer can be wired up.  


AC/DC (And We're Not Talking About Angus Young)

Here's where we start to make things more complicated, and where the water analogy starts to break down. So far all the circuits we've discussed have been direct current (DC) circuits. In a DC circuit, current flows from the positive side of the current source, around the circuit, and back to the negative side of the current source. Pretty simple. However, in an alternating current (AC) circuit, the current doesn't go all the way around the loop; instead, it constantly changes direction. In this case, the current source doesn't have a fixed positive or negative terminal; at any given time, one side is positive and the other side is negative, then they switch directions.

So what good is this? For one thing, as it turns out, AC is a more efficient way of delivering a lot of electrical energy. The reasons why are complex and I won't get into them now, but this is why the power circuits in your residence are AC and not DC. (Thomas Edison, who designed the world's first commercial electric power distribution grid, tried using DC. But competitors using AC were able to put him out of business.) Of more interest to us is the fact that an AC current is a perfect analog for a sound wave travelling through the air. Sound waves are also alternating waves, and it's easy for an electrical circuit to convert sound waves into electrical waves. The device that does this is, of course, the microphone. And the device that does the opposite, turning electrical waves into sound waves, is the loudspeaker.


Stop, That Hertz

If the current follows a repeating pattern (waveform) alternating at a consistent rate, then one "cycle" is considered the time from some arbitrary starting point in the waveform to the point where it begins to repeat the just-completed pattern. The time it takes for one cycle is known as the "period". Measuring that time in seconds, and then taking the reciprocal, gives the frequency, which is the number of times that the alternating current alternates in one second. The unit of measure for frequency is the "hertz" and is abbreviated Hz; by definition, 1 Hz is one cycle per second. The word "hertz" has only been in common use since the 1960s, so in old radio and TV manuals from before that time, you may see frequency units given as "cps", which is the same thing (cycles per second).

AC circuits have more complex behavior than DC circuits. An AC current may consist of a blend of different componets, or partials, alternating at different frequencies. The device known as the oscilliscope will show you what the composite waveform looks like, but to find all of the individual components, you have to perform a mathematical operation known as a Fourier analysis, which we won't get into right now. The one important point to remeber is that the "purest" type of wave is the sine wave; this consists of exactly one partial at one given frequency. All other waveforms are made of combinations of two or more sine waves. Electrical power is distributed in the form of a sine wave, alternating at 50 or 60 Hz depending on what country you live in. The audio frequency range is conventionally given as ranging from 20 to 20,000 Hz. Commercial FM radio transmission in North America takes place in a frequency band centered around 100 MHz (megahertz, or millions of cycles per second); TV channels 1-6 are at frequencies somewhat below the FM band, while TV channels 7 and higher are above the FM band.


Ben Franklin Flips a Coin, Comes Up Tails

Thus far, we've treated current as if it comes from the positive pole of a battery, and flows towards the negative pole.  You probably know that electrical energy is carried by the atomic particle called the electron; electricity moves by means of electrons moving from atom to atom through a conductor.  Now, here's were we deal with an unfortunate consequence of a random guess.  Someone back in the 18th century (one legend has it that it was Ben Franklin) had to take a 50-50 guess as to whether the electron is positively or negatively charged.  They guessed that the electron is positively charged.  Unfortunately, they guessed wrong, which means that when we speak of current flowing through a circuit in a given direction, the electrons are actually moving in the opposite direction.  So our convention, of assuming that current moves from positive to negative, is exactly the wrong way around.  Nonetheless, electrical engineering, by long-standing convention, continues to treat current this way; "conventional current" flows from positive to negative, while electrons actually flow from negative to positive.  Circuit designs continue to this day to be drawn and the math computed in terms of conventional current, and for basic circuits, this works fine.  It usually only becomes important to understand the distinction when studying the physics of how certain semiconductors, or vacuum tubes (valves) work.  

The next installation in this series will deal with resistors: what they are, how they work, and how they are specified.

Tuesday, March 31, 2009

Remembering the Bahn Sage

Today we pause to remember the Bahn Sage... the synth that the world was not ready for. Ten years ago, a visionary named Ken Elhardt joined forces with Bahn Audio Systems, the company which had previously confined itself to building top-secret sound eavesdropping satellites for the US military. The result was the Bahn Sage:





(photo swiped from Matrixsynth)

The Sage was doomed from the start because it was simply too advanced for the market. All of the technologies that we are now seeing in the most advanced of today's products were done, and done better, in the Sage. Zeroscillators? Sorry, Cynthia, the Sage's four oscillators did zero far better. Notice the joystick? It was connected to an advanced time and formant processing system called Varisentence, which made it possible to expand or compress the most difficult and sophisticated vocal parts into any time frame it needed to fit into. With Varisentence, it was possible to listen to all of Husker Du's Zen Arcade in eight seconds, with perfect clarity. Bob Mould had an agreement to receive the prototype once the system went on sale, and at the time he said: "With this synth, I will forever be the king of speed metal. Those Metallica guys haven't got a chance." Roland stole the technology, but they never got it completely sorted; to this day, their variant cannot handle whole sentences, only phrases.

Combined with its nopass filters, segment-free envelopes, and perfectly nulled VCAs, the Sage was set to knock all other analog and VA synths off of the market. And the Sage met all of the circuit design goals for today's most discriminating synth players: it contained no digital circuits, and in fact no ICs of any kind. It met the European RoHS requirements years before the regulations were even proposed, and would have been ready to ship the day that RoHS went into effect, had not disaster befell the company.

Unfortunately, shortly before the unveiling, the Sage's designer Elhardt disappeared. It was later discovered that he had time-warped back to 1958 to patent the concept of voltage control, only to find when he got there, that Bob Moog had gone back to 1947 and beaten him to it. The temporal upsets caused by this event resulted in Adam Sandler becoming the world's foremost synth player, and the rights to nearly every circuit design idea falling into the possession of the mysterious master designer and frequent Web commentator known only as "Argitoth". Playing Argi synths which produce absolutely pure sine waves with perfectly balanced overtones, Sandler has over the past ten years created every work of electronic music that is mathematically possible, resulting in the current situation where no original work can be done any more. If only the Sage had lived. Sigh.

Monday, March 23, 2009

Stories, legends, and rumors about synths -- true or false?

Story: Laurens Hammond, inventor of the Hammond organ, was tone deaf and couldn't play.

Verdict: Partly true. The part about being tone deaf is probably false; in Hammond as in Organ: The Laurens Hammond Story, Stuyvesant Berry describes Hammond's boyhood experiences in St. Luke's Episcopal Church in Evanston, Illinois, and how fond Hammond was of the organ music in the church. It was the memory of this music which first inspired Hammond to build an organ when he was seeking a new application for the Hammond Clock Company's synchronous motors. Hammond was familiar with the various classical orchestra instruments, and as Berry describes, during the period when the organ was being designed, Hammond became for a time one of the world's foremost experts on the tonalities of what we now call additive synthesis. However, it is true that Hammond did not play, as Berry documents in the last chapter. Most likely it was simply not high on his priority list; Hammond was a prolific inventor who worked long hours for most of his life.

Story: No recording was ever made of the Telharmonium, the first synthesizer.

Verdict: Possibly true. The last operating Telharmonium was shut down in 1916; if any recording was ever made, it would have been a transcription to a phonograph record or Edison cylinder, given that no other recording technology existed at the time. No recordings are known to exist today, and there is no definitive account of any recording having ever been made.
Story: Moog once designed a DCO-based synth.
Verdict: True. The SL-8 was an eight-voice polysynth with DCOs, priced below the Memorymoog line. It was premiered at the NAMM show in 1983. Unfortunately, another synth introduced at that same show was the Yamaha DX-7. The Moog staff realized what that meant. (And they were right.) The SL-8 never went into production, and the prototype was eventually dismantled.

Story: The Rhodes Chroma was actually designed by ARP.

Verdict: True. Engineers at ARP were working on the basic concept for the Chroma as early as 1977; however, company management regarded the Avatar guitar synthesizer as a higher-priority project, and so the Chroma effort stretched out. When the market failure of the Avatar became clear in 1980, a crash effort was launched to complete the Chroma design, but they ran out of time; ARP was forced into bankruptcy in 1981. The company's chief engineer, Philip Dodds, was nominated by the court-appointed receiver to wrap up the company's affairs. He arranged to see the rights to the Chroma to CBS, plus reassemble the development staff (including himself) at a CBS facility to complete the design. This was done, and CBS began marketing the Chroma using the Rhodes brand name (which it owned at the time) the following year. The Chroma staff was not actually part of Rhodes, and never had anything to do with any other Rhodes products.

Story: Prior to the creation of MIDI, Sequential Circuits had designed a serial bus for musical instruments which was much faster than MIDI.

Verdict: True. The interface was implemented on the Rev3 Prophet-5; it allowed a sequencer to play the synth, command program changes, send and receive program data, and receive key presses from the P5's keyboard. The obvious question to ask, then, is: why didn't Sequential propose this as the MIDI standard? Three possible reasons:

  1. Cost. A major goal of the MIDI standard was to create a low-cost interface. Sequential's interface required a high-speed UART which expected to be externally clocked by the sequencer. This increased the cost of both the synth and the sequencer. Expensive, length-matched coaxial cables were required for interconnects. By sacrificing speed, MIDI was able to adopt a lower-cost UART, clock circuit, and cabling, and still have some cost margin to add in needed protection in the interfaces against static electricity and mis-connections.
  2. Hardware and software dependence. The communications protocol was designed specifically for the P5; for example, the format in which key presses were transmitted and received depended on the specific number of keys on the P5, and on the fact that the keyboard didn't have velocity or aftertouch.
  3. Tight timing constraints. The sequencer interface interacted intimately with the P5's main software processing loop. Data being sent, particularly key press data, had to arrive within a specific time window to prevent either lost data or control response problems for the person playing the P5. A CPU or software upgrade would have changed these, and needless to say, a different model of synth would have had completely different constraints. This would have made writing sequencer software a nightmare.

Story: The prototype of the Moog Voyager Old School was stolen from Moog.

Verdict: True. It was stolen from the company's booth at the Musikmesse trade show in Germany in 2008. However, it was recovered. In an incredible act of stupidity, the thief listed it on eBay; the ad was traced and the thief caught. The same thief stole equipment from other companies at the show.

Story: Edgar Winter used to play with an ARP 2600 on a guitar strap.

Verdict: Partly true. Edgar didn't strap on the whole 2600, just the keyboard. Even so, the ARP 2600 keyboard was a pretty substantial hunk of iron. On the other hand, Wayne Famous of the '80s synth-pop band The Producers did in fact strap on an Oberheim OB-X... and he now has back problems to show for his trouble. Here's a video of Wayne at work in 1981.

Thursday, March 19, 2009

What the heck happened to Vintagesynth?

It returns a message from the ISP saying the site has been suspended. Investigating...

EDIT: They had some kind of problem with their hosting service.  It's fixed now.

Tuesday, March 17, 2009

Rack rearrangement

I decided last weekend to rearrange some of the contents of my two 19" racks.  I have two, a rack that I built myself which is about 25 units tall, and a tabletop rack which has a tilt-up top for the mixer, plus 6U of space underneath.  My main goal was to clean up my MIDI routing by swapping some things around.  The tall rack contains a MOTU MIDI Express USB interface which handles all of the MIDI for the rack and both of the keyboard stands.  The tabletop rack contains an Edirol UM-2 for the synths in that rack.  All of the I/O (8x8 in the MOTU, 2x2 in the Edirol) is pretty well spoken for.  

Here is a photo of the tall rack from several months ago:



Among the items in this rack are a Yamaha TG33, which is the black thing protruding out the front just under the patch bay at the top, and an Oberheim Matrix-1000 and a Kawai K5M, which are the bottom two items in the photo.  You can just see a bit of the amp underneath the K5M; the amp sits at the bottom of the rack.  The MIDI interface is in the middle; it's the unit under the one where the headphone cord is plugged in.  

Here's the tabletop rack, visible at the left of the photo:



This photo was taken while I was setting up the studio, and only the Oberheim Matrix-6R was installed at the bottom of the rack.  Since this photo was taken, I had added a Roland JD990.  The immediate motivation for all this was to get the JD990 into the other rack so that I could use the routing capabilities of the MOTU MIDI interface to route sysex from the JD800 directly to the JD990, which allows the 990 to be programmed using the 800's panel controls.  I couldn't do that when they were on different MIDI interfaces, without having to bring up the computer.  A secondary motivation was to get the 990 into a place where the screen would be easier to read.  

Towards that end, I decided to put the 990 near the top of the tall rack, which meant moving the TG33.  The obvious target for removal to make room was the 4U high Kawai K5m.  Here, I have removed them from the rack and both out on the floor:




The empty spaces in the rack where they were:




The K5M went to the tabletop rack.  To make room for it, both the JD990 and the Matrix-6R had to come out; the K5M and the Matrix-6R together were 1U taller than the rack.  I decided to gain space by swapping the two Oberheims.  Here's both of the Oberheims out of their respective places:




And the tabletop rack emptied out.  The Edirol is the small box in the back:




The K5m and the Matrix-1000 went into the tabletop rack, with space for the Edirol at the bottom:




And from the back.  I realized after mounting them up that the Matrix-1000's case was sagging.  A block of wood fixed that.  You can see in the foreground the Edirol, which after taking this photo, I slid under the Matrix-1000 to the front right:




The JD990 went into the top of the tall rack without any problem:




But the Matrix-6R ran into problems.  It's very wide; it just barely fits in a standard rack.  The space it, and the TG33, were to go into, with an old Furman parametric EQ above, and the amp below:




First problem: The power strips mounted on the rack rail braces were intruding into the space.  It was never a problem before, because the K5m isn't nearly as deep as the Matrix-6 is.




I moved the power strips and fixed that.  Second problem: Because the rack is homemade, I didn't get all of the dimensions quite as exactly as I should have.  It turned out to be about 3/32" too narrow to clear the Matrix-6R's rack ears, where they mount to the sides of the case.  But one of the advantages of a wood rack is you can fix stuff like that.  So out came the Dremel and the shop vac:  




I took about 1/16" off of each side, to about 3/4" deep from the front, and that created clearance for the rack ears.  After that, it mounted up nicely:




Would you be willing to stick your hand in here?  The bottom of the rear of the rack is rather busy, with the Matrix-6R taking up formerly empty space.  Getting it hooked up involved a bit of fishing:




Last item to take care of was the TG33.  I had thought at first that I would mount it at the bottom of the rack the way I had it at the top, using the unusual extending rack ears that came with it.  But then I realized that it was easier to simply set it on top of the amp; the rack doesn't go anywhere, so there was no real need to mount it.  (The amp isn't mounted; it simply sits on the rack base.)  However, the amp did need some clearance at the top for ventilation.  To provide that, I cut a couple of spacers from a piece of scrap wood.  With a couple of dabs of Permatex blue RTV silicone, they stuck to the bottom of the TG33 case nicely, but they can still be removed if need be:




With them attached, the TG33 gains about 5/8" clearance at the bottom:



This worked out nicely.  The TG33 pushes back into the rack, and can be pulled out to work with it.  In fact, with a little slack on the cables, I can pull it out and put it in my lap.  

The completed tall rack, with the JD990 underneath the patch bay at the top, and the Matrix-6R and the TG33 at the bottom:




And the TG33, ready for action:



Everything's up and running, and with all the equipment in the tall rack on the MOTU MIDI interface, I can now use the MOTU to do the following MIDI routings without needing the computer:

  • Route panel control sysex from the JD800 to the JD990
  • Route sysex from the MOTU's front panel ports to the Fizmo
  • Route the bass pedals to the JD990
  • Route the bass pedals out of the front panel port to the modular or the EML
Now, back to the Fizmo wars.

Monday, March 16, 2009

The ongoing Fizmo project

I've done a bunch more work on identifying how to edit Fizmo patches via MIDI. I've got the NRPNs worked out for about half of the sound parameters, including some of the ones not accessible from the panel. I'll post an update in a few days with all of the ones I've managed to identify. The internal architecture turns out to have some similarities to the Ensoniq MR series. The envelopes are six-segment types. You can set time and ending level for segments 1-4, level for segment 5 (which is sustain) and time for segment 6 (which is of course release). The filter is actually a lot more complex than the simple LPF that the panel allows you to access. There are a bunch of modulation routings that aren't accessible from the panel, nor does the manual even hint at them.

And some of these parameters, once set via MIDI access, aren't even reinitializable from the panel. For instance, the filter is actually two filters in series, and the four elements (poles) can be arranged in different combinations. There is a "link" parameter that ties the filter 2 settings to filter 1, but if it's off in a given patch, you can't turn it on from the panel, and you can't do anything that causes the filter 2 settings to change. I found this out when I was experimenting with NRPNs, and I managed to accidentally switch the link off, and all of a sudden I had a modulation on the filter that I couldn't get rid of. The modulation was on filter 2, and the panel controls only access filter 1. The same sort of thing can happen if you use a factory patch as a starting point for something.

Several things that appear to be simple on/off parameters from the panel are actually variable. One example is the envelope velocity scaling. There are actually two parameters associated with it. One is the active value; the other is a "save" location. The active value determines how much velocity modifies the attack time (actually all of the segment 1-4 times) of the given envelope. When you press the button on the panel to turn velocity off, it sets this parameter to 0. When you turn it back on, it actually sets the active value to the save value, which is not necessarily the maximum value. If you only set the active value via MIDI, then turn velocity off and back on at the panel, it will return to the save value, not the active value that was set. To make a change "stick", you have to set both the active and save values.

Patches actually do have names on the Fizmo. You can't see them from the panel (why oh why didn't they include a real display on the Fizmo?), but you can see and set them in Sounddiver. Oddly, the implementation makes every individual character in the name its own parameter. So, in Sounddiver, clicking in the patch name field and typing a single character results in a sysex exchange with the synth. A bunch of data flying back and forth to change one character. Individual sounds have names too, independent of the patch name. (If you read the Fizmo manual carefully, you will see that by playing games with MIDI Bank Switch and program changes, you can yank individual sounds from a stored patch into the active area, without actually changing the current patch.) Waveforms have names in Sounddiver too, although I'm not sure if it is actually retrieving these from the synth, or if it just has these hard coded.

Parameters are accessible via both NRPN and sysex. I got a tip from the Vintagesynth forum to look at the MR series sysex documentation for some tips. It turns out that the sysex that edits a single parameter is similar. It uses parameter numbers which are mostly the same as the ones the MR uses for its "sound" block of parameters. (The Fizmo, unlike the MR, doesn't group sounds into performances. Some of the things that are performance parameters on the MR are system parameters on the Fizmo. I haven't explored that yet.) Unfortunately, these numbers aren't all the same as the NRPN parameter numbers, but I'm gradually getting all that sorted. One odd thing I've noticed: Ensoniq, like most other manufacturers, transmits "large" numeric parameters (more than one byte) by spreading 32 bits of data over five bytes, owing to not being able to use the high bit in each byte on account of the way the MIDI protocol works. However, it appears that the Fizmo shifts most parameter values three bits to the left prior to encoding them for sysex transmission, and it expects to receive them the same way.

The bulk patch transfer sysexes bear no resemblence to the documented MR sequences as near as I can tell. In fact, the paranoid in me insists that Ensoniq deliberately tried to obscure the data. The MR documentation lays out a nice data structure format which includes, among other things, four-character ASCII sequences that identify the type of each block. In the Fizmo patch dumps, I don't see these. In fact, I don't see any recognizable ASCII strings at all: no patch names or anything. I did some experiments last night, changing one character in the patch name, dumping it, and comparing the MIDI dumps. The characters are there, but they are all shifted at weird offsets across bytes. Why? It certainly makes it harder to make any sense of a MIDI dump. Perhaps they wanted to allow for eight-bit ISO Latin-1 characters, or even Unicode, and so they worked out some means of packing the characters across bytes. As for the other parameters, I have no clue what order they are in, and a few experiments indicate that the MR documentation isn't going to be any help. I'll have to isolate them all, one at a time.

I haven't really gotten into the insert effect stuff yet. And then there's the arpeggiator, where the MR has no analagous feature. Much work to do yet.

Saturday, March 14, 2009

MIDI Connectors and Cables

If you are building your own MIDI cables, or equipment that will connect to MIDI, here are some handy references:

Shavano Music Online has a handy page that explains how to wire MIDI cables. Note a few things: (1) The pins are numbered in a funny order. Pin 2 is in the middle, and pins 4 and 5 are adjacent to it. The outermost pins are numbered 1 and 3. (2) Cables are always wired straight through; there is no crossover. (3) Cables use male connectors on both ends. Equipment always uses female connectors. (4) Contrary to the instructions on the Shavano page, the shield in a cable should be connected to pin 2 at one end only, to avoid ground loops. Leave it unconnected at the other end.

Remember, when wiring MIDI connectors on equipment, that the pinout is the mirror image of the cable connectors.

Mouser part numbers for MIDI connectors:

  • Switchcraft female panel mount connector, solder lugs: 502-57GB5FX
  • Switchcraft male cable connector, crimp connection: 502-05BL5MX
  • Deltron male cable connector, solder lugs (I haven't tried these): 174-2511

Sunday, February 22, 2009

Gymnopedie #1

I've done a synth version of this well-known classical piece.  It's for a ballroom dance routine that my wife and I are doing in a showcase event on February 28.  Read more about it at the Source Code Web site.  

Wednesday, February 18, 2009

How many poles does the TB-303 filter have?

The VCF in the Roland TB-303 is nearly always described as being a 3-pole (18 dB/octave) filter. Many 303 aficianados claim that this is one of the things that gives the 303 its unique sound. However, Tim Stinchome says it's a 4-pole filter. And he's got the math and the SPICE simulations to prove it.

Wednesday, February 11, 2009

Matrix 1000 vs. Matrix 6 DCOs

A point of contention among Oberheim fans is what the differences, if any, are between the Matrix-1000 and the Matrix-6/6r.  Here is an interesting web site from an unnamed Matrix-1000 owner who has done some excellent analysis of the circuitry on the 1000 and several other synths.  Both the Matrix-1000 and the Matrix-6 are based on the CEM 3396 synth-on-a-chip, one of the last and most highly integrated of the Curtis synthesizer building-block IC designs.  Basically, a 3396 is a complete monosynth, or single voice of a polysynth, needing only control voltage sources and some support circuitry.  Among other things, the 3396 has onboard two digitally-controlled oscillators (DCOs); they derive their output from a high-frequency (well above audio range) master clock that must be supplied by external circuitry.  

The author of the Web site linked above writes that the Matrix-6 uses three high-frequency driving oscillators for the six 3396s in the synth.  It's a rather strange grouping: HF oscillator 1 drives VCO 1 of all six voices.  HF osc 2 drives VCO 2 for voices 1 and 2; HF osc 3 drives VCO 2 for the other four voices.  Why this particular division?  I can't think of any explanation.  However, it does assure that for all six voices, VCO 1 and VCO 2 are clocked to separate HF oscillators.  And since the HF oscillators in the Matrix-6 are basically Hartley LC circuits, they are subject to drift caused by temperature, electromagnetic interference, component aging, and a host of other factors.  So for any given voice, VCO 1 and VCO 2 are almost certain to not be precisely in tune to each other.  There is an onboard auto-tune routine for the HF oscillators, but on my Matrix-6r, it doesn't seem to make much difference.

The Matrix-100o goes with a simpler scheme: the HF source for all twelve VCOs is a divide-down of the 6809 CPU master clock.  This is a crystal-derived clock, so it can be expected to not drift much.  However, the point is that all of the VCOs are referenced to the same clock, so the differentials that exist between VCO 1 and VCO 2 in a voice of the 6/6r do not exist on the 1000.  There does appear to be some other source of injected phase variation, since the 1000 in unison mode doesn't suffer from the "phase lock" problem that, say, the Roland Juno-106 exhibits when in unison.  But the tuning drifts that are often credited as being the "sound" of analog VCOs are not present in the 1000.  Take that for what it's worth.  Actually, I think that there's very little difference in sound between the 6/6r and the 1000.  

Incidentally, the Web site linked to in the first paragraph is worth visiting for other reasons.  Among other things, the author of the site appears to have access to the Matrix-1000 firmware source code, and he points out a couple of bugs.  When I was writing M1000X, there were some funny things going on with the envelope settings that I never tracked down, and it bugged the heck out of me because I couldn't find anything wrong with my code or the MIDI data it was sending.  This page explains it: due to a firmware bug, you can't change the sustain level of envelope 1 using the parameter edit sysex.  Attempting to do so changes the initial level of envelope 2 instead.  Sigh.  At least now I know how to work around it.  

Saturday, January 31, 2009

Fake 1% Resistors

Be very careful about buying 1% resistors on eBay. See this thread from electro-music.com.

Sunday, January 11, 2009

A couple of more Fizmo NPRNs

I've worked out two more envelope parameters.  Parameter 112 is some kind of linearity control for the attack phase for the amp envelope.  A value of 127 makes it (hearing-wise) linear; the attack rises smoothly like you would expect.  A value of 0 makes it highly exponential; the envelope barely rises until near the end of the attack time, where it "turns the corner" and rises very abruptly to the peak value; it's almost like having a delay followed by a very short attack.  The default value is 127, which it returns to anytime you move either the attack knob or the decay knob on the panel.

Parameter 113 sets the amount of time the envelope holds at the attack peak before the decay phase begins.  The range appears to be 0-99, with 0 being the minimum.  It returns to 0 when you move the decay knob on the panel.  

Friday, January 2, 2009

The System, Area, and electronica on Sirius XM

Well, the merger has gone through, and as I speculated a year ago in this post, The System didn't make the cut. I can only guess at the reasons why. The big one was probably the fact that the channel was one of the two remaining XM channels being sourced from Worldspace, and both XM and Sirius had been moving in the direction of doing all of their own production in house even before the merger.

I do have to say one thing: over the past year, The System had become a shadow of its former self. That was a shame, and I imagine that it occurred because Worldspace knew they were going to be dropped, so they stopped putting the effort into it. I'm not knocking Zoltar, who is a very capable program director and does a great job with his Subterrainian show. Reality is reality, and there's no point in trying to improve a product that is going to be dropped anyway. But it was disappointing to note, over the past six months in particular, how the playlist was stagnating.

Now, for my next controversial point: The Sirius carryover trance channel, Area, is not bad. It does seem to depend on what time of day you catch it (so far, I've enjoyed the daytime programming the most). I'm liking the Paul Oakenfold shows. I must say that, from what I've heard of it, I don't care for The Juicy Show that much. In the last few weeks, Area seems to be picking up some of The System's playlist, which is a good thing.

However, it's still a bad trend. I've done some ranting on xmfan.com about the dropping of Beyond Jazz, for which there is no replacement. Beyond Jazz was playing a fair amount of acid jazz, which is another facet of electronica that doesn't come anywhere close to airplay on terrestrial radio. And don't even get me started on the long-departed Music Lab. In the dance music category, Chrome was also dropped and not replaced, and Chill has drifted way off message -- it almost sounds like an easy-listening channel now. Satrad was created with the idea that it would be genre radio, carrying almost any kind of music you could imagine with its multitude of available channels. However, we're seeing many of the genre channels being dropped in favor of more mainstream channels, largely duplicating programming on existing channels. What's up with that? It makes no sense.

So, the long-term future of electronica broadcasting appears to be Internet radio. Internet broadcasting has a lot of good points, but there are two downsides to it, one for the listeners and one for the artists. For the listeners, there's the problem of how to receive it affordably in the car or other mobile means. Plus, even at home, you are still at the mercy of your ISP and bandwidth provider. Podcasts may be the answer to this, but it misses the immediacy of live broadcasting. For the artists: Note that part of the problem that satrad is having now is the spiraling royalty rates being forced on Sirius XM by the Copyright Commission. It isn't widely known, but the Commission has within the past two years raised rates for satrad and Internet broadcasting to far higher than what terrestrial radio pays. (This of course occurred at the behest of the NAB, which apparently has the Commission in its pocket.) Satrad can't escape this; it has the choice of paying, or going out of business.

However, Internet broadcasters have a third choice: go offshore. There are plenty of small Carribbean and Pacific Island nations that are willing to charge Internet broadcasters far lower royalties, and their governments will politely ignore American demands for higher royalties. Or, they can move their operations to Russia and pay no royalties at all, although reliable bandwidth there is a concern. As a practical matter, there is no way the U.S. government can filter these broadcasts at the border. The net result: the excessive royalty rates will actually result in little to no royalties to the artists. Ironically, The System, or at least a shadow of it, survives on XM's online service. My understanding is that this is just an automated jukebox of the songs that were on The System's server space at the time the satellite channel was dropped. It's better than nothing, but in the long run, it's not likely to survive either.

There is one more factor that needs to be touched on, though: fan support. If you look at the Dance Discussion forum on xmfan.com, you will note that over the past several years, up until recently, there have been many fan posts concerning Chrome and BPM, but almost none for The System. I tried posting a few things System-related, and none of my posts ever got a reply. I can see how a program director, faced with making a decision about bandwidth, might look at that and conclude that fan interest for The System didn't exist. Moral of the story: In this day and age, if you want electronica (or whatever your favorite form of music is) to survive, you have to support it.

Thursday, January 1, 2009

Exploring the Fizmo NRPN set

After not being able to find any reliable documentation on the NRPN values that the Fizmo uses for patch editing (no, it's not the same as the MR/ZR series), I've started a series of experiments to determine how the NRPN numbers map to parameters, and find all of the "hidden" parameters that you can't edit from the panel.  I've already had a bit of luck on that score.  Before I get into it, here's:

A Quick Tutorial on NRPNs

Those who know some MIDI already know that the number of available continuous controller #'s is limited, and most of them are already assigned.  Some are assigned to specific performance controls (mod wheel, which is controller #1, being the best known).  Some are reserved for sending the low bytes for 14-bit controller values.  The real-time messages eat up some numbers, and General MIDI consumes a few more each time the spec is updated.  So there aren't enough unassigned ones to assign one to each parameter that is editable on a typical synth.  So some manufacturers resort to sysex for parameter editing.

However, the continuous controller definitions themselves contain the mechanism for extending the available set of numbers: The RPN/NRPN mechanism.  The way it works involves four controller messages: two to select the parameter to be edited, and two to send the value.  Registered Parameter Numbers, or RPNs, are defined in the MIDI standard; the two most commonly used RPNs allow master tuning and pitch bend range to be altered via MIDI.  However, Non-Registered Parameter Numbers, or NRPNs, are reserved in the MIDI standard for manufacturers to define how they wish.  

To send an NRPN value, first you send messages to select the desired parameter.  Continuous controller 99 is used to send the most significant byte (MSB), and controller 98 is used to send the least significant byte (LSB).  If the receiver has fewer than 128 parameters, the MSB message need not be used.  For example, to select parameter 131 (whatever that parameter happens to be on a given synth), you would send a controller 99 message with a value of 1, and a controller 98 message with a value of 3.  (The value of the controller 99 message is multiplied by 128, and added to the value of the controller 98 message.)  Having selected the parameter, you then send two more messages to specify the value of the selected parameter: controller 8 sends the MSB of the value, and controller 38 sends the LSB.  (If the parameter is limited to the range 0-127, the MSB message need not be sent.)  If we wanted to set the selected parameter to a value of 286, we send the controller 8 message with a value of 2 (2*128=256), and the controller 38 message with a value of 30.  

Here's what I've found out so far about the Fizmo's NRPN implementation:

Basic Structure of the NRPN numbering

Each parameter within each sound and oscillator has its own NRPN parameter number.  (Recall that each patch on the Fizmo has four sounds, or layers, and two oscillators per sound.)  It is possible to edit multiple sounds and oscillators at once from the panel; if you do this, the Fizmo will send out a separate set of NRPN messages for each individual parameter which has been changed.  In order to make the Fizmo send editing NRPN messages, you have to go into the system edit mode; press the MIDI button multiple times until "nRPn" appears in the display.  Then, press the "yes" button to turn it on.  If you then hit the save button, it will save this to flash and become the power-up setting.  
The high byte of the parameter number is used to specify which sound and oscillator is being accessed.  The values go like this:
  • Sound 1, oscillator 1: 2
  • Sound 1, oscillator 2: 4
  • Sound 2, oscillator 1: 6
  • Sound 2, oscillator 2: 8
  • Sound 3, oscillator 1: 10
  • Sound 3, oscillator 2: 12
  • Sound 4, oscillator 1: 14
  • Sound 4, oscillator 2: 16
Because there are more than 128 parameters in each oscillator, a few parameters will have the MSB value one higher than noted above.  Parameters which are not specific to an oscillator (such as the dry/effect mix) have an MSB value of 1.

The LSB then specifies the individual parameter.  Here are some that I've found so far (the MSB values shown here as an example are for sound 4, oscillator 1):


Control NRPN (99/98)

Effect Mix 1 34
Pitch Tune 14 14
Pitch Fine 14 15
Pitch Mod button 14 26
Pitch Mod Amount 14 27
Glide Time 14 18
Mono Button 14 16
Attack (Pitch) 14 79
*sent initially 14 80
Attack (Filter) 14 95
Attack (Env) 14 111
*sent initially 14 112
Decay (Pitch) 14 85
*sent initially 14 81 14 83 14 82 14 84
Decay (Filter) 14 101
*sent initially 14 97 14 99 14 98
Decay (Env) 14 117
*sent initially 14 113 14 115 14 112
Sustain (Pitch) 14 86
Sustain (Filter) 14 102
Sustain (Env) 14 118
Release (Pitch) 14 87
Release (Filter) 14 103
Release (Env) 14 119
Envelope Mode button 14 123
Velocity button 14 120
*sent initially 14 125
Amp Level 14 12
Pan 14 13
Effect Bus Select button 14 20
Wave Select 14 52
*sent initially 14 51
Wave Modulation button 14 57
Wave Mod Amount 14 58
Filter Cutoff 14 32
Filter Resonance 14 33
Filter Envelope Amount 14 34
*sent initially 14 119
Filter Mod Amount 14 36
Filter Kybd Track button 14 37
*"on" also sends 14 39
Amp Noise Mod Amount 14 70
Amp LFO Mod Amount 15 0
Amp LFO Shape button 14 126

The ones that say "sent initially" are clues to some of the hidden parameters.  Many of these get set to default values when you move a panel control that is associated with those parameters.  The big win here, if I can sort it out, is the envelope parameters.  The Fizmo envelopes are actually multi-segment envelopes, but only ADSR-type controls are provided on the panel, and when you move one of them, the "extra" segments get set to defaults.  (Sometimes.)  That's what the "sent initially" means; it sends those the first time the control is moved because that action resets them, and then they aren't sent again because you can't change them from the panel.  Here, for example, is a dump from MIDI Monitor from moving the Decay knob (the dump shown is for sound 4, oscillator 2), with the Amp envelope selected:


22:35:46.206 From MIDI Express XT #2 Port 8 Control 3 99 16
22:35:46.206 From MIDI Express XT #2 Port 8 Control 3 98 117
22:35:46.207 From MIDI Express XT #2 Port 8 Control 3 6 0
22:35:46.208 From MIDI Express XT #2 Port 8 Control 3 38 1
22:35:46.208 From MIDI Express XT #2 Port 8 Control 3 99 16
22:35:46.209 From MIDI Express XT #2 Port 8 Control 3 98 113
22:35:46.209 From MIDI Express XT #2 Port 8 Control 3 6 0
22:35:46.210 From MIDI Express XT #2 Port 8 Control 3 38 0
22:35:46.211 From MIDI Express XT #2 Port 8 Control 3 99 16
22:35:46.211 From MIDI Express XT #2 Port 8 Control 3 98 115
22:35:46.212 From MIDI Express XT #2 Port 8 Control 3 6 0
22:35:46.213 From MIDI Express XT #2 Port 8 Control 3 38 0
22:35:46.213 From MIDI Express XT #2 Port 8 Control 3 99 16
22:35:46.214 From MIDI Express XT #2 Port 8 Control 3 98 114
22:35:46.215 From MIDI Express XT #2 Port 8 Control 3 6 0
22:35:46.215 From MIDI Express XT #2 Port 8 Control 3 38 127
22:35:46.216 From MIDI Express XT #2 Port 8 Control 3 99 16
22:35:46.216 From MIDI Express XT #2 Port 8 Control 3 98 116
22:35:46.217 From MIDI Express XT #2 Port 8 Control 3 6 0
22:35:46.218 From MIDI Express XT #2 Port 8 Control 3 38 127
22:35:46.265 From MIDI Express XT #2 Port 8 Control 3 99 16
22:35:46.265 From MIDI Express XT #2 Port 8 Control 3 98 117
22:35:46.266 From MIDI Express XT #2 Port 8 Control 3 6 0
22:35:46.267 From MIDI Express XT #2 Port 8 Control 3 38 2
22:35:46.313 From MIDI Express XT #2 Port 8 Control 3 99 16
22:35:46.313 From MIDI Express XT #2 Port 8 Control 3 98 117
22:35:46.314 From MIDI Express XT #2 Port 8 Control 3 6 0
22:35:46.315 From MIDI Express XT #2 Port 8 Control 3 38 3
22:35:46.385 From MIDI Express XT #2 Port 8 Control 3 99 16
22:35:46.386 From MIDI Express XT #2 Port 8 Control 3 98 117
22:35:46.386 From MIDI Express XT #2 Port 8 Control 3 6 0
22:35:46.387 From MIDI Express XT #2 Port 8 Control 3 38 4

Note all the parameters that changed at first, and then that only parameter 117 continued to change as the knob kept moving.  Clearly, parameter 117 corresponds to the sustain knob on the panel.  The other parameters are associated with additional envelope segment levels and/or times, not accessible from the panel, that were set to default values by the movement of the sustain knob.  

I've only managed to sort out a few of these parameters so far.  There is one "extra" parameter associated with the Attack knob, in addition to the attack time itself.  When I started experimenting with this, I expected it to be an attack peak level setting, but it wasn't.  What it turned out to be instead is a time scaling parameter that makes the attack faster or slower, depending on the note-on velocity.  The resulting attack time is proportional to:

attack time * scaling parameter * (128 - velocity)

If this parameter is set to its max value (which appears to be 99), and attack time is at its max value, and a note is struck with minimum velocity, a veeeerrrrry long attack (about a minute) results.  With these same settings, a max-velocity note results in an attack time of about five seconds.  If the scaling parameter is set to 0, attack is instantaneous regardless of what the attack time is set to.  

For the pitch envelope, the attack time is parameter #79 and the scaling parameter is #80.  For the filter envelope, the corresponding parameters are #95 and 96, and for the amp envelope, #111 and 112.

Another finding: The Fizmo manual gives one the impression that velocity scaling on envelope levels is an on-off parameter, selected by the Velocity button.  Not so.  It's actually a variable parameter.  To set it, using the amp envelope as the example, you must send the desired value to both parameters #120 and 125.  The #120 corresponds to the value that is actually active; the #125 is a "holding" register.  When you turn off velocity response with the Velocity button, parameter #120 goes to zero.  When you turn it back on, it resets #120 to #125's value.  The interesting thing is that there does not appear to be any way to set parameter #125 to a default value from the panel.  Without editing software or some other way of sending NRPNs, you could get really frustrated if you were editing a patch with parameter #125 set to a minimal value; the Velocity button would appear to have no effect.  I've seen that some of the factory patches have different values of this parameter, so be careful about using a factory patch as a starting point for one of your own patches.  

I'm going to keep working on this, in part because Sounddiver for OSX is apparently a dead item now, and there doesn't seem to be any other way of computer editing a Fizmo on a Mac without resorting to OS9.  To send NRPN sequences, I'm using the event editor in Metro; to observe NRPNs coming back from the Fizmo, I'm using MIDI Monitor.