Mapping left and right Digital Out to different encoders

Hey, I have a question.

Is it possible to use the mapper, to map different encoders to left and right digital out in the alsamixer?

I managed to use the pisound micro mapper to control the the Digital Out with a potentiometer. Now i want to switch to encoders so the settings aren’t jumping between two values and if possible I want to control the left and right channel separately.

I know that I can adjust the left and right channel separately in the alsamixer when using a keyboard. But i couldn’t finde a way to controlling them separately with the micro mapper.

I hope you can help me and thank you in advance.

Hey, see the mappings example in the documentation: Pisound Micro Mapper - Pisound Micro Documentation

In particular the use of chan_a and chan_b. They specify the 0-based index, so use 0 for controlling the left channel, 1 for the right channel.

1 Like

Thank you, i think this willl solve my problem :smiley:

1 Like

Hey :smiley:
I managed to map my encoders to the line out and to make them work. Now i have two problemes.

  1. The encoders only work if i map them like this from B to A like this “<-” but not in both directions. If i map them in both directions the value is always 0.
  2. I’m not able to controle only the right or the left chanel. I can only controle both at the same time.

My .json looks like this:

{
    "$schema": "https://blokas.io/json/pisound-micro-schema.json",
    "version": 1,
    "controls": {
        "pisound-micro": {
            "gain_l_in": {
                "type" : "encoder",
                "pins" : [ "B03", "pull_up", "B04", "pull_up" ]
            },
            "gain_r_in": {
                "type" : "encoder",
                "pins" : [ "B05", "pull_up", "B06", "pull_up" ]
            }
        },
        "alsa": {
            "hw:pisoundmicro": [
                ["Lineout Playback Volume", { "alias": "line_vol" } ]
            ]
        }
    },
    "mappings" : [
        [ "line_vol", "<-", "gain_l_in", { "chan_a": 0 } ],
        [ "line_vol", "<-", "gain_r_in", { "chan_a": 1 } ]
    ]
}

Thank you in advance

Micro mapper.txt (728 Bytes)

Hmm, both of these things should work, I’ll look into this.

1 Like

Thank you :smiley: If you need anything from me just let me know ^^

Ok, I made some fixes, please update the Pisound Micro Mapper to 1.0.1-1:

sudo apt update
sudo apt install pisound-micro-mapper

It should work better now.

1 Like

The same fix was backported for bookworm too.

1 Like

Thank you so much :smiley: now it works flawlessly ^^

1 Like