
Casio CT and MT deep dive
The venerable D938GD based keyboards from Casio, they are a lot more fun than they let on.
From the outside they look like simple ROMplers, it even says "PCM" on the front!
Looks are deceiving however as internally there's a rather complex softsynth that can use samples, FM and even an early Phase Distortion called "Triangle Modulation". Yeah... Casio CZ style synthesis perhaps?
And it has envelopes that are defined by points, rather than ADSR, which allows for insanely complex envelopes.
So lets reverse-engineer the sound engine and make the presets customizable, shall we?
THIS PAGE IS A WORK IN PROGRESS!
The Hidden Synth
The CT and MT series of keyboards were (one of) the first fully digital keyboards, marketed as "Tone Bank". Instead of trying to stuff hundreds of presets onto ROM these new keyboards featured only 10 to 30 presets but with the ability to layer two of them.
This lead to some marketing blurbs as "200 tones!" etc, because they tended to advertise the preset combinations as unique presets rather than just layers. A bit of false advertising, but you gotta make the line go up I guess.
Regardless though, these are one of the best sounding "toy" keyboards, with very dynamic and rich stereo sounds. The samples seem high quality with very little aliasing noise. Some samples are surprisingly realistic and detailed, such as the piano and cymbals. Other presets sound a lot like synthesis, rather than samples.
Lets unravel the reasons for these great sounds.
The PCM samples:
Both the CT as MT series (mostly) use the D938GD sound chip, along with one or two external 16-bit ROMs and a 16-bit stereo DAC. You can see the ROM and DAC of my CT-380 in the photo.
It uses uncompressed 16-bit samples, with a 21276Hz sample rate. The DAC is an LC7880, which is a 16-bit multi-stage DAC that employs various techniques to generate two analog signals. This DAC can do samplerates up to 88.2KHz, but I'm not sure what actual rate it's running at.
The samples can come in two main forms:
- Full sample, such as the piano, bass and drums.
- Short waveform sample, such as the vibraphone.
Samples are always linear interpolated by the sound engine. It seems a full 16-bit word is used for the interpolation as the patents describe the addressing consisting of a 16-bit integer and 16-bit decimal. The integer being the current ROM address and the decimal being the interpolation to the next ROM address.
The samples are pretty standard playback most of the time, but Casio did create a system that scans through the sample in a sort of "wiggle" pattern. This is described in patent "US4442745 - Long duration aperiodic musical waveform generator".
You can see a drawing from that patent to the left, with an example waveform and example scanning pattern. Using this technique only the attack and sustain (and optionally release) portions of a sound need to be sampled & combined into one very short sample.
Despite the sample being so short it can be extended indefinitely and without any obvious repeats. A great example of this is the cymbal and vibraphone sounds which can last a very long time without sounding unnatural. It does seem this system is not always employed, the piano for example seems to be more standard sample playback without any looping or wiggles.
It's all pretty sweet, but it's also all pretty semi-standard stuff for a ROMpler.
For some reason Casio decided to pull out all the stops and go a lot further with more synthesis techniques and truly crazy envelopes.
FM and TM synthesis:
The sound chip also has build in Frequency Modulation and... Triangle Modulation. Both use the same operator-based structure and seem to be primarily 2-operator based. Though more operators are possible as described in the patents.
To the left you can see the standard setup for the FM or TM synthesis.
We got OP2 as a modulator with feedback and OP1 as a carrier that is modulated by OP2.
For the FM synthesis it's very standard, though what's interesting is that the operator waveform used is stored in external ROM, thus any single-cycle waveform is possible. Since this waveform is not interpolated there are 3 versions of it on the ROM at different pitches. This way you don't get horrible aliasing in the higher notes.
Aside from the sine wave I also see many other of these waveforms on the ROM, but more on that later.
The Triangle Modulation is an interesting technique, that reminds me a lot of the Phase Distortion employed by Casio's CZ synthesizers.
It's (probably) not the same, perhaps a predecessor, but still very interesting.
TODO
When modulation depth is zero a sine wave is generated. As the depth increases the waveform becomes more distorted and more harmonics are generated. This generates more harmonics than FM does.
The envelopes:
TODO: arbitrary multi-point interpolated envelopes...
The ROM Contents
TODO: this may take a while...
262144 words of 16-bits.
ROM contains:
- boot config values
- preset param values
- PCM samples (single-cycle waveforms, short wave samples or full samples)
- demo song data
- rhythm patterns data
Preset param values:
- type: PCM, DPCM, TM, FM (multiple can be selected so prolly bitmasked)
- interpolation pitch data for all keys? May be internal ROM tho...
- start address (2 words)
- end address (2 words)
- loop address (2 words)
- envelope targets for env delta-Y
Making the Presets Programmable
TODO: this may take a while...