Archive for the 'Sound Electronics DIY' Category

PICAXE as an arpeggiator

Saturday, December 3rd, 2011

The purpose of this exercise was to try out the sound command really.

With the sound command you can put out a sound at a pitch to any of the output pins. Its just a square wave. Unforturnatly its not very asynchronous so when  you kick off a 100ms note you lose control of everything else.  Lets face it…a 1 second note is an ETERNITY to a micro processor.  However, the way the PICAXE works is that you are trading having to deal with interrupts for a simple command.  From what I can tell, there is no way around this  (except for using an external source to trigger an interrupt..but thats another test).

ya, the Picaxe is not the best sound source. Well it is kinda, but you just gotta be creative.  This particular exercise did not explore much beyond creating simple sounds and reading from the ADC.

The program is as follows:

symbol rndW=w5
symbol rndB=b10
symbol tempo =1   'tempo controller
symbol note = 4   'starting note controller
symbol PIEZO0=0   'piezo speaker

symbol tmpNote=b3
symbol tmpSpeed=b4

init:

start:

' ### read note and speed
readadc tempo,tmpSpeed
readadc note,tmpNote

' adjust values a bit to a reasonable value
let tmpSpeed = tmpSpeed / 5 MIN 1
let tmpNote = tmpNote / 4 MIN 4

' ## play first note
sound PIEZO0,(tmpNote, tmpSpeed)

pause tmpSpeed

'  ### play second note
tmpNote = tmpNote + 10  '  note + 10
sound PIEZO0,(tmpNote, tmpSpeed)

pause tmpSpeed

'  ### play third note
tmpNote = tmpNote + 10
sound PIEZO0,(tmpNote, tmpSpeed)

pause tmpSpeed

goto start

Nothing too special. Two pots control the speed and the starting note.

The sound command puts out a sound for a specified amount of time. Values from 0 to 127 (or so) are notes and from 128 to 255 are a pitched noise. This program picks values that are within the sound range so I divide the number by 4 to give me a range from 1 to 63 or so.

Basically it reads the tempo and pitch and uses those values to kick off a three note arpeggio.

The synchronous nature of the chip can be felt by selecting a slow rate and cranking it to a fast one. You have to wait for the whole slow sequence to finish before the fast one kicks off.

so anyway….this works.  Not well…but it works.

picaxe_arp.v1

Picaxe Arpeggiator

PT2399 - Echo/Delay chip

Tuesday, February 15th, 2011

I tried a few experiments with the PT2399 chip over Thanksgiving weekend.

Its an echo chip thats pretty dirt cheap. You can get them at Futurlec for under two bucks. In fact, here is a place in eurozone that has them for 50 cents (plus…ahem…shipping).  There have been plenty of work done on the chip, and for lo-fi applications…its pretty ideal.

The low down summary is this: its really low noise for small delays.  Anything more that 400ms and it starts to sound pretty noisy. Workable…but noisy. Here is a kit that uses two chips for a total of 800ms delay.  Very reasonable in my opinion.

Being that there has been so much work done on the chip, I opted to try a fairly bastardized version of an echo circuit first.

Doing a little digging on the internet, I first found this schematic for a “sewer pipes ringverb“.  Low part count and pretty decent sound.  Pretty neat.  It was inspired from another circuit called the Noise Ensemble. Seemed like a good place to start. I ultimately built this circuit.

It delivered.  Delay and noise. If you take a look at the circuit, note the LED feeding into pin 6.  Pin 6 is the VCO. The LED is driven from the LPF on the input. IT kinda is like a peak detector. A hard chord will get past the forward voltage (my best opinion at least) and push some juice into the VCO.  The clock changes and you get a pitch shift.  Kinda neat.

not super clean though.

PICAXE chips

Thursday, September 4th, 2008

So Ive been playing around a bit with the PICAXE Micro controller. Its a pretty impressive little chip.

Basically, its a PIC chip with a bootstrap program on it. You can’t use just any PIC, you order the chip from the makers of PICAXE.  On the plus side, you have a “kernel” on the chip that makes programming it a breeze.  Just a serial connection from your serial port on the computer is needed.  Because of this, you can build a programmer with just a few parts.  Additionally, the BASIC is really simple.

The downside is that the kernel overhead is kinda high.  Even though a 8 pin PIC runs at 4Mhz, that translates to about 10,000 BASIC commands a second.

To get started I just bought this.  Its entry level. The cord is pretty much all you need. Once you have that, you can build a programming interface into any project you make with a resistor and a 1/8 inch stereo plug.

Because it is so darned easy, I figured it would be useful in my general exploration of noise making circuits.

My projects so far are here.

