This was the original initial incarnation of the patch:

I continued working on it after that, so I don’t have that version anymore. The final version was later released here:

You can download the patch here.

The main patch is _dist_integral_test2a.pd. I’ve included all the relevant abstractions that I’ve made, but it also requires the creb, Cyclone, IEMlib and zexy libraries. I’ve only cleaned it up slightly and added a few annotations. I changed the reverb because the one I used originally needed to be manually adjusted to get the right sound. It’s still messy and confusing and some things are implemented in a less than ideal way. It’s fairly CPU intensive, so it may not run on anything less than a powerful laptop. Some of the abstractions are useful, but they’re not necessarily well documented, easy to use or free of bugs. They were mostly made for my personal use, and I can’t guarantee that they will be useful to anyone else. Ignore any “load_object: Symbol “lp_setup” not found” and “expr divide by zero” errors.


More PD algorithmic IDM, 2015-2017.

Spotify link

I signed up with DistroKid, so my music will be available on Spotify and various other stores and streaming services. I’m uploading now, but it will take some time for everything to appear.

If you want to buy a release I still recommend Bandcamp, because the sound quality and artwork will in some cases be better. I’m not doing this intentionally; it’s just that Bandcamp allows larger file uploads and additional artwork.

The DW-6000, DW-8000 and EX-8000 were Korg’s first synthesizers to use completely digital oscillators. The DWGS system generates 16 phase accumulator oscillators with oversampled waveform data to obtain reasonably good sound quality from simple hardware. Contrary to what’s often reported, the DVP-1, DSS-1 and DSM-1 have nothing to do with DWGS.

The DWGS oscillators are based around two simple custom gate arrays, MB62H133 and MB64H129.


The master clock is a 6.4 MHz VCO. This is modulated for pitch bend, vibrato and tuning. The variable clock means that pitch modulation doesn’t introduce aliasing, but it can only modulate all oscillators globally. The oscillator tuning parameters and the pitch envelope in the DW-8000 work instead by changing the oscillator’s frequency register. There’s a single time multiplexed 8 bit DAC (DAC08) that operates at 800 kHz (8 clocks per oscillator). The sample rate is 50 kHz (128 clocks per sample) and the interpolation is truncation.

MB62H133: This implements a 20 bit phase accumulator. Each oscillator has its own 20 bit frequency and phase registers, stored externally in 2 banks of 5 74S189 16 x 4 bit SRAM ICs (640 bits total). The MB62H133 IC contains the CPU interface that allows the oscillator frequencies to be written to the frequency registers, a 20 bit adder, and circuits to generate various timing signals like the control signals for the waveform DAC demultiplexer. It has 64 pins and contains about 800 gates.

MB64H129: This has 40 pins and about 400 gates. The input is the upper 12 bits of the oscillator phase data from the MB62H133, plus octave data to select the correct waveform multisample. The waveform may be up to 4096 samples per period, with no fractional bits for interpolation. The multisampled waveforms are different lengths for each octave, so the bits of the phase data are masked in order to play the correct address range. The output of this IC addresses the waveform ROM, and the waveform ROM output goes directly to the waveform DAC (DAC08). The MB64H129 can address a waveform ROM up to 64k x 8. The DW-8000 uses 128k x 8, so some external hardware is added to handle that.

Waveform multisample lengths:

  • octave 1: 2048 points, 320 harmonics
  • octave 2: 2048 points, 160 harmonics
  • octave 3: 1024 points, 80 harmonics
  • octave 4: 1024 points, 40 harmonics
  • octave 5: 512 points, 20 harmonics
  • octave 6: 512 points, 10 harmonics
  • octave 7: 512 points, 5 harmonics
  • octave 8: 512 points, 2 harmonics

Depending on the octave, the waveform data is oversampled by a factor of at least 3.2. Compared to critically sampled waveform data, this means that the high frequency images that result from truncation are considerably reduced and cause less audible aliasing, but this comes at the expense of a relatively large waveform ROM. The complete set of multisamples for each waveform is 8192 x 8, which is much larger than most similar synthesizers. The DWGS models are also somewhat dull sounding. At the low end of the range for each multisample, the harmonics only extend to about 10.5 kHz.

The waveform ROM stores the full waveform period. The waveforms are all odd functions (summations of sines). The ROM size could have been reduced by half with minimal modifications to the MB64H129 by resynthesizing the waveforms as even functions (summations of cosines) and inverting the phase accumulator data for the second half of the waveform period (this would add only a small number of gates to the MB64H129). It could also be done with odd functions by using a sign-magnitude DAC that additionally inverts the DAC’s output for the second half of the waveform period. If a sign-magnitude DAC isn’t used, a two’s complement negation before the DAC of the second half of the waveform period is also possible, but this would require more ICs.

