looking for a software-scope

Help Support QuadraphonicQuad:

bevergerner

Well-known Member
Joined
Jan 1, 2012
Messages
121
Location
Münster, Nordrhein-Westfalen, Germany
Hello,
some people will remember the era of scopes in the seventies.
Now we have our music digitally on the computer and hear it about our systems.
I use foobar - with the darkone design.
But I'm missing a suitable visualization that can display multichannel. Gladly one that represents only 4.0.

There was a scope, e.g. from Marantz:

Does any of you know such a visualization?
I am looking forward to an interesting discussion
 

HomerJAU

Moderator: MCH Media Players
Staff member
Moderator
Moderator
Joined
Jun 13, 2013
Messages
4,295
Location
Melbourne, Australia
I'd love to have access to a software quad (and 5.0) scope.

I've found a stereo vectorscope in ffmpeg. I wonder if one of our QQ members is a C programmer that might look at the ffmpeg source code to see what's required to add quad support. Ffmpeg is open source.
 

HomerJAU

Moderator: MCH Media Players
Staff member
Moderator
Moderator
Joined
Jun 13, 2013
Messages
4,295
Location
Melbourne, Australia
I've found some other code for a nice stereo vectorscope. Does anyone know the basic theory so that I could have a go at implementing a quad version? (and 5.0) or should I start a new thread?

Let's get this in Kodi or Foobar as an add-on!

 

HomerJAU

Moderator: MCH Media Players
Staff member
Moderator
Moderator
Joined
Jun 13, 2013
Messages
4,295
Location
Melbourne, Australia
From what I’ve read the stereo vector scope measures phase differences between left and right channels.

Can I presume a quad vector scope could be made by combining 4 stereo phase difference:
FL FR, FL BL, FR BR & BL BR

Or should it measure every channel pair (I.e FL against other 3, FR to BL & BR and BL to BR)?
 

Jim the Oldbie

My right elbow hurts.
Joined
Jun 6, 2015
Messages
1,080
Location
Midwest USA
I've used a conventional oscilloscope in X-Y mode as a stereo audio vector scope many times down through the years. But a quad scope such as the Marantz unit appears to be working quite a bit differently. I haven't quite figured it out, but it looks as if there is some full-wave rectification of the audio signals going on there.. Unless I'm mistaken, this could be a way of confining each channel to its own quadrant on the screen, as we see happening in the video.

Hmm... I may have to screw around with this for awhile down at the shop this weekend if I can find the time...

[EDIT] Whoa, just found the Marantz 4400 schematic online. Excellent... [/Mr. Burns]

[EDIT EDIT] Yes! Each of the 4 channels is simply half-wave rectified (to chop off the negative half of the waveform), then applied to a nifty little passive crosshatch resistor network, to "steer" the CRT beam to the proper quadrant for each channel. Very cool.

Okay. I don't know how to program in C, but here's some pseudocode to describe what's happening in the Marantz (and presumably the others), applied to a digital audio stream:

1. First: assuming our virtual beam's no-signal resting position is a dot in the center of the display area, we establish some variables outside of the processing loop:

HPOS shifts the dot to the right
HNEG shifts left
VPOS shifts up
VNEG shifts down

2. Then (entering the loop), we "full-wave rectify" each channel's sample by simply taking the absolute value (converting all negative values to positives):

LF = ABS (LF)
RF = ABS (RF)
LB = ABS (LB)
RB = ABS (RB)

3, Now, the matrix:

VPOS = (LF + RF) / 2
VNEG = (LB + RB) / 2
HPOS = (RF + RB) / 2
HNEG = (LF + LB) / 2

4. Finally, repeat Steps 2 & 3 for each successive group of 4 samples.

Et voila!

Hope this helps. Any C coders out there?
 
Last edited:

HomerJAU

Moderator: MCH Media Players
Staff member
Moderator
Moderator
Joined
Jun 13, 2013
Messages
4,295
Location
Melbourne, Australia
Thanks Jim. I saw my first quad scope at Ron’s (rustandi) a while back. It looked so cool! Interesting to hear what you think. I could rotate scales for channels without too much problem (famous last words...)

Edit: I can’t remember Ron’s model. But it showed a similar scatter view to the Marantz video I posted
 

HomerJAU

Moderator: MCH Media Players
Staff member
Moderator
Moderator
Joined
Jun 13, 2013
Messages
4,295
Location
Melbourne, Australia
I've used a conventional oscilloscope in X-Y mode as a stereo audio vector scope many times down through the years. But a quad scope such as the Marantz unit appears to be working quite a bit differently. I haven't quite figured it out, but it looks as if there is some full-wave rectification of the audio signals going on there.. Unless I'm mistaken, this could be a way of confining each channel to its own quadrant on the screen, as we see happening in the video.

Hmm... I may have to screw around with this for awhile down at the shop this weekend if I can find the time...

[EDIT] Whoa, just found the Marantz 4400 schematic online. Excellent... [/Mr. Burns]

[EDIT EDIT] Yes! Each of the 4 channels is simply half-wave rectified (to chop off the negative half of the waveform), then applied to a nifty little passive crosshatch resistor network, to "steer" the CRT beam to the proper quadrant for each channel. Very cool.

Okay. I don't know how to program in C, but here's some pseudocode to describe what's happening in the Marantz (and presumably the others), applied to a digital audio stream:

First, we "full-wave rectify" each channel's samples by simply taking the absolute value (converting all negative values to positives):

