On 07/06/2015 03:57 PM, Juan Pedro Bolívar Puente wrote: > Hi! > > On 06/07/15 22:20, Be wrote: >> Yes, I am aware of Mixco. I hadn't looked into it much before because I >> don't know CoffeeScript and have no experience with Node.js. It does >> look capable of doing at least some of the things I put on the wiki. >> However, the example scripts aren't all that straightforward to me. I >> think that is both because I have never used CoffeeScript before and >> something about how the examples were written. So, at least at first >> glance, Mixco doesn't seem to meet the most important design goal to me, >> which is reducing the barrier to entry. Maybe Mixco could be improved so >> that it is more straightforward to new comers. > > I agree that Mixco, being very influenced by functional programming and > stuff is probably not very easy at first. On the other hand, its goal > is not just to write the scripts without XML, but also provide higher > level "widgets" that can be reused across scripts and that take care of > more things (e.g. switching LED states between modes, etc.) Btw, there > are some scripts written in JavaScript, do you find this also unreadable? > > > https://github.com/arximboldi/mixco/blob/master/script/novation_twitch.mixco.js
One aspect of the Mixco examples that is confusing to me are the numerous calls to ccId, noteId and similarly named functions. Why not just use the plain numbers? Also, I don't really understand the details of how to use the objects representing physical controls (knob, button, slider, encoder, meter). Documentation explaining the differences between all of those would be helpful. > > On the OP topic: I think your proposed sintaxes look good and could be > useful, it's nice that you open this discussion! > > On the other hand, I have the impression that what we really need is a > two simple functions `map[Output,Input]Control(channel, value, group, > name, options)` that allows to define a MIDI mapping at run-time. This > would be the JS equivalent of the <control> tags. > > On top of this low-level API many richer high-level APIs can be > explored, including your JSON-style formats, Mixco, and further. But > most importantly, it would be possible to write advanced controllers > with JS mode switching, that are as performant as the pure XML scripts. > Right now, a important limitation in the framework is that it's all or > nothing, either you bind a MIDI signal statically in the XML, or handle > the MIDI events completely in JS -- an interesting approach is to be > able to create direct binding for Mixxx controls from JS that then > bypass the script for the individual events, providing better performance. > > Cheers! > > JP > Yes, I think the gap between making simple mappings and programming should be bridged, kind of like how shell scripting is not really different from just using the shell. A large amount of the code in the Electrix Tweaker mapping I wrote, and likely most JS mappings, is simple functions that just check the value of a modifier or engine state then change one Mixxx control with engine.setValue depending on those conditions. It would reduce code duplication and I think be more intuitively organized to have functions that respond to modifier buttons and change the appropriate mapping objects. ------------------------------------------------------------------------------ Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/ _______________________________________________ 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