HP8903A Audio Analyzer and python: creating a new app

I’ve been working on a way to control my HP8903A Audio Analyzer directly from my PC. This precision instrument is a fantastic tool for audio measurements — think frequency response plots, THD+N distortion analysis, and more — making it ideal for testing tape machines and other vintage audio equipment.

I also have the necessary GPIB-to-USB interface from National Instruments (NI-488.2), which handles the communication between the analyzer and the computer.

There is already excellent software available for this purpose, written by Peter Millett. You can find it on his website at http://www.pmillett.com/hp_8903_software.htm. Peter was kind enough to share his source code with me, which turned out to be invaluable during development.

However, his software had a few limitations that didn’t work for my setup:

  • It is a Windows-only application that requires a specific HP runtime environment.
  • It was written in an HP proprietary programming environment that is difficult or impossible to install on modern versions of Windows — and since it is commercial software, extending or updating it would require a financial investment.
  • I work exclusively on Linux and don’t have a Windows machine available.
  • I wanted a fully open-source solution that others could possibly freely build upon.

So, with some help from AI, I set out to rewrite the application in Python. The result closely replicates all the functionality of Peter Millett’s original software, while adding cross-platform support and a modern interface built with Qt6 and pyqtgraph, running on openSUSE Tumbleweed with Plasma 6.

The application is still technically a work in progress, but it is 95–99% complete and currently running flawlessly. Only a few small refinements remain.

Here’s a screenshot of the current interface:

The app supports four core measurement modes:

  1. Frequency Response — sweep the input frequency and plot the output level across the audio band
  2. THD+N distortion — measure total harmonic distortion plus noise at a given frequency and level
  3. Voltage — read AC/DC voltage at the analyzer’s input
  4. Power — measure output power into a specified load

Very happy with the result, and it works very nice!

DISCLAIMER: This program is tailored for my situation. Even though it is made using 100% open source components I am not sure that it is very portable and that it works in your situation. Leave a reply (link is above post) if you are interested, but I do not have high hopes that it will run outside of my environment.
But you can always have a go. Please let me know if it has worked for you (especially Windows users), or if it didn’t work for you. Hopefully I can improve the code, or the setup process so that we can make it work everywhere.

I have created a Codeberg repository that you can clone here:
https://codeberg.org/pvdm/hp8903a
There are instructions on how to install the app on your system.

Next project: do the same for my Audio Precision Portable One Plus:

10 thoughts on “HP8903A Audio Analyzer and python: creating a new app

  1. Curtis H

    Hi, I would love to try out your 8903B py software. Your help file specifies very carefully py version and lib versions. I have a lot of SW experience, so I feel that I can beat it into submission.

    I have built pete millet jonokuchi headphone amp, a 2nd with boutique transformers, sangaku headphone nutube amp, his mighty midget, 26a7 preamp. Working on his engineers EL84 amp.

    Also built a tubelab TSE with 2a3 tubes.

    I have an 8903B and usb interface and would love to get measurements going on all these amps.

    Thanks, C

    Reply
    1. Philip van der Matten Post author

      Hello Curtis,

      I have created a codeberg GIT repository. I have uploaded all the files there. It works very well, but since I run a rolling distribution (openSUSE tumbleweed) The GPIB driver breaks a lot. Every time I get a new kernel, about once a week. But there is now built-in DKMS support so that the GPIB will be rebuild after each update. But check in often, it is still being ‘perfected’ so whenever there is an update, I push the new files. Also after you have ‘git cloned’ the repository, be sure to check out the README and the help files.
      You can find the git repository here:

    2. https://codeberg.org/pvdm/
    3. Reply
  2. Curtis H

    Thanks,

    If you could change my display name to “Curtis H”, that would be great.

    Reply
  3. Charles Clark

    I am very interested in getting this going as well, however I am using a standard PCI type interface, which is working on Pete Millets software in windows, but I cannot seem to get your version working unfortunately. I have tried it in linux as well, but as you mentioned there are so many variables. I would like to get it working on linux preferably, windows would be acceptable because I have other test equipment hooked to the same GPIB interface on it anyway.

    Reply
  4. DINDA AULIA AZZAHRA PUTRI PURWANTO

    A brilliant open-source solution! Moving away from legacy Windows dependencies to a clean Python-based architecture is a pro-move. As an Electrical Engineering student at Telkom University Surabaya, I really appreciate your effort in making this instrumentation data accessible and extensible.

    Reply
  5. Henk Wildenbeest

    hello sir,

    First of all, a very nice and neat GUI.
    I tried the script under Windows 10 with a PCI NI488-2 card, but it did not work well.
    So I rewrote the script a bit, the interface for Windows and I must say it works perfectly.
    But one question, have you already implemented the filters?
    I work with the HP8903B and I do not have HP filters but a CCITT filter, so it is very possible that there is another command for this.
    I would only expect the HP filters to work if you have activated them in the script, otherwise I will continue looking.

    Greetings,
    Henk,

    Reply
    1. Philip van der Matten Post author

      Hello Henk,

      Thank you so much!
      I think it’s amazing you got it working under windows.
      I have not updated the app, if I would have it would have been pushed to codeberg.

      -Philip

      Reply
  6. Henk Wildenbeest

    Hello Philip,

    My question is whether I am doing something wrong with the controls or if the filters in the script are not yet activated?

    The keys work, but nothing happens on my instrument yet; I currently have the B version and a CCITT filter instead of the HP filters.
    If the filters are not yet activated, I will see if I can add this to the script.
    If you would post my changes—the complete script for Windows 10—along with your script for Linux, I will send it to you so that everything remains organized together.

    Regards,
    Henk.

    Reply
    1. Philip van der Matten Post author

      Hello Henk,

      Are you talking about the high pass 400 Hz and the low pass 30/80 kHz filters?
      I do believe this functionality works on my machine with the app. It has been a while. I can not verify it atm.

      And yes, I would like to eventually include your script in the codeberg repo when it is working, with the proper credits of course!

      -Philip

      Reply

Leave a Reply

Your email address will not be published. Required fields are marked *