Monday, October 11, 2004

lab 12 - oscilloscope

NAME

lab 12 - implement an oscilloscope for signals from signalfs.

DESCRIPTION

I implemented an oscilloscope called scope to view the signals produced by signalfs, or other PCM data such as an iaf file stripped of it's header.

% scope < bach.raw > /dev/null

It writes it's input to it's output, but it doesn't sound very good if directed to /dev/audio. It writes small blocks of samples with small delays between writes, making it sound very choppy.

Scope tries to draw 25 frames a second, getting a tick from a timer, and reads 1/25th of a second of samples from the input, then draws it on a Tk panel.

This is might be useful when recording input from a microphone

% scope < /dev/audio > out.raw

It takes as parameter the sample rate and number of channels, stereo or mono.

CONCLUSION

Not being able to listen and see the waveform at the same time makes it less useful than I hoped. How do I keep in sync the visual and audio stream?

I'd like to present a similar graph using the FFT, but I keep getting errors from the fft module. It correctly does the transform but isn't able to permute the numbers into normal order (I think, I do not know enough about this.) Commenting out the "optional code" in /appl/math/fft.b seemed to make it work, at least make it not exit.

FILES

scope.b

2 comments:

The Local Guys – Test and Tag said...

Enjoy reading the article above, it really explains everything in detail, the article is very interesting and effective. Thank you and good luck for the upcoming articles. tag and test Melbourne

servicecorrp said...

Very interesting. Your article is so convincing that I can never stop myself from saying anything about it. You are doing a great job, thanks for sharing such a great blog. Test & Tag Adelaide