-PLANNING/BREADBOARD STAGE:
VOICING
I was hopeful that the circuit would be a good candidate for circuit bending, since there are so many big chips, and lots of analog circuitry. Unfortunately, there was really just not much that I could find that was useful. I tried bypassing the data lines to the ROM chip to try and get some kind of access to the piano voice sample using all manner of counter/dividers, pulse-delays, and shift registers, but it seems that the way that the piano-sound data is parsed with the program memory is too closely multiplexed. At least that is what I concluded from my repeated failed attempts to do anything but crash the whole system again and again. I still think it would be possible to bypass the piano-sound data somehow, but seeing as how the sample-depth is only 8-bit resolution, I can assume that there would be a very limited amount of sound variations, and would probably not justify the hardware needed to achieve them.
 |
| Useless latch and ROM area |
Instead, I focused on the discrete ADC circuit that uses a 74HC374 8-bit latch and R/2R resistor network to convert the 8 multi-pulses from the main chip to a single analog signal to reconstruct the piano sound. The first thing I did was rearrange the inputs of the R/2R network with the outputs of the 8-bit latch chip in different combinations. This tended to create a lot of really nasty high-frequency static noise with more or less harmonic undertones depending on the combination. I found that P0.6 and P.07 were the most useful, as they had lower intervals, making them the most harmonic sounding of the 8 digital outputs.
 |
| D6 & D7 divider circuit |
I experimented with counter/divider chips, PWM and pulse-delay circuits, and re-introduced the modulated signals to the R/2R network in different combinations. The counter/divider chips worked best at creating wild glitchy timbres. The summed audio signal levels from the resistor network were all over the place, and the original 'clean' piano-voice was lost under all the distortion and the over-driven anti-aliasing filter. Instead, I decided to just leave the original piano voice(latch and DAC) alone, and add separate latches for P0.6 and P0.7 to be fed to their own respective counter/divider chips to be used as an alternate 'Noise' voice. For the counter/divider chips, I used the CD4017. To change the output divisions, I connected the 8 output pins and the reset pin from the CD4017 to a CD4051 multiplexer chip. Then I programmed an ATTINY microcontroller to act as a dual 3-bit ADC so that the 8 sub-divisions of the CD4017 can be selected as a reset point of the CD4017 frequency divider with one analog voltage. I also added a filter switch on the clock inputs of the CD4017 chips so that higher frequencies can be filtered out if so desired. This helps strengthen the harmonics of the static noise, and tends to be better for quick note changes and chords. The 'Raw' sound of the noise-voice is better for slow lead-type playing. I decided to add an optional XOR'd signal from P0.6 and P0.7 as well. Both bits are in sync to the same clock, so there is not any FM ringing effect, but it does add a lot more variation to the voices.
 |
| Piano and Noise voice signal path |
The bit-clock input signals to the latch chips of both the piano voice and the noise voice can be divided, too. I only had success at dividing the clock signals by 1, 2, 4, and 8. All other divisions between 1-8 would only output non-piano voice data that just came out as a high pitched tone or no sound at all. Any divisions beyond 8 were so slow, it just sounded like random clicks. I added more CD4051 multiplexers and ATTINY 2-bit ADC's to be able to select between the 4 divisions with analog CV inputs.
 |
| ATTINY 2-bit & dual 3-bit ADC |
Adding the clock divider to the piano-voice latch chip causes the piano sound to drop in resolution, giving the effect of an octave switch, but with a kind of ring-mod bell tone to the voice. It sounds pretty cool, but it tends to overdrive the anti-aliasing filter at lower frequencies. To remedy this, I simply added clipping diodes(1N4148) to the output and the VREF. The diodes cause distortion, but by the time the signal is clipping, the piano-voice is already pretty distorted sounding, so it is unnoticeable. I built a simple 12db resonant HP/LP filter for the noise-voice, as well as simple VCA's for both piano and noise voices from LM13700 OTA chips. The two voices can be summed together with independent volume controls, and can also be independently sent to a PT2399 echo circuit with individual input switches. The output from the PT2399 Echo circuit is then summed with the dry signals, and output to the main volume control of the output.
 |
| HP/LP VCF |
The PT2399 Echo circuit is unique. I wanted to have as close to infinite regeneration as possible with minimal breakup. In the past, I have used Vactrols and other means of creating simple auto-leveling on the feedback path of the echo circuit with varying success. Because the signal coming from the keyboard was so noisy, minimal breakup took more than a simple Vactrol attenuator circuit. Instead I went with another LM13700 VCA and a rectifier/follower circuit to limit the VCA when the feedback levels reach a certain point. The breakup is not as gradual as I would have liked, but it is to be expected with the noisy signal quality, and being able to modulate the feedback(Regen) from other analog voltage sources is a bonus. I decided to add another VCA to the Echo Volume for that reason, and it is really useful to be able to modulate all three echo parameters with CV inputs. The Echo Rate parameter CV input is just a through-hole NPN transistor connected in reverse to the VCO pin of the PT2399, and ground. I still do not fully understand why this works–or why it has to be a through-hole transistor to work–but it is the most effective way that I have found for modulating the PT2399 Echo Rate with a CV input so far...
 |
