On Fri, Jul 7, 2017 at 5:37 PM, Daniel Schürmann <dasch...@mixxx.org> wrote:
> Hi Harry,
>
Hi!
> I have looked a bit closer to the concepts of Ctlra
>
Thanks for looking!
> and it has a strong issue: "The device specific files are written in c."
>
Yes it written in C. This is a deliberate design choice, which has various
consequences. Some of them are positive, other are negative.
These are some benefits: performance, availability of various libraries for
device access (bluetooth, MIDI, serial, others), ability to easily create
wrappers to other languages, integration into low-power/embedded systems
(RPi, beaglebone, etc), "lowest-common-denominator" of programming
languages.
Downsides include (as you point out); typically a more static workflow,
slower development pace, libraries update slower (although even if the
libraries were JS, that wouldn't solve the issue, this is a distro
packaging rate issue regardless of what feature/project we talk of).
> In terms of am everage use, a library is updated by the various Linux
> distros in a two years cycle. I am in doubt that the manufacturer a will
> ship a Ctlra build along with there hardware. So it takes about two years
> after a brand new controller reaches the Ctlra shipped with distros.
> Looking at pre-installed default mappings Mixxx suffers the same issue.
>
> There is only a minority of users a talented musician, spending a
> reasonable amount of money for a new controller and a talented C programmer
> at the same time. It is a high hurdle to set up an build environment,
> reengineer the controller, build a library and make it work.
>
Exactly - which is why I feel that unless we integrate this all into a
library that we can all benefit from, the controller situation with the
Linux platfrom will not improve.
> If the user actually manages this, it is another hurdle to bring the
> device specific into a rock solid maintainable state and merge it upstream.
> And even if the user manages all these, the upstream maintainer cannot
> verify the proposed code, because he most likely did not own the new shiny
> controller as well. Mixxx has the same issue regarding pre-installed
> default mappings.
>
Correct again - which is why we must be vigilant to help contributors who
have devices - perhaps even find a way to collaborate on device support.
> .... fortunately Mixxx has a point and click GUI to map even unknown
> controllers.
>
Only for MIDI controllers IIRC? Or does it "magically" work for USB HID
devices too? If so, please tell me more - I'm all ears.
> It provides an outstanding scripting engine that is relative easy for
> simple tasks but has the full power of a Touring-complete language.
> Integrating a brand new hid mapping still requires bit smashing, but at
> least it can be done with a simple text editor, nothing more.
>
So can writing scripts in C, by using TCC and writing "C script files". Its
not a common workflow (yet) but it really is a fantastic way of writing
Mixxx bindings. I know because the POC of Mixxx with Ctlra integration
works beautifully - DJ tracks while updating the mapping for a device using
C as the language.
Did you get the point?
>
I understand your concern yes - and believe me I have thought about exactly
this issue, but stand with the choice I have previously made.
> How to solve this?
>
TCC. TCC allows us to dynamically script in C, removing the issue of
"compiling". If you haven't yet, please look at the video here, where I
demonstrate the value of TCC:
https://youtu.be/-bwynA7HRow?t=2038
> Not sure if it works, but how about benefit from all the work already done
> in Mixxx? Instead of making Ctlra a new controller type in Mixxx we can put
> it between the Mixxx engine an the Mixxx controller mapping.
> This way all openAV apps can benefit from the existing mappings in Mixxx
> and from the sounds scripting language to solve hard issues. Mixxx can
> benefit from modern controller support contributed directly to openAV.
>
> What do you think?
>
I see your point of view - and understand the concern about the work. Yes
there is a lot of work to be done, and it requires both skilled programmers
and access to the device itself. I don't see a method to avoid that -
regardless of the tooling, programming requires skill and that's that.
My reasons for creating Ctlra are more than an attempt to bring more modern
controllers to Mixxx - it is to enable any audio application easily
integrate support for controllers. This means that the device is available
with all its functionality: that includes HD screens and fancy features. I
do not see a way to allow HD screens be updated from JS - another reason
why C is the language I chose for Ctlra.
In short, I think I'm aware of the magnitude of the work required to make
Ctlra a useful library - but I see this as work that can be reused
throughout the community if we design and implement it well, which
ultimately provides more value to the community than providing some Mixxx
specific method to access these devices. Ctlra is design to be integrated
with OpenAV projects, Mixxx, and many others - so Mixxx is not the
sole-target for this functionality, and hence some compromises must be made
to keep Ctlra generic enough to be useful to everybody.
> Kind regards,
>
> Daniel
>
Thanks for your input, appreciate your time and thoughts. Does the TCC /
C-scripting concept resonate with you as something that could work? I think
its really neat, and a very powerful workflow :)
To answer your previous email, yes I'm currently working towards
integrating Ctlra with Mixxx, although I can't promise any timelines, I
have implemented a POC already (as mentioned in the video), and now doing
implementation #2 for upstream. The steps you detail make sense, with a few
tweaks - I see Ctlra as a standalone library, that Mixxx can statically
link to (aka; don't directly include the files, just link static if
available, otherwise build a specific checkout of the Ctlra git repo).
Looking forward to hearing your thoughts, -Harry
PS: Thanks for the kind words below!
Am 07.07.2017 1:07 vorm. schrieb "Daniel Schürmann" <dasch...@mixxx.org>:
> Hi Harry,
>
> welcome to Mixxx.
>
> That is awesome. :-)
> A BIG thank you to make this real!
>
> I have just skimmed over the linked resources and it looks like this
> closes exactly the gap between Mixxx and HID controllers.
>
> Currently Mix has HID controller support, but it requires scripting, and a
> lot of bit mashing to make a controller work.
> Unlike MIDI controllers, you cannot learn them via point and click GUI.
>
> You need a lot of knowledge of the interns of the controller.
> It is a great idea to put this knowledge in a single library and share
> these info between all Linux Audio Projects.
>
> Are you going to contribute to Mixxx an work towards an Ctlra interface?
>
> Here are some links:
>
> Our HID API js is described here:
> https://www.mixxx.org/wiki/doku.php/hid_device_api
>
> Which is used for example here:
> https://github.com/mixxxdj/mixxx/blob/8d191bf7ce2d62d24c6e0f
> fac4b2afd7359afa8a/res/controllers/Nintendo-Wiimote.js
>
> Here is a good introduction how we work in the Mixxx project:
> https://www.mixxx.org/wiki/doku.php/bugfix_workflow
>
> If I understand the Ctlra concept correct, it can finally replace all our
> controller APIs on a long run. On a short run, it can be used parallel to
> portmidi, right?
>
> The portmidi implementation can be found here:
> https://github.com/mixxxdj/mixxx/tree/master/src/controllers/midi
> https://github.com/mixxxdj/mixxx/blob/2cf29ba14da099a9d19f43
> 5a71b2ee95b9f4815e/build/depends.py#L28
>
> Can we roughly name the steps to do? :
> * crate src/controllers/ctlra
> * copy all files over
> * adopt them for ctlra
>
> Of cause there will be a lot more things to consider.
>
> Do you see a chance to port this to Mac and Windows as well?
>
> Kind regards,
>
> Daniel
>
>
>
>
>
>
>
>
>
>
>
> Am 06.07.2017 um 23:57 schrieb Harry van Haaren:
>
>> 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
>>
>>
--
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