As far as the digital oscillator portion goes, the DW-6000 and DW-8000 are very similar. The hardware supports 16 oscillators, and the DW-6000’s oscillator design carries over mostly unchanged to the DW-8000. However there are many other differences, including different PCBs, CPUs, features, waveforms, etc. The DW-6000 also has the ability to use external waveform ROMs, although this section of the PCB (marked “I/O Block”) is left unpopulated. It’s omitted from the DW-8000.

Both the DW-6000 and DW-8000 use software to generate all control voltages and modulation, but there are significant differences. The CV DAC in the DW-6000 is 8 bit (BA9201). The DW-8000 also uses an 8 bit DAC (HA17008), but adds a 4 bit resistor array DAC that feeds into the main DAC’s reference voltage pin. The 8 bit DAC’s output is multiplied by the 4 bit DAC’s output. This is not equivalent to a 12 bit linear DAC. I suspect that only one bit of the 4 bit DAC is high at a time. In this case, it’s a floating point DAC with an 8 bit mantissa and 4 step exponent, 11 bits total dynamic range. To make up for its CV DAC’s low resolution, DW-6000 also uses 3 BX7114 custom thick film hybrid ICs in the control voltage demultiplexing circuit. These are made by Rohm and are apparently marked BX7200 on the package. They act as sample and holds, and also smooth the VCF and VCA envelopes. The other control voltages, for the master clock frequency, oscillator levels, noise level and resonance, use a conventional sample and hold with simple first order smoothing. The BX7114 isn’t described at all in the service manual, but it seems to implement a more sophisticated kind of smoothing that eliminates audible stepping while still preserving fast transients. Wersi and PPG sometimes used RC smoothing circuits with added diodes so that fast transients can pass through unchanged. It’s possible that this works in a similar way. The BX7114 ICs have 10 pins and process 4 control voltages each. The DW-8000 uses conventional sample and holds for all control voltages, with simple first order smoothing on the filter cutoff and VCA control voltages only. The envelope shapes are also different, piecewise linear in the DW-6000 and exponential in the DW-8000.

This is my latest material. Equipment used: Ross 4×4 Series II (modified), found cassettes, Casio MT-40 (modified), Casio MT-70, Casio PT-30, Casio SK-8 (modified), Casio SK-1 (modified), Yamaha PSS-110, Yamaha PSS-380, Yamaha VSS-200 (modified), Korg KPR-77, Alesis Quadraverb (modified), Alesis Midiverb II (broken), Alesis Midiverb II (working), Alesis MEQ230, Ibanez SDR-1000, Yamaha REX50 (modified).

Spotify link

I’ll give details on some of the modifications soon.

I sampled the drum sounds from the Yamaha PS-3. Isolating all the sounds required some temporary modification, as one sound never plays by itself and it’s not possible to separate them after recording.

The drum sounds are generally described as analog, but they’re not really. They have analog envelopes and are processed by analog tone filters, but they use digital noise sources and low resolution sine waveforms stored as analog waveform memories (more on this later). This approach was used for drum sounds in many Electone models between about 1978 and 1984, several other keyboard models like the PS-20 and CP-11, and the MR-10 drum machine. The bass drum isn’t particularly good (it’s just a filtered pulse wave), but the other sounds have an unusual quality that I like a lot.

I’ve included several variations of the hihat/cymbal sound. It’s muted in some of the patterns, but the gate length depends on the tempo, so it’s not really possible to capture all variations through sampling. The noise sources are also free running, so samples aren’t sufficient to exactly recreate the sound of the original. I’m also including the raw noise and tone signals. These are recorded from the PS-3’s output rather than directly from the tone generator IC itself, so it still passes through the same analog filters.

I’m going to be publishing a lot of information about custom digital ICs used in music gear. This is a not very exciting first installment.

I’m grouping these together because Korg and Casio at one point used two ICs that are very similar, and neither category is very large by itself. The Yamaha RX8 is also covered.

I haven’t seen service manuals for the Korg MR-16, DDD-5 or PSS-60.

Casio drum ICs:

HD61701 (1984): This is used in the Casiotone 6000. The sounds are strange, seemingly formed from very short internally stored samples (often looped) and periodic waveforms. It has onboard amplitude scaling and DACs that seem to be very low resolution and noisy. The complete circuit is fairly elaborate with about 7 output channels, several different tone filters (one of these is switchable) and panning to stereo outputs. Clock is 4.9468 MHz. 54 pins.