| PT2399 echo with ALC |
PITCH AND POWER
I replaced the 12Mhz resonator with a high speed VCO using the trusty 74HC4046A chip. These chips do not have quite as much range as the well known LTC1799, but they are much more versatile, and cost much less. The keyboard can be overclocked a bit, but tends to crash easily if pitched too high. I kept the overall pitch range somewhere between 6 semitones below C3, and an octave above. This depends a lot on what is modulating the pitch, but there is a 'Fine' pitch control for tuning if needed.
 |
| HC4046A VCO |
Most of the power supply circuitry was useless, and I had no intention of keeping the auto-shutoff function, so I redesigned the power supply to be more straight forward by selecting a better regulator, and replacing the reset circuit with an 'Initial-Clear' circuit to reset the chip every time it powers on. The only issue with the reset is that it toggles the standby mode, so if the power to the keyboard is turned off, and then on again suddenly before all of the bypass-capacitors have had time to drain, when the power is turned back on, the chip will be in standby until the reset pin is re-toggled. This can be remedied by simply turning the power off and on again, or by leaving the power off for a few seconds before turning back on.
To disable the auto-shutoff, I built a simple oscillator that sends a short pulse approximately every 2.5 minutes to the 'Correct' switch of the keyboard via NPN transistor. The 'Correct' button makes no sound and doesn't seem to interfere with the piano keys since the pulse is so short, and the notes are polyphonic. When the switch is pressed, the auto-shutoff countdown is reset, so there is no risk of the keyboard making the beeping sound or going into standby when no keys are pressed. This of course interferes with the 'Record' and 'Playback' functionality, but I have a different plan in mind for a more in depth sequencer of my own design. I also built a filtered buffer to convert the data-signal coming from the D6 latch to be used as a gate signal when a key is pressed, so I used a dual Schmitt inverter chip for both the gate-buffer, and the battery-alarm disable circuit.
 |
| Filtered buffer & APO-reset timer |
SEQUENCER
As much as I really liked the idea of using the built in step sequencer of the keyboard, I really wanted to be able to disable the auto-shutoff, and to do that I had to sacrifice the sequencer due to the nature of my auto-shutoff disable circuit. Having up to 40 steps would have been nice, but having an analog CV step sequencer would allow for modulating other parameters as well as notes, albeit only 8 steps long.
 |
| Sequencer signal path(single) |
I went with a similar style of dual-sequencer that I have used in past designs like the 'PT-100', and the 'TRIP'. There are essentially two 8-step sequencers that share 8 analog inputs from potentiometers. The step-values of each sequencer are the same, but the step-output, clock-input, and direction of the sequencers are independent of each other.
To advance the sequencers, there is an internal clock oscillator that can be inverted or divided before being sent to either sequencer's clock-inputs. I used 74HC393 binary-counter chips to get clokck divisions from the main clock oscillator, and inverting buffers to get an inverted clock signal so that there are a variety of clock-inputs to choose from. Each sequencer has a four-position switch that selects +1(normal clock), -1(inverted clock, /2(divided by 2), and /4(divided by 4).
Each sequencer also has an independent direction switch, as well as an optional direction-switch clock oscillator that periodically changes the direction of the sequencer from UP to DOWN depending on the rate set with a potentiometer(Reverse Rate). This gives the effect of having longer sequences, since the pattern bounces around from one end of the sequence to the other somewhat randomly, but also at regular intervals with the sequencer clock. The effect is very mesmerizing when the two sequencers are running together, but the melody is constantly changing!
 |
| 1/2 sequencer(with errors) |
In order to use the analog values from the sequencers to trigger notes from the keyboard, I designed a special type of ADC multiplexer matrix using CD4094, and CD4051 chips and an ATTINY microcontroller to be able to select any of the 32 notes with an analog voltages. I made two of them so that two notes could be selected simultaneously. I also wanted to be able to control the gate time of the key-press with each step, since the piano-voice has varying sustain depending on how long the keys are pressed(another understated feature of the Fisher Price 3810). In retrospect, this would have been easier to do in the code of the microcontroller, but I decided to go the analog route, and designed a pulse-delay circuit that works–but just barely...
 |
