MacDAQ - Data Acquisition Software for Macintosh

Coming Soon!

(February 2003) MacDAQ for OSX! Shortly MacDAQ will be availble as a native OSX 10.2 (Cocoa) application. This application acquires data using the 'Core Audio Hardware Abstraction Layer', and should be compatible with any input device that supports this protocol. Unlike OS9 MacDAQ, OSX MacDAQ acquires data in asynchronous continuous mode, and can write all incoming data to a text file during acquisition.


MacDAQ for OS9


(Note: v1.00 shown)

MacDAQ is a small, simple program for perfoming data acquisition of signals using the sound input port of the Macintosh computer. MacDAQ is available free for all non-profit, non-commercial use. MacDAQ has been tested under System 8.6 and later (runs under "Classic" in OS 10) in G3 and G4 Macs. MacDAQ requires a Mac with sound input hardware (e.g. available on my '99 G3 portable, but not my '01 G4 tower or '03 iMac), although it will run in "demo" mode on Macs without sound input hardware.

Download the software (version 1.10, 568 Kb)

New features in version 1.10 of the software include data import from text files, spectral analysis and display using the discrete Fourier transform, and lowpass filtering using a Fourier filter.

Spectral analysis:

Lowpass filtering:


Instructions for basic use

Go to the "Monitors and Sound" control panel, select the sound pane, and set the sound input to "Sound In". Connect the signal input to the sound input jack of the computer.

Launch the MacDAQ program by double-clicking on the MacDAQ icon. If the program cannot connect to your sound input hardware, it will display an alert. Otherwise, it can read data from your hardware. Click the green circle in the DAQ palette, or select the "DAQ:Go" menu item to start acquiring data. Choose the "DAQ:Step" menu item or click the step icon (arrow and line) in the DAQ palette to acquire a single frame of data. If you do not have sound input hardware, the program will automatically run in demo mode (see below).

In the image below, the input is two channels of data. The first channel is a sine wave at 20 Hz. The second channel is the first passed through an RC low-pass filter of 1.5K and 1u. The signal source is a B+K 4011 signal generator. The image at the top of this page shows the response of this filter at 4 different frequencies. You can create as many plots as you like by choosing the "Plot:New Plot" menu. New plots default to displaying only channel 1. Closing a plot deletes the window. Closing all windows quits the program.


(Note: v1.00 shown)

If the program cannot connect to the sound input hardware, it will automatically run in demo mode. This is indicated by the Demo setting in the DAQ menu. Click on the green circle in the palette, or select the "DAQ:Go" menu to start the demo. The demo signals are a sine wave at 10 Hz and its output through an ideal first order low-pass filter. Most additional features apply to demo signals as well as signals acquired with the sound input port.

The data acquisition settings can be changed with the "DAQ:DAQ Settings..." menu item, or by clicking in the op amp icon in the DAQ palette. New data must be acquired for changed settings to take effect. MacDAQ acquires data by taking "snapshots" of the sound input port, that is, by recording from the port for a fixed duration before passing data back to the plot windows. The recorded data is displayed in the plots, and then more data is recorded from the sound port, repeatedly. The "true" sampling rate should be at least 44 KHz, as that is the startup default for the sound port. If it is not this rate, try rebooting your computer. If it cannot be set to this rate, please write to me.

A plot window can be configured with the "Edit:Plot Settings..." menu item, or by double-clicking in a plot window. This displays the following dialog. Some of these items are explained below, others should be fairly obvious. New data must be acquired for a change in input channel to take effect.

Check the "Show calculations" item of the plot dialog to show the following calculations in the plot. Y values are in volts, frequencies in Hz, delay in sec, and phase in radians.


(Note: v1.00 shown)

Usually the input signal will "roll" with time. To prevent this, check one of the "trigger" options in the plot dialog. This will synchronize each "snapshot" of data to the same relative point. All calculations are performed only on the trigger "interval", that is, the subset of recorded data which comes after the trigger point. Data before the trigger point are discarded.


(Note: v1.00 shown)

Note that the input to the Mac sound port clips at about 1.5 volts peak-to-peak. Also note that the sound port is AC coupled, so don't expect to see any low-frequency square waves in your signal.


(Note: v1.00 shown)

You can display a vertical mark in a plot by checking "Show mark" in the plot settings dialog. Click anywhere in the plot to move the mark, or use the left and right arrow keys. The plot then also shows the time index of the mark (from trigger), and the Y value of each curve which intersects the mark.


(Note: v1.00 shown)

You can copy, save, or print a plot as a picture from the File and Edit menus. You can copy or save curve data from a plot in text format from the File and Edit menus. To print plot data, first copy it into a text editing program and then print.

You can import text data into the program by choosing the "File:Import Data..." menu item. Currently only the first column of data in a text file is imported. The file may contain either return or newline characters. A new window will be created to hold the plot. The new window will initially be locked. A text file called "ekg.dat" is included in the program archive as an example.

You can create a spectrum of input data by choosing the "Plots:New Spectrum" menu item. Only one channel of data can be displayed in a spectrum window. The spectrum is produced by using the discrete Fourier transform. Initially the displayed frequency range is set to the non-negative Nyquist range. Frequencies outside the Nyquist range are displayed on a gray background.

To edit the settings used for the spectrum, choose the "Edit:Spectrum Settings..." menu item, or shift-double-click in the spectrum window. The spectrum settings dialog is shown below:

Most settings should be obvious. You can show the spectrum in either real/imaginary or magnitude/phase form. Click the "Output window shape" box to see only the shape of the data window used to compute the transform. The input channel displayed in the spectrum is set with the usual plot settings dialog, not the spectrum settings dialog. You can display a mark in the spectrum window which shows the value at a given frequency.

You can create a new spectrum of existing data in a plot window by choosing the "Plots:New Spectrum From Plot" menu item while a plot window is selected (frontmost). The new window will initially be locked.

You can lowpass filter input data by choosing the "Plots:New Lowpass Filter" menu item. This filter is performed by taking the discrete Fourier transform of the input data, passing that through a rectangular cutoff filter, and then performing the inverse discrete Fourier transform.

You can set the cutoff frequency from the "Edit:Filter Settings..." dialog, or by shift-double-clicking in the window. The initial cutoff is set at 60 Hz.

You can create a new lowpass filter of existing data in a plot window by choosing the "Plots:New Lowpass Filter From Plot" menu item while a plot window is selected (frontmost). The new window will initially be locked.


©Copyright Sky Coyote, 2002-2003.