This blog has moved, Update your bookmarks.

Stefan Rusek | Acoustic Analyzer and Acoustic Bandgaps in a Serial Loop Filter

Acoustic Analyzer and Acoustic Bandgaps in a Serial Loop Filter

July 22, 2005 @ 3:08 pm

Two weeks ago, I started on a new program called Acoustic Analyzer. The idea behind the program is pretty simple. I am both computer science major and physics major, and this program was written for a class that I got an incomplete in last semester. The class was Advanced Lab, and I didn’t make enough time for it in my schedule, but the professor was kind enough to give me the summer to finish up. I was going to do an optics experiment and do a write up for it, but after he and I got talking, I was drawn to the idea of doing an acoustics experiment. Many optics experiments can be done acoustically, basically all you do is change all your c’s (the speed of light) with the speed of sound, and magically it works. One of the draws of acoustics is that I have almost all the equipment I need sitting in my lap and somewhere between my years and under my hair. In other words, my computer has the hardware to generate source data and collect acoustic data and using my brain I can write the software to do the generation, recording and analysis. So that is just what I did.

Using 5 dollars of plastic tubing and 10 PVC T-couplings, I built a series of loops and attached a set of ear buds to each end of the series. (One set of ear buds gets to be a microphone.) This is approximately what the series of loops looks like:

—–O-O-O-O-O—–

This structure has interesting properties; in particular, it does not allow certain frequencies to travel through the tubing. My tubes do not allow 340Hz, 680Hz, 1020Hz, and so on.

Look at the attached picture. The top 3 graphs are the raw input, the recorded output through a normal tube, the recorded output through my loops. Below that is the transmission spectrum, notice that the transmission groops at multiples of 340Hz. The Input Spectrum is the frequency components of the recorded data through the normal tube, and the Output Spectrum is the frequency components of the recorded data through the serial loops.

I may release my program later under a BSD license.

–Stefan

Stefan Rusek | .NET 2.0 Beta 2 - Resources

.NET 2.0 Beta 2 - Resources

July 1, 2005 @ 1:54 pm

I’ve had .net 2 beta 2 installed for a little bit now,
but yesterday I installed Visual C# Express Beta 2. http://www.getexpress.com/ The first
thing I did was to bring up the documentation and look at the list of changes
to .net since 1.1. There were many that I already knew about specifically I
already knew about the changes to the C# languages, and with the exception of
anonymous inner methods, I am really pleased with those changes. There were
numerous other changes that I hadn’t read about, but I am real pleased
with.

One such new features it the new way that resources that are
embedded inside resx files are handled. Resx files are special files that
describe resources in .net. For those unfamiliar with resources, since the
16-bit days of windows, it has been possible to embed files inside of exe files.
A good example is the icon that you see when you look at an exe file inside of
explorer. Resources are not limited to icon files, and I find myself embedding
all kinds of files inside of my exes. Another extremely common resource is a
table of strings. Windows allows for resources in an exe to be substituted by the
resources in another file, this allows for an exe to show up in Japanese on a Japanese
computer by only copying the Japanese resource dll into the directory where the
exe is located. Resx files in .net 1.1 were very powerful, but they were cumbersome
to edit and so I (and probably many others) didn’t use resx files so
much.

The new enhancements to resx support really make it a lot
easier to edit the string table and to add other files. It also includes a code
generator that makes accessing the resources much nicer.

–Stefan