Using Audacity for a homemade electronic Osciloscope

Hi, i am on the need of developing a simple osciloscope for project in my Uni.

I was thinking that instead of developing a new portable program by my self, with furier transforms, pritty interface, etc. I could make a plugin for audacity to get the information from my usb-device and use the audacity features to get the usefull information.
This osciloscope is not more than just an ADC with a couple of channels and a custom USB interfaz.

However i dont know how audio editing works yet, so i have some questions, in case that someone whants to answer. :slight_smile:

Can Audacity work with high frecuencies? Like several Mhz.

I preffer to develop in python or in C instead of lisp, is it possible and easier than learnning lisp?

Is there any other similar plugin code that i could look at?

Is it possible for my plugin to redesign the interface to get a more osciloscope-like fealing? (Just because i wont need any playing feature, but will need easy access to select channel, multiplier/divider magnitude,etc.)
But, one step at the time. :slight_smile:


Audacity is probably not the best starting point for your project. It doesn’t do things in real time and it is probably orientated towards music / audio applications.

There is an open source project called “xoscope” that may be more suitable:

Can your USB device work at these frequencies?

Thanks for your answer, i was going to post on a mailling list.

I am not really expecting to work in realtime since my device can record to Mhz speeds but can not transfer to it at that speed, maybe it can do realtime at a khz order of speed.
I know that audacity is an audio manipulating tool, thats why i am interested on it, audio is just a signal with multiple frecuencies in an audible range. My device can get non audible ranges, but it still being a signal, so furier transforms, the visualization widgets, filters plugins, and storing capabilities should work fine only if they are not limited to a range of frecuencies.
Audacity may not work with realtime, but it can “record” sound in a real time fashion, what it doesnt do is displaying it in real time.

xoscope uses x11 and is ugly and non portable and in my group i am the onlyone interested on make it work on linux.
Audacity uses wxWidgets and is portable and it already haves a lot of plugins.
So xoscope is not good place to start, maybe to see the bitscope protocol.

Of course, but you dont answer the question. Audacity may be optimiced for audible signals, then removing all armonics outside that range, maybe for a tinyest file size or faster scripts execution.

I am better interested on wether it can or not by programmed on python or just C instead of lisp.


I suspect Audacity is limited by the internal configuration of sampling and bit depth. Audacity has 96000 and “Other.” I wonder how high Other goes? Also, where are you going to get the input from? Certainly the sound card isn’t going to go up very high…


So does your “device” record the signals on it’s own data storage device? If this is the case then do you can set whatever sampling frequency you like.

Audacity 1.3.5 will handle sampling rates over 100 kHz. (I have successfully recorded at 192000). Above this rate there are certain issues such as attempting to change the sampling rate to a value over 100000 will produce an error.

Audacity itself is largely written in C++
Plug-ins for Audacity can be written with Nyquist (which is based on Lisp) or as LADSPA plugins - I know little about the latter, but here’s the relevant link:

Thanks for the answers.

Yes, the USB device has its own storage capabilities, so i can transfer the data at any speeds, but the sample rate can not be changed without altering the information on it.
If i am not mistaken one can always reduce the number of samples but can never aument it.
The device as any other device have to perform the Nyquist Cryterium of being the sample rate at least 2 times the frecuency of the signal to messure.

So i guess that, if such a plugin can be developed it will be able to get a sample rate of 2 000 000 samples per second for a signal of 1 Mhz.
As i say, the signals may not be audibles, because an armoinc at 1 Mhz is totally out of the audible frecuency range, but it should be able to be displayed.

I have downloaded the Audacity code, and i had some problems compilyng because of wxWidgets version, unicode, and other libs dependencies, i didnt dig too much. But i am thinking that if no python is available for making this plugin, then it will be easier to develop the application from the start than striping down audacity.

An USB oscilloscope can be seen also as a USB sound card but with a very high range and only inputs.
I havent found any standard protocol for sound cards yet. Do you know any?


We need to remember that the 2.0 Nyquist number is based on signal dithering. Without dithering noise added, the Nyquist rate jumps to 2.6

Koz still looks like your best starting point to me -
there’s Bitscope stuff there for Win32 and Linux and lots of other potentially useful links.