Wizard L/R channels flipped?

Is there any chance that the LEFT_CHANNEL and RIGHT_CHANNEL constants are reversed for the Wizard? That seems unlikely, so I suspect the problem lies with me, but when I pull

 FloatArray l_buf = buffer.getSamples(LEFT_CHANNEL);

and fill it up, I very definitely get sound only on the right channel of my headphones. Same inversion with RIGHT_CHANNEL.

Test patch at https://www.rebeltech.org/patch-library/patch/Test_LR .

2 Likes

You are probably certainly right! I remember testing though on a pair of headphones I have here… Can different headphones have different pin-out??

Pin-out was my second theory (after my first theory, which was that I can’t keep my left and my right straight) :slight_smile: Over the weekend I’ll check on a few pairs I have lying around. Could it vary by unit? If any other Wizard owners want to pitch in, please give the Test_LR patch a try. I scaled the amplitude down so nobody will get inadvertently deafened.

I’ll delete the patch once we’ve confirmed what the issue is…

I can confirm the left signal comes out on the Ring of the jack, which should be right.

However if you input a signal into the Wizard (or Alchemist) and use e.g. the Gain patch: https://dev.rebeltech.org/patch-library/patch/Gain, then what goes in as left, comes out as left, and vice versa.

But now I’ve found the culprit: it’s the footprint!

The pin highlighted green above should be the OUT_LEFT signal, but in the connector it actually connects to Ring, ie right, of an inserted jack. Which is surprising, seeing how it is positioned nearer to the back than the Tip / left signal.

Since we use the same footprint for the input jack, this means we’re swapping channels twice!

Fortunately the codec that we use, CS4271, has a Left/Right channel swap function. I’ll try to come up with a solution and include it in the next firmware update.

1 Like

Fascinating! Well debugged. The old double flip…

Good news about the channel swap function. In a pinch (and I’m sure you’ve thought of this!) there might be a post-modern hack-around option, something like (in Patch.h)

#if defined(OWL_ALCHEMIST) || defined(OWL_WIZARD)
enum PatchChannelId {
  RIGHT_CHANNEL = 0,
  LEFT_CHANNEL = 1
};
#else
enum PatchChannelId {
  LEFT_CHANNEL = 0,
  RIGHT_CHANNEL = 1
};
#endif

where we ignore reality and just change what things are named! :slight_smile:

1 Like

Yes that’s an option. But the condition must be evaluated at runtime, at least for patches compiled for our patch library, since they must work for all devices :blush:

1 Like