LF = ABS (LF)
RF = ABS (RF)
LB = ABS (LB)
RB = ABS (RB)

Now: assuming our virtual beam's no-signal resting position is a dot in the center of the display area, we establish 4 more variables:

HPOS shifts the dot to the right
HNEG shifts left
VPOS shifts up
VNEG shifts down

Now, the matrix:

VPOS = (LF / 2) + (RF / 2)
VNEG = (LB /2) + (RB / 2)
HPOS = (RF /2) + (RB / 2)
HNEG = (LF / 2 + (LB / 2)

Et voila!

Hope this helps. Any C coders out there?
Hey thanks again Jim!

The open source I’ve found looks fairly straight forward at first glance. So I’m thinking I can convert c to c# which I can read and code a little. I’ve used Fortran in another life and now use VB.net (from VB years ago) - never C.

I’ve also contacted the original developer of the stereo vector scope code and asked him if he’s interested in making a quad version (no reply yet) but either way your info above is going to help immensely.

It’s more about doing a visual representation than any accurate analysis for mixing so it looks like we have a path to follow.

Any C coders out there?
 

Jim the Oldbie

My right elbow hurts.
Joined
Jun 6, 2015
Messages
1,080
Location
Midwest USA
You're welcome Homer! It might be best to send a link to my post, rather than copying & pasting, as I've made several edits to it since I first posted it (past my bedtime, heh.)
 

HomerJAU

Moderator: MCH Media Players
Staff member
Moderator
Moderator
Joined
Jun 13, 2013
Messages
4,295
Location
Melbourne, Australia
No probs, thanks again. I’m just about to crack my third beer for the evening (beer of the world tonight, Kingfisher, Tsing Tao and now a Peroni). Quad tonight too, sorry but I’m going to do the Pink Floyd’s tonight :)
 

Jim the Oldbie

My right elbow hurts.
Joined
Jun 6, 2015
Messages
1,080
Location
Midwest USA
Homer, here's an alternate version of the processing loop, with the maths changed around a bit to avoid clipping:
---------------------
LF = ABS (LF) / 2
RF = ABS (RF) / 2
LB = ABS (LB) / 2
RB = ABS (RB) / 2

VPOS = (LF + RF)
VNEG = (LB + RB)
HPOS = (RF + RB)
HNEG = (LF + LB)
---------------------
I've got an example of this nearly working, using a software synthesizer called ABox2 that I've had for years. Stay tuned...
 

Jim the Oldbie

My right elbow hurts.
Joined
Jun 6, 2015
Messages
1,080
Location
Midwest USA
Hmm... This does work, but the visualization isn't quite what we want. The channel vectors aren't as well defined as the old quad scope; too much out-of-phase going on.

I'm missing something here; may need to add one more step. I'll try to figure it out, then I'll be back with a summary of what I'm doing.
 

Jim the Oldbie

My right elbow hurts.
Joined
Jun 6, 2015
Messages
1,080
Location
Midwest USA
Ah, I get it! By rectifying first, I was obliterating the phase information! Duh.

I've changed things around, and I can now see the 'X' pattern of the channel vectors, but the out-of-phase stuff is still dominant. The matrix isn't right yet...
 

HomerJAU

Moderator: MCH Media Players
Staff member
Moderator
Moderator
Joined
Jun 13, 2013
Messages
4,295
Location
Melbourne, Australia
I’ve been looking at how this could be implemented in Foobar and Kodi (probably wanted in JRiver too). We’re definitely going to need expert C programming skills. Maybe we’ll get lucky and find a developer(s) in those communities that will be interested.

It will need to support both stereo and surround to widen the audience, that should be straight forward.
 

Jim the Oldbie

My right elbow hurts.
Joined
Jun 6, 2015
Messages
1,080
Location
Midwest USA
I'd rather wait with screen shots until I get the display right (I'm getting close). Abox2 has a scope readout, but it's really small. This is mostly just a proof of concept for now. But as soon as I have a proper emulation of the CRT display, I'll post a complete description of what I have, along with my Abox2 patch so that you can try it at home. :)
 
Last edited:

Jim the Oldbie

My right elbow hurts.
Joined
Jun 6, 2015
Messages
1,080
Location
Midwest USA
OK. I was wrong about the rectification. It can happen ahead of the matrix, just like it does in the Marantz. My mistake was that I wasn't careful enough with my model of the analog circuit.

Right at the start, I had substituted full-wave rectification (slightly simpler math) for the half-wave circuit in the Marantz. Half-wave works better because it polarizes the signal while retaining more of the phase information compared to full-wave. This is a crucial difference that I missed at first.

With that in mind, here's the latest pseudocode for the processing loop:

Half-wave rectification:

LF = LF + ABS (LF)
RF = RF + ABS (RF)
LB = LB + ABS (LB)
RB = RB + ABS (RB)

Matrix:

X = (RF + RB) - (LF + LB)
Y = (LF + RF) - (LB + RB)

I simplified the matrix (X = horizontal, Y = vertical), and also removed the scaling for clarity (also assuming at least 32-bit floating-point math at this point).

Since I can't really code much at all, I've dusted off an old piece of software called Abox2 to try this out, and it looks pretty cool so far. I gotta get some sleep, but I'll try to put a video on YouTube tomorrow.

P.S. Sorry about all this stream-of-consciousness stuff; I'm learning as I go along here. :)
 
Last edited:
Top