How emulate cable disconnection in module?

Greetings!


I am developing a CV generating module. Its outputs are always connected to CV inputs of other modules. Because of this, the knobs sometimes stop working on the receiving modules (they are blocked due to the connected cable).


Is it possible on the side of my module to emulate a cable disconnect? In order not to block the knobs when I am not generating any CV.

Writing something like? output.setVoltage(NONE);


Thank you :slight_smile:

I’m pretty sure it’s not going to be possible to do what you’re asking.

Thank you, but what should I do then? I suppose this can be solved through Rack.API, but I don’t understand how yet.

Maybe this thread could help you

1 Like

Which module(s) disables its knobs when CV inputs are connected? Sounds like an unusual, maybe broken, design.

Maybe take a look at this modules https://midilar-controller.webnode.sk

1 Like

Submarine XF-202 is one.

Bogaudio VCM for example. If you connect cable to cv input, it disable volume knob.

Yes, very similar, thank you. But i need code example how it works:)

just contact @gc3 and midilar.controller@gmail.com and ask for help

the only thing I found out is APP->scene->rack->getCablesOnPort(PortWidget *port) may be a starting point … but I haven’t coded anything that deals with cables so far

This is a possible solution to my problem in a different way.

I agree. This came up recently here. Most modules do not disable their knobs when a cable is connected. There are a minority that do. That’s just they way they are designed. It first approximation your attempt to re-design these odd-ball modules at run time is maybe not something you need to do?

FWIW, I consider these modules to be broken by design. At least one other person here likes modules that do this. I didn’t quite understand the logic, but they seemed to know what they were talking about.

Anyway, most modules won’t do this. Why not release your module without the heroics and see what people think?

It strikes me that the best way to resolve this, would be to create an intermediate module with an input, an output and a knob. (And probably some more controls for flexibility).

Put that between the source module and the module you consider broken. Then you still have a knob to turn, albeit not the original.

2 Likes

Yep, I think that’s why there are modules that are Attenuverters.

2 Likes

Hi @wtfedor (and welcome to the forum!)

The long-delayed TapPatch (whose cable-management code is based on Stoermelder T7, which is what’s used by the Midilar controller) connects and disconnects actual Rack cables programmatically (just as if you’d done it by mouse), but I’m not sure that’s what you’re wanting to do.

If I understand, you’re trying to trick an actually connected module into thinking it doesn’t have a cable connection, right? In that case, I think your only option is a zero-channel cable (see the manual).

I agree with @carbon14 and @Squinky that using an intermediate module is a much simpler (and possibly better) solution, but if you really need this as a module-level feature, switch the polyphony to zero when you’re not generating CV and it should work. I haven’t tried this myself, but it’s possible in theory and according to the manual description.

[edit: I just looked at the V2 API for setChannels() and I’m not sure this is supported in V2. I’ll investigate.]

[edit 2: ok, setChannels() doesn’t let you do this. You could try setting channels directly, but direct access to this is deprecated. These are really obscure features (see Andrew’s note in the docs asking anybody who did this to email him :slight_smile: ) I’ll try this next time I’m working on TapPatch and see what it does, or I’ll glance at the cable/port code if I have a moment before then.]