QA402 Software on Linux and Mac

(replying to @Aleph5, but trying to quote @matt .) I’m sure there are good reasons for it (one more thing to update when a new release is made? Stale structures might linger?), but I agree it makes it harder for non-Windows-natives to try porting the software. Since these Mono structures are portable, maybe someone else who has Mono installed on their Windows machine could create the directory structure for you? But then where is a good place to put those? I don’t know whether anybody could add these files to the existing Github project, or whether only the owner can do that.

Further confusing: note that when I Google ‘mono portability to macos’, the summary makes it sound like it should just work!?? But clearly that’s not true according to the info in this thread.

Just for kicks, I installed Mono on my Surface 9 tablet under Windows 11. I got the ‘hello Mono world’ example to run, but when I enter ‘mono QA40x.exe’, all I get is a newline, and a new Mono command prompt after several seconds. So, it’s doing something, but not really working. The QA40x.exe (latest beta, I believe) by itself opens a GUI, so it seems to work. Maybe I misunderstood the instructions, and the QA40x.exe to be opened with Mono is different from the standalone QA40x.exe?

Added: GTK# apparently needs a separate install; after doing that install, ‘mono QA40x.exe’ still does not work. I do not know how to let Mono (which apparently used to and now does not include GTK# anymore?) know where and how to find it. gtksharp is part of the Windows path.

If I try to compile the Mono gtk example, and tell it explicitly where to find the gtk-sharp-2.0 library (clearly just the fact that the windows path includes gtksharp is not sufficient), I get a long list of Mono complaints about the path. Success! And my short excursion into software is coming to an end.

(Edited for clarity, regarding gtk# inclusion, and nature of compiler complaints.)

1 Like

I will re-read that a few times and maybe it will help me as well. I got Mono installed and Hello World confirmation, but see only the setup exe which won’t run.

I also got some instructions per Gemini on a Linux VM install, and may restart with that tomorrow.

I don’t think you want the setup exe. The .exe to run Mono on is QA40x.exe . From the first post:

Also note that my ‘Success!’ at the end was facetious; I could not even get the mono gtk example to compile.

Yeah, gotta figure how to get the QA40x exe just to see what happens then. :unamused_face:

@Aleph5, I sent you a PM.

For what it’s worth, I can get ‘mono QA40x.exe’ to start in a virtual Ubuntu machine in WSL under Windows 11, but it dies with X11 errors. I tried reducing the number of (virtual) processors and amount of memory allocated to WSL, as recommended on the interwebs, but that did not help.

The X11 errors are error: badalloc (insufficient resources for operation) and BadDrawable, and it dies with

System.Exception: Generic Error [GDI+ status: GenericError]
at System.Drawing.GDIPlus.CheckStatus (System.Drawing.Status status)

xeyes does work. After issuing ‘export LIBGL_ALWAYS_INDIRECT=1’ and ‘export DISPLAY=:0’ (the latter being clearly not needed, since xeyes can find the X display), xeyes still works, and mono QA40x.exe still dies with the same messages. Note this is before connecting hardware.

Because you’re combining many layers, **QA40x** is behaving strangely.

When you start `mono QA40x.exe`, Mono must use **libgdiplus** to imitate the Windows GDI+ stack, which is where the `GenericError` and X11 `BadDrawable/BadAlloc` often originate. QA40x.exe is a Windows-targeted.NET/GTK# application. Xeyes functioning just indicates that X11 is still in use, not that GDI+ rendering is.

WSL exacerbates this as well. A single weak connection will cause the GUI to malfunction. WSL + X11 + Mono + GTK# is a stack of shims.

If testing QA40x under Mono is something you really want to do:
Use a genuine Ubuntu virtual machine (not WSL). * Install gtk-sharp-2.0, libgdiplus, and mono-complete. Use `MONO_LOG_LEVEL=debug mono QA40x.exe` to execute it.

However, in practice, running the Windows version under Mono will remain unstable until QA40x is redesigned especially for Linux/macOS. Hello World is manageable for mono. Complex graphical user interfaces are another matter.

Thanks, @Allen14 ! I can run QA40x natively under Windows, but maybe this will help somebody else.

However, in practice, running the Windows version under Mono will remain unstable until QA40x is redesigned especially for Linux/macOS. Hello World is manageable for mono. Complex graphical user interfaces are another matter.

Hi @Allen14, there will be a test release of the QA40x_V2 in the coming weeks that runs on Linux/Mac using just dotnet framework (no mono). The purpose of the release is to get the kinks out with local PC tone generation, USB hardware, languages, etc. I’ve discussed before that it’s based on Avalonia, which relies on Skia for underlying rendering. This means 2D primitives will get rendered using your 3D hardware, and so things are very fast.

The screenshot below shows where things are headed. There are lots of windows available (from single graph to a 4x3 array of graphs). Each graph can pop-out for inspection/editing, has cursors, measurements, markers, can export in PNG or SVG. Left, bottom, right axis are config (in the plots below you can see right axis is dBR tracking while left axis is absolute dBV). You can drag/drop to re-arrange all graphs to suit your needs.

All graphs source their data from a trace pool (on the left). There is a hardware source (which is the QA403/QA402 analyzer), but you can also add a WAV source or a C# source. The benefit of the latter is if you wanted to code up a test signal that was 0 dBV in amplitude with 3H at -40 dBc and 7H at -80 dBc with 10mV of uniform noise, you could. Each trace source can have transformers applied. A transformer is a block of code that does something interesting. Which means you could add a 60 Hz powerline notch, A or C weighting, or a Farina chirp transformation. As you add transformers, more endpoints emerge in the tile (small boxes inside the tile). These are the attach points for your graph. So, the upper left graph can be looking at a C weighted while the upper right could be looking at A weighted.

Each graph is specified as either frequency domain or time domain, and in freq domain you have the option for showing either spectrum or transfer function. For spectrum, it’s like the QA40x today. For transfer function, it will show gain/phase relative to the right channel. This fixes a deficiency in the main screen of the QA40x app where you couldn’t show phase (and had to use the automated test to get that).

Why 12 windows? The aim here is to allow larger, automated tests to show you a full view of your problem in one shot. That is, graph one might be captured time domain, graph 2 might be spectrum with THD/THDN meaurements, graph 3 is bargraph of spectrum, and graph 4 is a plot of THD versus power.

It will take some months to get to parity withe the QA40x app, but once that’s reached, it will very quickly exceed it.

Localization to 7 languages will be in the initial release. These will be machine translated, so a native speaker might be able to help with improvements. The v1 app usually needed 100 to 200Mbytes of RAM while running, with a super tiny 5Mbyte distro. The v2 will probably sit and 300-400Mbytes of RAM while running, with a larger 100-200Mbyte distro. There’s been a lot of work done memory use, and so the consumption variability of the v2 app should be quite a bit better than the v1 up.

EDIT:

Here’s two SVG graphs copied from Qa40x_v2 app and pasted directly into Word. Full vector is preserved converting from Word to PDF. Very nice for publishing.