Monday, December 31, 2012

Spectroscopy

Absorbance, transmittance and reflectance all different types of spectroscopy. What I want to try and do is be able to acquire a visible spectra of something using a camera. Decomposing RGB values into a spectra is going to be tough but I think if I base it on empirical values from a spectrophotometer. Wavelength might not be too crazy but intensity is going to be the tough part. Was working on using a webcam today. I think I need something with a little better resolution.

A 96 well plate reader

So I just received a fellowship for building a biosensor, The Chromochord. The old version of the Chromochord had a lag problem in that it took a certain amount of time to scan and read the optical spectrum of each well. I want to do this all at once and have so far come on to two solutions. One is to make a sensor for each well using photodiodes. The other is to use a camera or CCD of some sort. There are definitely ways I can do these things without making the device broadly applicable but that is not what I want. I want people to be able to use a device such as this without having to modify it much or at all. I really really don't want to use diffraction grating spectroscopy. Good lord is that stuff pitiful but I just might have to suck it up and do it. Anyone know much about using cameras in extremely low light?

Wednesday, December 5, 2012

Build your own Synthesizer Part 3

I think the Arduino is one of the coolest things to come out in recent years it allowed me to go from someone who knew nothing about electronics to prototyping and building ideas in a very short period of time. When I started graduate school at the end of 2008 I literally had zero electronics experience. I always wanted to teach myself but I was daunted by the idea of using assembly language and no libraries. This is a realistic fear especially if one is using Texas Instrument microprocessors. They really need some good tutorials besides their code examples. Of course I had a really strong C programming background so that helped. I use the Arduino for anytime I want to interface hardware with my computer. This made it ideal for this project. I wanted to build a musical instrument or some type of synthesizer since I guess all the sounds are synthesized, it is technically a synthesizer. For all of this stuff I will be using Linux because it is so much easier to interact with devices such as the USB port that the Arduino will be plugged into. In linux that will be /dev/ttyUSBX where X is an non-negative integer (0,1,2,3). So our goal is to have it that when we press a button the Arduino sends information through USB to our computer which can then translate it into some sort of music. A good programs to help with this are ttymidi . The ttymidi program allows us to interact with JACK and fluidsynth to generate the actual sounds. So first we need a button.

Tuesday, December 4, 2012

Build your own Synthesizer Part 2

What we will learn how to do first is how to have all the software running and working together so that we can hear MIDI output through the speakers on our computer. So hopefully you downloaded and installed all the software I suggested last time. Now we need a terminal preferably root. What we need to start first is JACK. This program allows all the programs we use to communicate with each other and also with our speakers. The easiest way to start it is to run "qjackctl &" . This should open up the JACK GUI. Once it is open we click start.   The next thing we need is to have fluidsynth running, which we can start up with "qsynth &". Qsynth is a software synthesizer frontend GUI for fluidsynth. It takes all the MIDI commands and will generate our music. So now we have the minimum programs we need to run. We can test it out using rosegarden or another MIDI program. What you need to do after starting rosegarden is to open up the JACK connect button and setup the connections they should be as follows: Under the ALSA tab rosegarden or your software should be connected to FLUID Synth. Most common problems when using my own synthesizer for me have always been having the correct connections. Next we will work on setting up the arduino and buttons and ttymidi.    

Monday, December 3, 2012

Build your own Synthesizer Part 1

I guess this is where I should start as this was the basis for my current main project the Chromochord.

This is not a guide for building a standalone synthesizer as all MIDI sound generation will be done through a computer. All the software and hardware that I used to build my own synthesizer is Open Source, WOOHOO! I did write some custom code though as any hardware/software hacker needs to be able to do for a custom system.

What one minimally needs to build a synthesizer such as the one I built:

A computer running Linux

An Arduino or your favorite microprocessor

Some Buttons, Wires and Resistors

Probably a sodering iron unless you are going for a ghetto fabulous project that is duck-taped together (I admit I have done this before).

On my Dell laptop I installed Ubuntu. Not necessarily a big fan of Ubuntu but Fedora was being difficult and I didn't want to spend all my time just trying to make my video drivers work. I'm too old for that. There are a number of cool and awesome MIDI programs for Linux, when I first started I was so excited and spent a bunch of time messing around with alot of them including Rosegarden and Hydrogen. These are not what we will use but are pretty cool for just playing around and learning about MIDI sound generation.

The software I use and what you probably need are:

JACK audio software

Qsynth

Sooperlooper

ttymidi

 

I think all of these programs can be installed with yum or apt-get except ttymidi, which can be acquired from Here I chose to use the arduino with this project because it already has a serial MIDI interface library so you don't have to code one up on your own. MIDI messages(See here) however are pretty straight forward and would not be that difficult to code up on your own say if you were using something such as the MSP430. Once you have all your hardware and software then we are ready to move onto the next part!