Archive for June, 2010

Pokey Pitch Changes

Sunday, June 13th, 2010

I never really noticed this until I started getting into really low frequencies on the Pokey, but it only actually changes the output pitch on transitions of the current square wave signal. The chip itself can read hundreds of thousands of pitch settings per second, but they are only applied at the next transition of the current square wave. For example, going from a low pitch square wave to a high pitch square wave looks something like this:

Pitch It Up

The first line is the current square wave output, and what it would do if it ran forever. The second line is an instant pitch change, and the third line is along the lines of what the Pokey actually does. Note that the new pitch data in that example was sent soon before a transition in the low frequency. The worst case is when the new data gets written right *after* a transition, and doesn’t kick in for half a cycle of the low frequency wave:

Pitch It Up... again

This implies that the clock dividers driving the logic only update their divide value when they output a pulse. Pokey square waves come from pulsing a T flip-flop, so there are two pulses per output cycle. That means if the current square wave is 1 Hz, the next pitch written won’t happen right away. It can take up to 500 milliseconds to change.

This all came up because of a new feature in the Pokey module design. A Pokey square wave in 16-bit mode with the usual pitch control ranges from about 13.5 Hz to hundreds of kHz. However, the Pokey itself has a bit that can be flipped to drop the range about 4.8 octaves and go down to 0.5 Hz! Initially I planned to have switches on the back of the module for this because I ran out of space on the front. More recently I’ve updated the pitch handling routines to automatically flip that bit as necessary to make the desired pitch. This initially created a slight problem, though, because flipping that bit takes effect almost instantly and drops the current pitch by 4.8 octaves. To go from 14 Hz to 13 Hz, that bit has to get flipped at some point. If the current pitch data is for 14 Hz and the bit gets flipped, the result ends up somewhere inside a 0.5 Hz square. Then, even if the pitch data for 13 Hz is written instantly, it may not take effect until a full second (half of a 0.5 Hz cycle) has passed! In other words, there may be a full second of silence inserted when going from 14 Hz to 13 Hz.

Eventually I came up with a workaround that reliably shortens the silence to about 43 milliseconds when flipping the aforementioned octave-dropping bit. This still creates some audible artifacts when switching between frequencies just above and just below 13.5 Hz, but it lets the pitch CV and knobs control a much greater range without adding any switches.

I made some recording of the worst case switching artifacts. Going from a high note (hundreds of Hz) to a note below 13.5 Hz is not really noticeable. It’s the low frequencies where it becomes clear because of missed/extra pulses when crossing the threshold.

Here’s an example playing two pitches an octave apart that straddle the crossover point:

Click here for audio clip one

This next example is some sweeps that go through the crossover point:

Click here for audio clip two

The more I use the module with this change, the more I like it. It only applies to a channel in 16-bit pitch mode, but there is already a switch on the front panel for that.

More Pokey Module Audio

Sunday, June 6th, 2010

There is now one completely-built Pokey module prototype (though without panel artwork). The FPGA code is around 90% done. It still needs some minor usability tweaks and top secret configuration features.

More importantly, I made a few audio clips to show some of the current features.

This first clip plays a major scale on the 6 different wave settings. I’m running a Kenton Pro Solo into the pitch CV input on channel 1. A Doepfer A-141 VCADSR is going into the channel 1 volume CV input. The different types of noise have different amounts of pitchability. The notes that sound like they’re missing in a couple spots are a side-effect of how the Atari chip generates noise. There’s a little more info about why it happens in this post.

Click here for clip one

The second clip runs a Blacet Micro LFO into the CV wave input for channel 1. It’s set to a sawtooth wave to sweep through the different noise types. I’m tweaking two knobs: LFO rate and Atari channel 1 pitch. I also change the pitch resolution of the channel from 8-bit to 16-bit about halfway through, making the trip back down sound less steppy. Each channel has a switch on the front panel to jump between pitch resolutions.

Click here for clip two

The previous two clips have both been one voice by itself. This third clip starts as one voice, but then adds in the second voice slightly de-tuned. I flip the “highpass” switch that gives a nice octave effect, and then over-drive the channels via their volume knobs. The louder one channel is, the more it will modulate the other. The very end is back to one channel.

Click here for clip three

This last clip is more experimental. It combines the Aux input with low frequency noise. The signal path is a Blacet Micro LFO triangle wave into the Pokey synth AUX input. I’m also running one of the Atari channels set to noise at a sub-audio frequency. The low frequency noise creates rhythmic patterns that vary with pitch and modulate the volume of the AUX input. When the rhythm is changing it’s because I’m tweaking the sub-audio frequency and new patterns form automatically. The changes in pitch and timbre are because I’m also tweaking the Sample Rate knob for the aux input.

Click here for clip four

Keep in mind that even though the channels modulate each other to varying amounts, there are three independent channels on this thing mixed to a single output.
Channel 1: Atari oscillator #1
Channel 2: Atari oscillator #2
Channel 3: Aux input

The two oscillator channels are identical in terms of features and controls. The Aux input has a gain/attenuation control and controllable sample rate.