Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mappa initial implementation #241

Closed
wants to merge 1 commit into from
Closed

Conversation

harryhaaren
Copy link
Member

This commit is the first commit to support Mappa,
the "mapping" solution from the Ctlra project.

The code here implements two targets as callback
functions, making use of the Mappa "token" when registering
a target. The track-id is stored in the token, allowing easy
identification of the software parameter to tweak.

The main UI thread polls the mappa library, which internally
handles all Ctlra APIs. The application sees its callbacks
being called when a control surface is moved. The callbacks
are invoked in the same thread as that which calls mappa_iter().

The mapping from control-surface to software-target is done using
a simple .ini file, which the user supplies. The format is still
in flux, but the basic structure is not expected to change.

The user provides multiple "layers" of mappings, and Mappa provides
a mechanism to switch between these layers on the fly. This enables
complex multi-layered controller setups, without any application
logic complexity.

Note that the latest commit from the Mapping PR of Ctlra is required
in order to get access to mappa.h, see details of PR here:
openAVproductions/openAV-Ctlra#87

This resolves the following Ctlra issue to do real testing with Luppp:
openAVproductions/openAV-Ctlra#90

Signed-off-by: Harry van Haaren [email protected]

This commit is the first commit to support Mappa,
the "mapping" solution from the Ctlra project.

The code here implements two targets as callback
functions, making use of the Mappa "token" when registering
a target. The track-id is stored in the token, allowing easy
identification of the software parameter to tweak.

The main UI thread polls the mappa library, which internally
handles all Ctlra APIs. The application sees its callbacks
being called when a control surface is moved. The callbacks
are invoked in the same thread as that which calls mappa_iter().

The mapping from control-surface to software-target is done using
a simple .ini file, which the user supplies. The format is still
in flux, but the basic structure is not expected to change.

The user provides multiple "layers" of mappings, and Mappa provides
a mechanism to switch between these layers on the fly. This enables
complex multi-layered controller setups, without any application
logic complexity.

Note that the latest commit from the Mapping PR of Ctlra is required
in order to get access to mappa.h, see details of PR here:
openAVproductions/openAV-Ctlra#87

This resolves the following Ctlra issue to do real testing with Luppp:
openAVproductions/openAV-Ctlra#90

Signed-off-by: Harry van Haaren <[email protected]>
@harryhaaren harryhaaren mentioned this pull request Jul 14, 2018
@georgkrause
Copy link
Contributor

@harryhaaren Where can I get an information how to use this? I managed to built, but don't know what to do now...

@coderkun
Copy link
Contributor

Based on @harryhaaren’s feedback I can report some progress in testing this branch:

To use a virtual device I started Luppp with the two environment variables CTLRA_VIRTUAL_VENDOR and CTLRA_VIRTUAL_DEVICE (together with LD_LIBRARY_PATH for starting Luppp without installing AVTKA globally):

LD_LIBRARY_PATH=~/.local/lib/ CTLRA_VIRTUAL_VENDOR="Native Instruments" CTLRA_VIRTUAL_DEVICE="Kontrol Z1" ./luppp

Additionally I copied the ini-file from the PR to the build directory. To get rid of some error messages, I also had to add the section [mapping] with layer_count = 2 to the ini-file as well as a name key/value pair to [layer.0] and [layer.1].

With these changes I was able to start Luppp without error messages from Ctlra/Mappa. However using any control element on the virtual device did not effect anything in Luppp and vice versa. Maybe I selected the wrong virtual device or the ini-file does not match the device? Or am I doing something wrong here?

@harryhaaren
Copy link
Member Author

Good progress!

There needs to be actual mappings in the file itself, making Mappa bind the application "target" to the hardware device name. Current script that is commited in the repo is probably out of sync... That said, the Mappa create() API has recently changed - so I need to refactor and sync some things before pushing fixes.

So, for now it looks like there isn't anything worth testing here right now - I'll keep yee posted.

@georgkrause
Copy link
Contributor

@harryhaaren Is there any progress here or can you give us some pointers how to finish this?

@harryhaaren
Copy link
Member Author

THere is progress in general with Ctlra, absolutely yes. I'm not 100% that Mappa is the correct solution - while I believe it to be a very good (technical) solution to the mapping problems, many developers I talk to seem to be hesitant and have concerns over if it will really work.

I'm focussing on enabling Ctlra more first, and will revist Mappa as a mapping solution at a later time. Hence, for now the Luppp/Mappa integration (although I still feel it to be very good solution) has become dormant for now. I'll close this - but will re-open when Mappa/Luppp is re-started at a later date.

@harryhaaren harryhaaren closed this Apr 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants