Garth Dahlstrom wrote:
> Hi Jim,
> 
> I'm attaching a modified version of the Mk2 mapping file which has a jog 
> binding to HerculesMk2.jog_wheel and a script load to find that bit of 
> javascript in Hercules-DJ-Console-Mk2-scripts.js...   
> Hercules-DJ-Console-Mk2-scripts.js is a basic copy of the RMX version, 
> with most of the RMX specific stuff commented out (use a syntax 
> highlighting editor to save yourself a lot of grief) and just the wheels 
> and the wheel decay functions left.
> 

Thanks for this. I guess I'll just remove all the commented out stuff 
and this could easily be copied form the RMX one if needed.

> The currently enabled behaviour for the jog is scratchMode == true,  
> scratchMode == false just passes through to "[ChannelN] jog" (which 
> sounds the same as r2415), feel free to flip it back to false to get the 
> normal behaviour back.   You'll have to go into the midi dialog and 
> reload the mapping file each time you save the .xml or .js files to get 
> the new binds / javascript functions to load.   There's also a 
> HerculesMk2.debug flag that can be toggled to get more verbose messages 
> in the console.
> 

It seems to be working fine for me without changing any of your values.

> I realize the code is a bit of a mess (part of that is historical - i.e 
> channel used to be "[ChannelN]" now it is a midi chan &  part just 
> experimenting to get stuff to work)...  so feel free to change it anyway 
> you see fit.    The only requirement for it to work is the method 
> signatures must contain the correct arguments.

Are you saying here we're moving away from using [ChannelN]? Not sure 
what you're driving at.

I've implemented the following:

HerculesMk2.setLeds = function(value) {
     for (var LED in HerculesMk2.leds) {
         if (HerculesMk2.debug) print("Set LED: " + LED + " Value: " + 
value.toString(16));
         midi.sendShortMsg(0xB0, HerculesMk2.leds[LED], value);
     }
};

called from .init using HerculesMk2.setLeds(HerculesMk2.ledOff) to clear 
the leds. It's not reliable though, i.e. does not necessarily turn all 
the leds off (or turn them all on for that matter, if I pass the 
function HerculesMk2.ledOn). I typically have to reload the preset 2 or 
three time to get the all off (this at least proves I have the led MIDI 
addresses correct) Any thoughts on this?

I go the midi addresses of the leds by sending 0-127 to he device using 
the jog wheels. Do we have actual spec(s) for the Mk2 anywhere?

Also, the app currently doesn't get the current fader and eq values from 
the hardware and set them in mixxx accordingly when the app starts. Is 
this something that will also be done via the midi script? If so I can 
get on with it.

Cheers,

Jim.

> 
> Cheers,
> 
> -G
>               __
> --- == __/ t.O ==--
> http://stacktrace.org/
> 
> 
> On Sat, May 16, 2009 at 6:45 PM, James Evans <[email protected] 
> <mailto:[email protected]>> wrote:
> 
>     Garth Dahlstrom wrote:
> 
> 
>         On Sat, May 16, 2009 at 7:41 AM, Robin Sheat
>         <[email protected] <mailto:[email protected]>
>         <mailto:[email protected] <mailto:[email protected]>>>
>         wrote:
> 
>            On Sat, 16 May 2009, Garth Dahlstrom wrote:
>             > I didn't play with the jogs on the Mk2, but the ones on
>         the RMX
>            also have
>             > this problem.   This may be due to how HercJog option
>         works (or
>            rather that
>             > its been depricated).  
>            I think I fixed that up for the control MP3. I don't remember
>            exactly what it
>            was I changed, and can't check right now, but it was a simple
>         fix.
> 
> 
>         Hi Robin, thanks for pointing this out, I diff-ed the files,
>         looks like you are using "jog" instead of "wheel"...  I've
>         switched the Mk2 mapping to use that and it seems to work more
>         like 1.6.
>         Jim give that a spin (rev 2415) and see if it works better for you.
>          
> 
> 
>     Yep, it's good now thanks Garth. Thanks for your input Robin.
> 
>     I have read the midi controller mapping and midi scripting pages in
>     the wiki and it all seems pretty straightforward. Have a copy of the
>     existing Hercules DJ Console Mk2.midi.xml using a script binding in
>     place of hercjog. This simply calls a function to print "Wheel" when
>     either wheel is moved, just to prove I have it working.
> 
>     So I'm still up for producing or tweaking a midi script for the Mk2
>     in view of the deprecation of hercjog. You still want to send me one
>     Garth?
> 
> 
> 
> 
>             > I started writing a MIDI script (javascript) for
>             > the RMX to "decelerate" the speed of the track over time
>         after a
>            jog wheel
>             > movement, maybe this code would be useful for the Mk2 as well.
> 
>            I dunno if that's a good thing, at least for the control. If you
>            stop the
>            wheel spinning, do you want it to decelerate? I would have
>         thought
>            you'd want
>            it to stop immediately. If you want it to decelerate, then
>         you just
>            let it
>            spin free until it slows and stops itself.
> 
> 
>         Well, I think this is an effect of using wheel instead of jog.
>         The jog wheels give  +1 or -1 values (after applying a formula
>         to the midi vals) when they move, but they don't give you a 0
>         when they stop...  so you have to decay the momentum
>         problematically so they eventually get back to 0, if you follow me.
> 
> 
>     Yes, makes sense.
> 
>         If changing from wheel to jog works for pitch adjust, then I
>         only have to do this decay for scratching mode.
> 
>         -G
> 
> 
>         
> ------------------------------------------------------------------------
> 
> 
>         
> ------------------------------------------------------------------------------
>         Crystal Reports - New Free Runtime and 30 Day Trial
>         Check out the new simplified licensing option that enables
>         unlimited royalty-free distribution of the report engine for
>         externally facing server and web deployment.
>         http://p.sf.net/sfu/businessobjects
> 
> 
>         
> ------------------------------------------------------------------------
> 
>         _______________________________________________
>         Mixxx-devel mailing list
>         [email protected]
>         <mailto:[email protected]>
>         https://lists.sourceforge.net/lists/listinfo/mixxx-devel
> 
> 
> 


------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables 
unlimited royalty-free distribution of the report engine 
for externally facing server and web deployment. 
http://p.sf.net/sfu/businessobjects
_______________________________________________
Mixxx-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mixxx-devel

Reply via email to