Wednesday, April 4, 2012

Less is More with matplotlib

import pylab as pl

#  Remove tick marks and tick labels
pl.xticks([]) 
pl.yticks([])

#  Remove axis lines
pl.gca().set_frame_on(False)

#  remove tick marks, leave label
pl.gca().xaxis.set_ticks_position('none')
pl.gca().yaxis.set_ticks_position('none')

# every other tick
pl.yticks(pl.yticks()[0][::2])
pl.xticks(pl.xticks()[0][::2])

# ticks on left and bottom only
pl.gca().get_xaxis().tick_bottom()
pl.gca().get_yaxis().tick_left()

Friday, December 24, 2010

Art Nouveau Labels (SVG win)

Google image search -> Gimp filtration and tweaking -> Inkscape trace bitmap -> export as 8.5 by 11 PDF

 

Saturday, May 1, 2010

Wierd Sound Generator

The Weird Sound Generator has been a fun project and Music From Outer Space website has a wealth of information about Synth DIY. I ordered the PCB from MFOS, it arrived quickly and the project was easy to put together and worked as advertised. Thanks to Ray Wilson for being generous and sharing his considerable efforts with the rest of us!

Be careful with the soldering iron. I burned by thumb and index finger by grabbing the hot end.

I had about half the parts and ordered the other half from Jameco. The Jameco website and catalog are easy to use and the service was good.

The value-pro pots I got from Jameco are still really stiff after a fair bit of use. I got the 1M pots from the Ax-man surplus in St. Paul and they are smooth as silk. I got three one-hundred foot spools of wire from the Ax-man for $2, two of the spools were OK and the third was total crap as the core kept breaking during construction.

I decided to use a Lexan for the main panel instead of Aluminum as recommended. I could not find a good source for eighth inch Aluminum sheet. When I build my Sound Lab Mimi-Synth Plus I am defiantly going to use Aluminum. You can not cut Lexan with out special equipment and I had to ground all the pot bodies independently.

I did one slight modification: I cut a board trace and added an extra switch to turn off Voice B. The wires I used to connect the controls to the board are way too long for my case and are something of a tangled rats nest. Ray Wilson points out that the wires connecting the filter controls are susceptible to capacitive coupling. So I turn off Voice B and I can still hear a ghost of it on the output. Lesson learned: be neat about the panel wiring.

Thursday, April 22, 2010

Slackline Setup with A-Frames



I have a 50 foot slackline setup from Slackline Express but when we moved to our house the tree situation was unfavorable for slacking. As I result, I have experimented with several A-frame setups. My first setup was a single A-frame consisting of a sheet of 3/4 inch plywood cut into the appropriate shape. This worked for a spell but ultimately started to break after some jumping and bouncing on the line. Following the various examples from the web I built two A-frames from 2 x 4 and 3/4 inch plywood. I am quite partial to the Kreg Jig pocket joinery setup as this makes aligning and joining the bits of wood easy.

Regarding anchor creation in the absence of trees: Most sources seem to suggest pounding three stakes into the ground and creating an equalized anchor. For the sand and clay soil in my yard I found that a single auger anchor on each end works fine. Get the longest and widest one you can find, mine were about a meter long and the auger was about 15cm in diameter. The augers shift a bit when they are first loaded but shortly lock firmly in place. As usual check that there are no utilities where you are planning to place the anchors. This is ideal for a permanent or semi-permanent setup since the augers get bent when they are loaded and are a little tricky to remove. You may be able to get around this by screwing the anchors in at an angle but I have not tried this.

Saturday, February 27, 2010

LT Spice model of Wierd Sound Generator with wav file output

Children seem to like loud annoying toys so I am building my son a Wierd Sound Generator. This thing is basically an electronic sound synthesizer, here is an example and another. It is a clever combination of Schmitt triggers and a filter.




Before releasing any solder smoke I judged it prudent to look at part of the circuit in LT Spice.  LT Spice has a model for the Schmidtt trigger allowing one to simulate part of the WSG. The predicted wave form can be exported and convert it into .wav or .mp3 file for listening pleasure.



LT Spice model

Sample sound

Note this is not particularity harmonious or pleasant to listen to in any way!

To export a voltage wave form from LT Spice click in the plot window and use File->Export. The venerable SciPy can be used to convert the LT Spice waveform .txt file into a .wav file.
from numpy import *
from scipy.io.wavefile import write 

lines = open('wsg1.txt', 'r').readlines()
t=[];v=[]
for line in lines[1:]:
   line.strip()
   tv, vv = line.split()
   t.append(float(tv))
   v.append(float(vv))
t = array(t)
v = array(v)
v -=v.min(); v/=v.max() # normalize
a = array(v*2**16, dtype=int16) # convert to integer
datarate = int(len(t)/t[-1])
print datarate, "samples per second"

#from pylab import *
#plot(t,a)
#show()

write('t.wav',datarate,a)
This depends on the latest version of SciPy (0.8.0). Another approach to generating a wav file not using SciPy can by found here