Quick Sign In:  

Forum: VirtualDJ Plugins

Topic: dac3 jogwheel mapping

Dieses Thema ist veraltet und kann veraltete oder falsche Informationen enthalten.

jaakkoPRO InfinityMember since 2006
Hello Jpboggis or someone else!

I'm working on my own dac3 mapper and it looks promising. I have configured all the buttons without problems.

Next I'd like to make jogwheel as versatile as possible.

In jpboggis dac mapper 1.2 there is

shift+jogwheel for file browsing and
shift+folder+jogwheel for folder browsing

they are so great but how could i make them to work in my own mapper?

Also i'd like to add following:

CP + jogwheel for zooming in and out rhythm window
R + jogwheel for adjusting CBG.

Now i have code:

HRESULT CDAC3DefaultMapper::OnJog(int chan,int jog)
{

char st[64];
char* channel=chan?"2":"1";
SendAction("jogwheel",channel,IntToStrRelative(jog*2,st),true);
return S_OK;
}


Is it just as easy as changing action "jogwheel" to another?

I have tomorrow first gig with dac-3 and i'd like to get everything mapped before that...


 

geposted Fri 21 Jul 06 @ 3:28 pm
To get the jogwheel to perform different actions based on combinations of buttons being held down, you need to store the status of each relevant button in a variable. The default mapper already does this for SHIFT and CP:


case DAC3_SHIFT:
shift[chan]=(down!=0);
break;



case DAC3_CP:
cpdown[chan]=(down!=0);
break;


...So to allow file browsing with SHIFT+jogwheel, it's simply a matter of testing whether SHIFT is pressed or not, e.g:


HRESULT CDAC3DefaultMapper::OnJog(int chan,int jog)
{

char st[64];
char* channel=chan?"2":"1";

if(shift[chan]) {
SendAction("browser_updown",channel,(jog < 0) ? "-1":"1",true);
} else {
SendAction("jogwheel",channel,IntToStrRelative(jog*2,st),true);
}
return S_OK;
}


For other button combinations, you will need to add a variable to store their current state, e.g:


case DAC3_R:
rdown[chan]=(down!=0);
SendAction("pitch_reset",channel,NULL,down);
break;


...And define a the rdown variable in the private section:


bool shift[2],cpdown[2],rdown[2];


Also, I do a test on Song[chan].Playing so that the jogwheel can perform a fine pitchbend while playing.
 

geposted Sat 22 Jul 06 @ 9:58 pm


(Alte Themen und Foren werden automatisch geschlossen)