Tuesday, December 3, 2013

New Blog, First Post!

A good friend of mine suggested i start writing about the stuff i make. So, here it is. A list of projects I currently have going on:

1) Casio SK1 circuit bend
I only very recently acquired this item at a thrift store, it wasn't working. The feature that immediately drew me to it was the fact that it could sample audio with its internal microphone and play it back at different pitches. It came non-functional. When batteries were inserted, the pilot LED lit up regardless of the on-switch being off, and none of the buttons did anything. Luckily, a service manual exists for it on the internet (multiple versions exist, i had to look around for a high res one). Using the service manual's circuit diagram and reference voltages, i determined that the VL1 line was too high. Upon grounding that line with an alligator clip, the SK1 started to produce sound, so I tracked down the problem to the NPN transistor T6, replaced it, and voila, SK1 working!
Casio SK1 service manual found at: http://inuyasha44320.webs.com/thecasiosk1.htm
 A run-down of how the SK1 works: http://casperelectronics.com/finished-pieces/casper-sk-1/sk1-bending/

With my now working SK1, I added the patch bay mod (e.g. a la http://www.circuitbenders.co.uk/synthmod/SK1.html). The term "patch bay mod" refers to a class of mods whereby wires are connected from bend points on the PCB directly to an array of ports for plugs on the outside of the instrument. Normally, bends are identified on the PCB and connected directly to dedicated switches and knobs, but a patch bay allows on-the-fly reconfiguration of bends. With nothing in the patch bay, the instrument behaves as if it were unmodded. My patch bay is a female COM1 port, with each pin soldered to one pin on the RAM chip. The SK1 uses 3 memory chips (the three gray IC blocks in the picture) and multiplexes them with a chip select signal from the CPU. With the 25 pins on the COM1 port, 12 are from the address bus, 8 are from the data bus, one is the chip enable (CE), one is the output enable (OE), one is VCC (5V), and the metal of the port itself is Ground (0V). Shorting any pin to the metal casing (ground) activates the pin, while shorting pins to the VCC often glitches the entire SK1. The patch bay successfully produces a selection of very interesting sounds, and I have yet to explore all its possibilities. Looks neat too! The screw pins were put in for aesthetics. The hole in the plastic (and what thick, sturdy plastic it was) was made with an electric drill, but you may get better results with a dremel or a router.

 Next, I tried taking the SK1 to a jam session at my friend's place, and found it quite annoying that while sampling from a line in source, it was impossible to hear the line in signal to capture the correct portion of sound. At the same time, I read about the SK1 filter bypass mod (http://experimentalistsanonymous.com/diy/Schematics/Circuit%20Bending%20and%20Modifications/). I had a bunch of SPCO switches (single pole, centre off, refer to wikipedia: http://en.wikipedia.org/wiki/Switch), so I thought, why not have one switch position setting as a filter bypass, one switch position as a line in pass-through, and the middle position as the original? That's what I did. For the line-in pass-through, I used the lower voltage side of R130 (refer to the service manual, this is just outside of the mic amp circuit but before the voltage step-up circuit for the analogue-digital converter) with a 1 uF capacitor (to block current flow) and a 112 Ohm resistor (to reduce the volume). Note that I use a lot of spare parts i de-solder from scrap electronics i have, so the numbers don't really matter. The signal is injected directly into the mixer circuit, same as the filter-bypass mod. I kept the filter intact, so my SK1 actually produces both the filtered signal as well as the unfiltered signal when i have the switch on filter-bypass mode. In retrospect, I shouldn't have bothered because the unfiltered signal sounds WAY nicer imo.
Future plans for the Casio SK1: 1) a 555-timer trigger for the memory auto-play button, with timing controlled by a potentiometer, to allow looping of patterns in the memory (super cool!!!). I've already made calculations for this circuit, will post details in a future post. 2) a bank of 5 switches (or audio jacks?) to control each of the SK1's voices before the mixer (seen at http://www.circuitbenders.co.uk/synthmod/SK1.html). 3) a pitch mod to extend the frequency range of the SK1 by replacing the timing crystal with a 555-timer circuit. However my SK1 is already starting to show signs of structural fatigue from all the opening up and manipulating I've been doing to it, so I might just add just the looper trigger and call it a day.
 2) Raspberry Pi Looper / drum machine
This all started when I was visiting some friends who played with a lot of guitars. Somebody showed me how a looper pedal worked, and I thought, Boom, this is it, this is what i need to go with my SK1!
A day later, I bought the following from the thrift store (not my picture):
Some of you in the know will recognize the item on the left as the famous Texas Instruments Speak&Spell. Now there's a classic piece of bendable equipment i'm not touching until I get way better at circuit bending. But the thing on the right? Turns out it's a cheap radio shack rip-off, and it wasn't even fun to play with. I ripped it apart immediately. Inside: a single PCB with some components and a CPU, a LCD screen, and a piezo disc speaker. I decided it was useful only for its case. Ripping the keyboard's surface sticker off made it look very cool:
I knew immediately that this thing was destined to be the body of my looper. But now i had to find some brains for it. What I wanted out of the looper: 1) good signal quality 2) long memory length 3) ability to save the loop and replay it 4) multiple layers of loop. 5) stand-alone operation, because I didn't want to carry a computer around with it. Two options were available for me in terms of an embedded system: an ardurino, or a Raspberry Pi. The ardurino, although cheap, runs too slowly (16MHz) and has too small of a memory (somewhere around 32kb without a custom ram chip) for this function. I wanted 44khz, 16 bit stereo! So it had to be the RasPi.
This project is still in progress. Here's what I've planned to go ahead with, and I have no idea how it will all turn out. 
I'm basing my RasPi looper on this one: http://guitarextended.wordpress.com/2013/01/27/real-time-guitar-effects-with-raspberry-pi-pd-and-arduino/. PureData will be running on the raspberry pi, with a USB sound card (a Creative Sound Blaster Play!) as the ADC (analogue to digital converter) and DAC (digital to analogue converter), since the Pi has no ADC and its DAC is 11 bit.
I didn't want to put an ardurino in it (though i totally could). Instead, i bought this: http://learn.adafruit.com/adafruit-16x2-character-lcd-plus-keypad-for-raspberry-pi. It uses the I2C interface, leaving the rest of the GPIO port unused. I will use the GPIO port to poll the membrane keyboard. The membrane keyboard will control some drum effects and have a few buttons for pre-configured drum patterns, essentially, a drum machine. These features will be integrated into the looper as a seperate procedural data track (as opposed to line-in input for the looper, which will be stored as an audio data track). Not sure if this will interfere with the purely looper functions, but why not try it?
So far, I've managed to get the stock PI working (Raspbian, 16gb class 10 memory card) just by itself and installed PureData on it. This is the first time I've done anything in linux! I intend to run the RasPi looper headless, and where necessary, access its terminal via the ethernet jack. Running headless will reduce the latency and allow me to dedicate all the video memory to audio processing. Definitely won't be playing OpenArena on it, which is a pity.
I also need to mount the RasPi, and its LCD screen into the Spell&Math case, and hook up the GPIO pins to the membrane keyboard, as well as installing a bunch of buttons onto the front of the S&M case as controls. Currently cutting the plastic case with a newly purchased Dremel 100! Will post pics soon. I'll also have to program the PureData patch, of course!


No comments:

Post a Comment