| Key-hold matrix circuit |
To make the sequencer's step values easier to adjust, I added a set of 8 capacitive touch-controls that will interrupt the sequence and hold the selected step of the corresponding touch-control input for as long as it is held(<100 sec. timeout). The step value(potentiometer) can be adjusted, and both sequencers will advance from that step when all touch-controls are released. If either of the sequencers are not in 'RUN' mode, the last pressed touch-input will correspond to the last held sequencer step indefinitely. This feature doubles as a preset-select bank for whatever parameter the sequencers are set to modulate. When the sequencers are not in 'RUN' mode, but they are still set to trigger notes, the touch-inputs can act as mini keyboard of 8 selectable notes. I have a standard capacitive touch circuit board that I have used in the past for the NT04, NTV, and the TRIP. It uses eight TTP223 capacitive-touch chips, and a CD4532 priority encoder to convert the 8 inputs to a 3-bit word, and a gate signal. This is then fed to three transparent latches, so that the 3-bit word is held to its last value when there is no input.
 |
| Capacitive-touch module. |
To indicate the step position of the sequencers, and other things like clock and gate timing, I used bi-color LEDs to save space. They are a little more expensive than single LEDs, but they save space, and look pretty cool! I used additional CD4051 chips to drive the LEDs. I have a ton of these multiplexer chips, and I think I ended up using 12!
JOYSTICK AND ENVELOPE GENERATORS
In addition to the sequencers, I thought it would be useful to add some envelope generators to modulate the voices' VCA's, and other parameters. LFO's would be nice, but there will be limited space on the interface, and I prefer LFO's that can be gated by key-press so, I decided to go with simple looping Attack/Decay envelope generators. I have used this EG design in a lot of my toys because it is effective and doesn't take up too much space. It would be nice to be able to control looping speed without affecting the Attack/Decay ratio, but the trade-off is that the EG's can be used as both LFO's and EG', and they're gated.
 |
| Envelope Generator(single) |
The envelope is derived from a D flip-flop(CD4013) that resets when the envelope peaks, then discharges the timing-capacitor. It can be switched to continuously reset itself as long as there is a key-on gate signal incoming. I created two identical EG's that can be switched on to be used for the Piano and Noise voices signals' VCA's in addition to being used as a modulation source for other parameters. The depth of the EG's can be controlled with their own 'Depth' knob, or they can be switched to be controlled by the a 'Joystick' CV input. The 'Joystick' CV is sent to a VCA that is biased to VCC/2, so the EG depth flatlines at mid-depth of the parameter that it is modulating–as opposed to when using the 'Depth' knob, the EG signals flatline at the bottom of the parameter's range.
The Joystick is something that I just had to add, since it is such a convenient and expressive way to modulate parameters freely. I ordered these small industrial 2-axis joysticks from Aliexpress a while ago, and I am very happy with their quality, considering they only cost about $10. I used one in the 'PT100' super-mod, and found that I liked the tactile response better with the internal springs removed. The rubber boot does a good job of returning the stick to center on its own, albeit a little skewed to either direction. I prefer the looser feel, though. It is also possible to find different knobs to put on them, which is nice because the one that comes stock is made of pretty cheap and ugly plastic.
I decided to have several separate outputs coming from the joystick's X and Y axis that can be depth-adjusted for different parameter modulation. This way, the two axes can be controlling several parameters at once, but with variable intensity. I buffered the X and Y CV outputs to be used directly for the D6 and D7 noise-voices' divider CV inputs, as well as to the EG's 'Depth' control CV inputs. I figured that of all of the CV parameters, these four would not need the joystick CV range adjusted.
 |
| Joystick attenu-verters |
Then I created 3 attenu-verter CV buffers; one for the Y axis, and two for the X axis. The three outputs can then be used for other parameters, independent of each other. X-2 can be selected to modulate 'Coarse-Pitch', 'Echo-Regen', and/or 'Piano-Bit Clock'. Y-2 can be selected to modulate 'Echo-Rate', 'Noise-cutoff', and/or 'Noise-Bit Clock'. X-3 can be used to modulate 'Echo-Volume' and/or 'Clock-Rate' of the internal clock oscillator for the sequencers. The atenu-verter depth knobs determine the depth of each CV source, and the polarity of the CV. The CV sources depth flatlines at mid-position of the parameters' range when the depth knobs are set to the center position(zero-depth). Adjusting the CV depth of the individual joystick channels makes it possible for one parameter to be modulated dramatically, while on another, the range can be set to a narrower range and offset slightly by the parameter's native control knob.
Developing the circuits I wanted, and getting them all to work took about two weeks altogether. I made sure to leave room for changes, just in case there are more problems that need solving, or new ideas to try.
 |
| Final plan for the complete signal path |
Part 3 coming soon...