Hi Be, Hi Harry,
I share Be's concerns about TinyCC compiler. On one hand it is available
in the Ubuntu repos, on the other hand it is "not recommended for
production use" in the explaining text.
But that is not a big problem. For me it makes no difference if we
dynamic ling a device.so file generated from TinyCC or GCC.
GCC is available by default and calling it from ctlra or manual should
not a big issue. We most likely cannot rely on TinyCC for Windows anyway.
I think we have to distinguish between two areas of device depended code.
1. The driver part, which presents the controller in a generic way like
it already happens with midi controllers
2. The application mapping, to adapt application features to controller
features.
If I get it right, ctlra aims to cover only 1. Even if we have a ctlra
controller in Mixxx, we need to adapt the signals to Mixxx Control
Objects using xml or js files.
From this point of view, it would be kind of odd to have an other
scripting engine in action just for 1. If this is also the QT js engine
this would be great for Mixxx, but not for all other Ctlra using
applications not Qt based.
From this point of view a pure C implementation works probably best.
The other point of view is the knowledge out there among audio artists.
Here are two stats sources:
https://octoverse.github.com/
https://www.tiobe.com/tiobe-index/
> 1. Is it possible for a controller mapping to crash the application?
> That should not happen under any circumstance.
If we go for C drivers, yes. This could be handled by putting Ctlra into
a quarantine process, but this consumes the c performance gain and would
put whole Ctlra into question compared to OSC.
> 2. If a user wanted to replace a precompiled mapping that came with
> Mixxx with one they made or got online, what would that process go
like? Would the user need to install TCC? Would we have to include TCC
in Mixxx?
Mixxx should already have access to a C compiler, if we decide to go the
C way. The other option would be to share pre-compiled *.so files.
But they are not cross platform and can contain a trojan.
> 3. The programming language. It is a lot easier to find someone who
> knows JavaScript, or at least kinda knows JavaScript enough to get by
> for a small project, than it is to find someone who knows C. For people
> with minimal or no prior programming experience, higher level languages
> are much easier to learn.
This is not a biggest issue for me, because even if you know Javascript
or likewise C, you cannot instantly start over to hack up your driver.
You need a lot of reading and probably reverse engineering, which is
probably harder than adopt a sample script of a partly unknown language.
IMHO the success of Ctlra depends to a high degree to the numberer of
supported popular controllers. If we manage to push this number up, all
the technical issues are secondary. If we fail, Ctlra is just another
controller interface to support. https://xkcd.com/927/
Kind regards,
Daniel
Am 08.07.2017 um 22:00 schrieb Be:
Thanks for taking up this project! Reading your proposal on the wiki
page, the way you intend to integrate into Mixx's ControllerManager and
Controller classes makes more sense now.
The big question I am wondering about is the process of creating the
mappings from Ctlra events to Mixxx's state. Your idea to use TCC is
interesting and I think it's no problem for a proof-of-concept, but I am
doubtful it would be a good way to integrate Ctrla support into
applications for several reasons:
1. Is it possible for a controller mapping to crash the application?
That should not happen under any circumstance.
2. If a user wanted to replace a precompiled mapping that came with
Mixxx with one they made or got online, what would that process go like?
Would the user need to install TCC? Would we have to include TCC in Mixxx?
3. The programming language. It is a lot easier to find someone who
knows JavaScript, or at least kinda knows JavaScript enough to get by
for a small project, than it is to find someone who knows C. For people
with minimal or no prior programming experience, higher level languages
are much easier to learn.
4. Mixxx, and other applications, already have systems for supporting
MIDI controllers. Like Mixxx, some of these applications already have
their own scripting environments. Maintaining code and documentation for
separate ways for mappings to interact with the application would be a
burden for the application developers. For controller mapping
developers, their experience would be totally different depending on
whether they were mapping a MIDI controller or a Ctlra supported
controller. This would be a barrier to sharing knowledge and code
between people mapping MIDI controllers and Ctlra supported controllers.
5. TCC is unmaintained. The last release was 4 years ago. If we found
issues with it, it would probably be upon us to fix them. I for one
would much rather spend my time working on Mixxx than a C compiler.
So, I think it would make more sense to expose Ctlra to Mixxx's existing
JavaScript environment for controller mapping. There would only need to
be two capabilities added for this to work:
1. Scripts would be able to register JavaScript callback functions that
would be called when particular Ctlra events are passed to Mixxx.
2. Scripts would need to have a way to send output messages to Ctlra.
There should be a way to freeze/unfreeze the sending of output messages
so many outputs could be updated simultaneously in a single HID packet.
I have written a proposal for how to do this with MIDI:
https://mixxx.org/wiki/doku.php/registering_midi_input_handlers_from_javascript
It would be great if we could create JS APIs that are almost identical
for MIDI and Ctlra.
On 07/06/2017 04:57 PM, Harry van Haaren wrote:
Hi All,
First of all - this is my first post to the Mixxx-devel list, so a
brief intro is in order;
I'm Harry van Haaren, developer of the OpenAV audio software, bit of a
music/tech/linux head :)
I've recently been working on improving controller support in Linux
audio land, in particular
what I call "modern USB HID" controller devices (think DJ controllers
like Akai/NI/Abletons range).
I've developed the Ctlra library as OpenAV, which provides access to
these hardware devices
on Linux. The library allows hotplug and various other "advanced"
features like accessing
screens on devices.
I'd like to integrate Ctlra into Mixxx - to provide access to hardware
currently not available
to Linux users, and also to provide hotplug support to those
controllers. I've created a blueprint
on Launchpad[1], and written an introduction on Ctlra and how I
propose to integrate it in Mixxx[2].
Finally, there is a documentation page on what Ctlra itself achieves
here[3], and the source is here[4].
If you have an interest in hotplug of controllers, controller support
or hardware on Linux,
do have a read of the wiki page and others, and I'd appreciate your
input on the ideas!
Thanks for all your efforts on Mixxx so far, onwards and upwards!
-Harry of OpenAV
[1] https://blueprints.launchpad.net/mixxx/+spec/ctlra-controller-support
[2] https://www.mixxx.org/wiki/doku.php/ctlra_support
[3] http://openavproductions.com/doc/ctlra.html
[4] https://github.com/openAVproductions/openAV-ctlra
--
http://www.openavproductions.com
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Get Mixxx, the #1 Free MP3 DJ Mixing software Today
http://mixxx.org
Mixxx-devel mailing list
Mixxx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mixxx-devel
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Get Mixxx, the #1 Free MP3 DJ Mixing software Today
http://mixxx.org
Mixxx-devel mailing list
Mixxx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mixxx-devel
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Get Mixxx, the #1 Free MP3 DJ Mixing software Today
http://mixxx.org
Mixxx-devel mailing list
Mixxx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mixxx-devel