Assign CV to list control

I would like to ask for a feature to be able to assign CV ports to list controls. Currently we can assign CVs to toggle things on/off but not to list selection controls like the preset selection list or “channel” list for the stereo switch plugin etc.

This could be defined in a few different ways the best of the options I suggested below IMO is the first option:

1) Option 1 the 0-10V range of a CV is event split into N list select items

So if we have a list select with 4 items and assign a CV to it, we will select:

  • item 0 : if CV voltage is in range [0,2.5)
  • item 1 : if CV voltage is in range [2.5, 5)
  • item 2 : if CV voltage is in range [5, 7.5)
  • item 3 : if CV voltage is in range 7.5 or above

This means any CV can be used to select any list items though it doesn’t behave quite like existing rotary knobs which always go through the items one at a time, instead it jumps to whatever selection the CV is at. You may need to add some smoothing to this as well.

2) Option 2 edge triggered up/down list

  • CV at 5V generally, means no change in list selection.
  • If the CV goes above 7.5V treat that as an up list selection like the clockwise direction of the rotary knobs
  • If the CV goes below 2.5V treat that as a down list selection like the anti-clockwise direction of the rotary knobs

The idea of this is that it is more consistent with rotary knobs, however it isnt great for assigning to multiple devices generally as they can get out of sync.

Background Use-Case

Some background on one use case for this. I was trying to use two stereo switch plugins at the same time so I can redirect the input+output of a stereo looper plugin at the same time to switch between recording/playback at the start of the audio chain to the end of the audio chain.

This doesn’t work as I cant assign the “channel” selection list from multiple things to a single knob. So I thought maybe I can use a CV to do this as it allows multiple assignment already.

I posted about this briefly in the multi assignment feature request, but this is a different request to allow CV to be assigned to list items:

In the meantime I plan to create a new plugin duplicating the stereo switch plugin but changing it to a use an on/off control instead of enum selection list since it only has two states and doesnt really need a list enumeration. If that is helpful to anyone I am happy to push it to the repo.

5 Likes

If you want go that route, you can simply take out the enumerator option from the plugin metadata and this will work as-is.

In any case, we were just discussing this in the team a few days ago.
I have a few reservations against doing this for all lists, because some list values are not sequential, but most are which is what people want to use them for anyway.

4 Likes

I was considering the same thing. I didn’t realize that could be changed in the metadata! I’ll try it out.

1 Like

Thanks I successfully edited the metadata for the lv2 plugin directly on the device instead of building a new plugin.

To make this usable by others would it be helpful to create a new plugin called toggleswitchbox or something like that which can be used like this permanently instead of this quick hack?

I dont know if changing the official switchbox will break existing pedal boards or not.

For others looking into this, what I did was:

SSH onto the device and looking at /root/.lv2/fil4.lv2/fil4.ttl “HighPass” control as a reference example for a toggle switch that can be assigned to CV I changed /root/.lv2/switchbox_1-2_st.lv2/switchbox_1-2_st.ttl

From:

[
    a lv2:ControlPort, lv2:InputPort;
    lv2:index 6;
    lv2:symbol "Switch";
    lv2:name "Channel";
    lv2:portProperty lv2:integer;
    lv2:portProperty lv2:enumeration ;
        lv2:scalePoint [rdfs:label "1"; rdf:value 0];
        lv2:scalePoint [rdfs:label "2"; rdf:value 1];
    lv2:default 0;
    lv2:minimum 0;
    lv2:maximum 1;
];

To:

[
    a lv2:ControlPort, lv2:InputPort;
    lv2:index 6;
    lv2:symbol "Switch";
    lv2:name "Channel";
    lv2:portProperty lv2:integer, lv2:toggle;
    lv2:default 0;
    lv2:minimum 0;
    lv2:maximum 1;
];

The other thing I needed to do was to shift+refresh the GUI page to ensure the new toggle was CV assignable. Without this it was still not assignable.

4 Likes

resurrecting this old thread to flag this because I’ve just seen how this works with an updated plugin - the Mirrorz plug-in used to have the switch for normal/double/half speed on a rotary control, switch at 0, 0.5 and 1. When this was the case, I assigned a random S&H CV control with a fairly slow LFO to it so it would completely randomly choose which to play back at, and it works absolutely beautifully.

Now that the plugin has been updated and the option is a list, it’s STILL assigned to the CV and still switches between them randomly. Which is also beautiful. There’s just no parameter for changing the assignment, or indeed adding this function again if I install it on a different board.

This is perhaps the most valuable function of Mirrorz for me, being able to do this switching, so the CV assignment is vital - can we set it so that CV controls are assignable to lists? I’ve come across other list-based parameters today that I wanted to randomise but couldn’t, so would love to be able to choose that for all lists. :slight_smile:

5 Likes

Hi Steve,
To go back to a rotary control (and CV assignment):
In the MIRRORZ_dsp.ttl file you just have to replace:

a lv2:InputPort, lv2:ControlPort ;

    lv2:index 10 ;
    lv2:name "speed" ;
    lv2:symbol "speed" ;
    lv2:default 1.0 ;
    lv2:minimum 0.5 ;
    lv2:maximum 2.0 ;
    lv2:portProperty lv2:integer;
    lv2:portProperty lv2:enumeration ;    
    lv2:scalePoint [rdfs:label "HALF_SPEED"; rdf:value 0.5];
    lv2:scalePoint [rdfs:label "NORMAL"; rdf:value 1.0];
    lv2:scalePoint [rdfs:label "DOUBLE_SPEED"; rdf:value 2.0]; 

with

a lv2:InputPort, lv2:ControlPort ;

    lv2:index 10 ;
    lv2:name "speed" ;
    lv2:symbol "speed" ;
    lv2:default 1.000000 ;
    lv2:minimum 0.500000 ;
    lv2:maximum 2.000000 ;

You’ll find a short tuto here showing how to edit a .ttl file from a plugin build with Max Gen~ on a Mac

Let me know if you need help.

8 Likes