So far, it appears that its not so good for making audio.  There is a sound command, it can be used intelligently, but for the most part, its better suited for controlling things.  There are no timed interrupts and for the most part, its all synchronous. If you run a one second basic command to play a note…the processor is tied up for a second.

Still, I have hope I can find useful applications for this chip.  CMOS provides good building blocks, but you can simply things with code easily. Unfortunately,  CMOS is fast and the PICAXE is not.

Next Ill look at the PICAXE as a DCLFO. I found a good start at using PICAXE chips and shift registers here.

Seems like could make a decent LFO (with waveforms) based on shift registers.

Follow me. Using an 8 bit shift register and a resolution of 16 samples a second, an LFO with a max of 4 hz  would require 10000/ ( ( 8 bits * 16 values per waveform * 4 hz))  = 19 basic instructions per  interrupt.

Thats doable for an LFO considering most of the time, all we are doing is pulsing a bit. It will be grainy, but doable. For the most part, each interrupt would be a pulsing a bit.  Reading a READADC would be once in a blue moon. Anyway…in the next week Ill figure out if I can do it or not.

Applications? Well…who knows.

Later Ill get into the PWM capabilities of the PICAXE.  This can be filtered to get an analog value

DFW Synth DIY meetup Sat Aug 9th

Tuesday, August 12th, 2008

Had a good time at the Bar of Soap for the first DFW Synth DIY meetup.

Lots of folks showed up and there were plenty of rigs set up for folks to see and here.

Pictures are here and here.

We had An arp 2600, Doepfer A-100, and several custom built modulars and a few things that can just be described as “other”.

Paul from synthtech was also there with his new modules on hand like the MOTM-520 Cloud Generator MOTM-730 Voltage-Controlled Pulse Divider.

DSC02317

Mostly we met each other and learned a bit. Its a good start to get a community together to do things like trade knowledge, tools, and time to learn more about this stuff.

if your interested
email us at the myspace

http://www.myspace.com/dfwsynthdiy

Midibuddy and Ableton

Tuesday, July 1st, 2008

I bought a Midibuddy a year or so back on ebay with the intention of using it to trigger loops in Ableton. I had hoped it was as easy as plug-n-play but no such luck.

I gave it another try last night and after banging my head against the wall I finally figured it out.

The problem is that need the midi buddy only sends out song selects and program changes. These are not suitable to trigger scenes in Ableton. The solution is to use the free programs Midi OX and Midi Yoke.


The instructions are a little on the lean side but once I figured it out, it all made sense.

First you need to install midi yoke. This is basically a virtual patch bay. Next you install the Midi OX.

This program allows you to capture Midi info and filter/modify it to your liking. In my case, I needed to convert the Program changes to CC messages. Some care needs to be done there too though because to get the toggle to work, you need to set the value to something high too like 99 or else ableton seems to ignore the message. It makes sense. For example, on the MAudio O2, if you want the control buttons to trigger a scene, you need to program the board to send something like 99…otherwise it just sends 0 and increments.

Here are some snapshots of what I did.

After the yoke is installed, you pick the midi input from the soundcard or USB (an Uno in my case) and send the output to the Yoke. I sent it to 3.

The mapping was done like this.

Basically it says grab all the Prg Changes and send them as Ctrl messages on channel 2. Send a value of 99 all the time. This worked for me.

Now on Ableton just take the input as yoke 3.

prefs

From there, you sends should be heard from Ableton and it can learn in Midi Mapping mode.

Memorial Day Funness

Wednesday, June 11th, 2008

Had a fun weekend for Memorial Day. After all that food in China, I felt that a food based day trip was in order. Plus, Memorial Day just wouldn’t be the same unless I was in East Texas somewhere. Pine Mills was actually going, but nobody told me about it. So I drove close to the farm, but headed on past for MudBug Madness in Shreveport, LA.
Its pretty much like taste of Dallas, but for the most part, its about the Crawfish. The band was fun. Jeremy and the zydeco hot boyz. I had only two things I wanted to do. Hear a Zydeco band and eat some buggers…and we did both.

It was the first time Elijah had crawfish too!

DSC04811

Everybody danced. The crowd was really nice.

DSC04825

One of my pictures caught the attention of a local blog and she put a picture that Elijah took on it.

Shreveport Faces

E thinks this one is better though. She prefers the less “posed” ones.

DSC04809

Afterwards, we went to Caddo Lake to do a little hiking. I love the moss hanging from the trees, but the bugs were unbearable.

DSC04859

Sunday night was our second “HOUSE OF SUES” night at House of Blues. It was awesome. I made a giant S that turned the sign into ours. I wired it for three circuits, but the light guy went a little crazy and rewired it for 6. It looked pretty neat. We also had matching Tuxedos because we wanted to make the evening as special as possible for everybody that came.

DSC04871

DSC04873