Send CC values back to controller

In a galaxy far away in a time far back I tinkered with Midibox stuff. I once built a Midibox SEQ4. From that time some spare parts were left. One is the core of the midibox ecosystem, a STM32 F4 module with carrier board. Together with MidiboxNG I want to build a controller with 16 encoders and 16 small Oled scribblestrips. MidiboxNG is a kind of script language for creating controllers.

So I created a test setup to get a proof-of-concept.

the only code needed for this is:

RESET_HW

DIO  port=J10A  emu_din_sr=1

ENC n=  1   sr=1 pins=0:1   type=detented1

EVENT_ENC id=1 fwd_to_lcd=1 type=CC chn= 1 cc= 16 lcd_pos=1:1:1 label=“%C&bENC #%2i @(1:1:5)%d”

This code sends CC16 on channel 1 to midi out (first of 4 virtual USB midi devices) and udpdates the text on screen.

Zynthian recognized the 4 midi devices and I can learn a zynthiancontrol to the controller, no problem, so sending midi works.

The MidiboxNG app is designed to receive midi too. When I send midi CC16 on channel 1 to the controller the oled updates the value and after that, the encoder resumes with the new value. I have tested this and it works.

My question, is it possible te send the zynthian-encoder value back to the controller when I turn the encoder on the Zynthian itself.

Cheers, Kees

4 Likes

Sounds like a job for a piece of crtldev code….

This is a mechanism for including python code in the definition of a device driver so that miracles can be performed with a standardized interface.

Best search on the forum for details and document freely with pictures, bells and marching bands.

3 Likes

I know the concept of ctrldev devices, but looks like the ctrldev drivers are more catered to pad and mixerfunctions. The lack of documentation makes it hard to grasp, without hours and hours of digging….

But perhaps this is the route. Because once this works, I want Zynthian to send more parameters via sysex (controllernane, range, etc..), and recall them every time I switch chain :wink:

They can do considerably more than that, but that was certainly the motivation for their creation.

The identifying of a specific device being connected is their starting point and once this is done then the functionality of the zynth is easily exposed and python level interactions of which mucking around with MIDI are available in a standardized form that, hopefully, save as ton of work.

It’s how best to identify and interact with a half conscious MIDI device and allows you as much control as can be offered.

The second aspect is how one interacts with the zynthian to display & enact events within your particularly defined world.
I would favour an lv2 MIDI device hat can be added into a chain as a display interaction mechanism, which would present graphical elements in the traditional zynthian parameter model.

A simple GUI library and voila ! user coding defined interaction via the ctrldev & lv2 component.

I’m splashing around in this area as well with OSC commands over wifi and am at a point where I hope to develop something faintly generic.

The lack of documentation makes it hard to grasp,

I have written up various rambling descriptions of doing this some time ago, but both blocked on compilation and I moved on to other tasks.

I presume what I wrote got tidied out as it was getting pretty long in the tooth.
Given I suspected many people coming to this might well be coming at coding for the first time, I wrote an awful lot of development stuff on how to develop the overall environment that allows you to start the coding.
For instance there is a lack of a decent 50/60Hz notch filter in zynthian and I got as far as preparing an LV2 environment and documenting to that stage. And there are various ctrldev bones littering the wyleu git hub repository.

I suspect I’m a little bit closer this time having got OSC working reliably from two devices over wifi and can this develop the ctrldev element first and then proceeding to the lv2 MIDI device from there.

It’s a plan of sorts and I’m flattered that such blundering have in the past assisted a little in the direction the zynth has moved.

The soup hasn’t got any better thou’

2 Likes

Two almost identical wifi controllers with a zynthian hanging around to display stuff for overall pleasure and profit whilst, else where the zyncajon and the zynbasspedals awaits developments.

2 Likes