µPD934G (1985): This is used in the RZ-1, CZ-230S, MT-500 and others. Each IC generates 4 monophonic channels, converted separately, with up to 3 sounds hard assigned to each channel. 64 pins. There are 2 of these in the RZ-1, and they operate independently, not sharing the waveform memory or DAC. The first, designated as µPD934G(B), plays ROM samples only and the second, µPD934G(C), plays both ROM and user samples. Between both ICs, there are 8 channels and 16 available sounds. In some other models a single IC is used to produce up to 12 sounds. These seem to have the same sample rate and waveform ROM size as the RZ-1, but use shorter samples. Unusually, there’s a slightly different master clock frequency and sample rate for each IC in the RZ-1. The µPD934G(B) is clocked at 1.28 MHz (sample rate is 20 kHz, 64 clocks per sample, 16 clocks per channel). The µPD934G(C) is clocked at 1.333 MHz and has a 20.833 kHz sample rate. I’m not sure why it’s done this way. Each IC can address waveform memory up to 128k x 9 bits. The RZ-1 has a 32k x 8 waveform ROM for each IC and an additional 16k x 8 SRAM for the µPD934G(C). The waveform data returns to the IC and is output by a 10 bit linear thin film resistor array DAC. I think it uses a 10 bit DAC to accommodate the extra dynamic range required by the accent (this may just be a binary shift). Other than the accent, the ICs don’t seem to be able to transpose, scale, envelope, reverse, loop or process the sounds in any way. The 3 toms and the open and closed hihat sounds are all different samples rather than a single sample that’s differently pitched or enveloped. The user samples in the RZ-1 are recorded by the 8 bit ADC built into the CPU (µPD7811). The sample input is connected to all 8 of the CPU’s analog input channels in parallel, presumably to reduce noise. The samples seem to be recorded at 20.833 kHz for a total sample time of 0.786 seconds. The metronome is actually more or less an analog drum sound based around a phase shift oscillator. Its decay time can be adjusted with a trimpot. It’s sometimes reported that the user samples in the RZ-1 are less useful than they could be due to latency compared to the other drum sounds (I haven’t verified this). This isn’t a hardware limitation, since the same ICs are used to play back both the ROM and user samples. It’s probably due to the way the sampling process is triggered, i.e. deliberate pre-sampling that records before the trigger threshold is crossed. The problem, then, is really that the samples can’t be trimmed after they’re recorded.

MSM6294-xx (1987): This is a 4 channel drum IC, simpler than the µPD934G. 28 pins. It has an onboard 8 bit DAC and internal 16k x 8 mask programmed waveform ROM with up to 8 sounds (1024 ms total sample time, the ROM variant is denoted by the suffix). The clock is 256 kHz and the sample rate is 16 kHz (16 clocks per sample, 4 clocks per channel). The DAC output is connected to the mix out pin. All 4 channels are time multiplexed. This may be used as is, or buffered and sent back to the mix in pin. The channels are demultiplexed and sent to 4 individual output pins. All the Casio models I’ve seen just use the mix out. Typically the samples are similar to the RZ-1 but lower quality. I think it’s capable of accented sounds, but other than that it doesn’t alter the sounds in any way.

I’ve seen the following variants:

  • MSM6294-02, used in the SK-8, SK-8A, MT-520
  • MSM6294-03, MSM6294-04, used in the HT-700, HT-3000. The clock is adjustable by a trimpot.
  • MSM6294-05, used in the SK-5
  • MSM6294-06, used in the DG-10, DG-20
  • MSM6294-07, MSM6294-08, MSM6294-09, used in the HT-6000. The MSM6294-09 generates only the timpani and orchestra hit sounds.

Korg drum ICs:

The MSM6235-xx (1983): This is used in the Korg PSS-50, DDM-110 and DDM-220. It may also be used in the Korg MR-16 and possibly the PSS-60. The pinout and functionality appear to be identical to the MSM6294-xx as far as I can tell. In these machines the clock is 250 kHz and the sample rate is 15.625 kHz. There’s a block diagram in the DDM-110/220 service manual which gives some details:

MSM6235It seems that the internal sample ROM is divided into 16 1k x 8 blocks, and that each sample can start and end on any of these block boundaries. There also seems to be an attenuation stage after the DAC that may implement accents.

The drum samples in the Korg models are completely different from those used in Casio’s ICs, and the output is considerably less harsh sounding since they’re demultiplexed into different channels (with a zero order hold and the corresponding high frequency droop), rather than still time multiplexed on a single output with a low sample rate.

I’ve identified the following variants of this IC:

  • MSM6235-01, used in the Korg PSS-50
  • MSM6235-02, MSM6235-03, used in the Korg DDM-110
  • MSM6235-04, MSM6235-05, used in the Korg DDM-220

MB661107 (1986): This is used in the Korg DDD-1, and probably also the DDD-5. It’s quite simple, but cleverly designed and fairly flexible. It can transpose samples in a limited way, but not enough to be considered a general purpose sample playback engine. 80 pins. It’s 13 note polyphonic (12 voices plus a metronome) and supports up to 16 output channels. In the DDD-1 these are used for both individual outputs and fixed stereo pan positions. The master clock is 8 MHz. The sample rate is 25.641 kHz (312 clocks per sample, 24 clocks per voice).

The IC can address a waveform ROM up to 512k x 8. The waveform ROM in the DDD-1 is 256k x 8, and the ROM cards are 32k x 8. Up to 4 can be used simultaneously. Sounds can be transposed over a one octave range. I don’t know what kind of interpolation is used, but very likely it’s just truncation. It’s possible that the hardware supports a wider transposition range, but this was deliberately limited because it would quickly start to sound extremely dirty, similar to the Emu SP-1200.

Amplitude scaling uses an external multiplying DAC. 10 bits of volume data are converted with a thin film resistor array DAC, and this controls the reference voltage to an 8 bit multiplying DAC (µPC624C). This seems to be used both to control the level of each sound and to apply the envelope. This approach is simple and works pretty well. The decay time and level for each sound can be programmed (unlike the Roland TR-707 and other things that use fixed analog envelopes), and it doesn’t require a digital multiplier or high resolution DAC. This can also be done inside the IC itself (the Ensoniq 5503DOC does this). Onboard DACs require fewer pins, but the DAC linearity will generally be worse. The downside to this approach to amplitude scaling is that the digitally generated envelopes can introduce zipper noise, since they’re time multiplexed and thus can’t be smoothed with analog circuits.

Any voice can be sent to any output channel. Each voice gets its own digital to analog conversion, but the demultiplexer control signals that select the output channel don’t have a fixed relationship to the voice counter. The trick here is that the output channels don’t have a sample and hold. So each output is polyphonic, and the voices are mixed by time multiplexing. The sounds are thus scaled, routed and mixed in a very cheap and simple way, and the editing and routing capabilities surprisingly flexible.

MB87425APF SID2/SI System LSI (1988): This is used in the Korg S3, and also the Yamaha RX8. 120 pins. It’s branded by Korg as the “Sonic Integrity (SI) system”, whatever that means. It’s a 16 bit sample playback IC without filters. The S3 is 12 note polyphonic, with each voice consisting of two components. This seems to suggest that the IC is 24 note polyphonic. 512 clocks per sample. The S3’s sample rate is 37.109375 kHz (19 MHz clock) and the RX8’s sample rate is 44.1 kHz (22.5792 MHz clock). Interpolation is probably linear, although I haven’t confirmed it. The IC can address a waveform ROM up to 4M x 8 (used as 2M x 16). The S3’s internal waveform ROM is 1M x 8 (512k x 16), and there are two ROM card slots up to 1M x 8 each. The cards don’t appear to be compatible with the M1 or other models. The waveform ROM in the RX8 is 1M x 8. The sounds here are basically similar to the other models in the RX series, but considerably higher quality. These may be the highest fidelity versions of this particular set of sounds.

The S3 has 8 stage amplitude envelopes and simple single stage pitch envelopes. Samples can be tuned over a range of +/- 2 octaves. The RX8 is considerably simpler, supporting only panning and tuning over a range of +/- 1 octave, although it does have the ability to play two detuned copies of the same sound.

The IC supports either 16 bit parallel or serial output. The S3 also contains an MB87405PF MDE effect processor (this is clocked at 38 MHz, has 64k x 20 DRAM and provides two different effect blocks) and two other gate arrays. The MB623139 gate array (80 pins) handles SMPTE, scans keys, drives LEDs, etc. The MB620157PF (64 pins) converts the parallel outputs from the MB87425APF and MB87405PF to serial data, and sends this to the 3 16 bit DACs (µPD6376, 6 output channels total). The RX8 contains no effect processor or other sound processing ICs. It seems to send 16 bit serial data directly to the DAC (PCM56 or AD1856). There are 4 outputs total.