Ingreso rápido:  

Forum: VirtualDJ Plugins

Tema: DAC2 & DAC3 SDK on website cause crashs! - Page: 1

Esta parte del tópico es antigua y puede contener información incorrecta para la nueva versión.


Ahh, Ok, well sort of. I'm trying to create a DAC2 plugin, but when I first tried the default code from here, touching the inner jog wheels would crash VDJ.
I think the SDK on the website may have been made for an older version of VDJ, as here, both the jog wheels and the pitch bend buttons would crash VDJ, Play and pause seemed to work ok though.
On further testing it seems to be all the buttons that contain +128 -128 ect. All buttons work except for the inner jog wheels, and the bend buttons, a problem in the code i feel!

SendAction("pitch_bend",channel,"+512");
Removing the +512 stops the crashes, but of course the bend won't work either!

And it looks like jpboggis had the same problem with the DAC3 SDK!
jpboggis wrote :
When I first starting work on the DAC-3 mapper, I found that using constant values (E.g: "+128") with SendAction() in the default DAC-3 mapper SDK causes a crash. I think this is probably due to the fact that SendAction() needs to manipulate (Write to) the string in some way for certain types of values (E.g: "+128" to split the + and 128.) A constant is supposed to be read-only and not modified, which triggers the crash.


Could someone from the dev team PLEASE fix this. Oh and DJcel, is there something up whith your pm's, I've been messaging you for ages and never recived any replies, Support says they can't help either, what do I do??
 

Mensajes Sat 10 Jun 06 @ 8:00 am
UPDATE:
I managed to fix the problem by adding strparam(+512) instead of "+512".

My problem now is that on pitch_bend the software doesn't see the release of the key, so bend up and bend down works, but when you lift your finger, it keeps on bending.

Going by the keboard shortcuts I need to add "temporary" to the +512, but on trying to compile I get

dmc1mapper.cpp(97) : error C2065: 'temporary' : undeclared identifier
dmc1mapper.cpp(100) : error C3861: 'temporary': identifier not found, even with argument-dependent lookup

Where do I add this, Somewhere around "strparam" i expect?
 

Mensajes Sat 10 Jun 06 @ 11:36 am
strparam() just converts an integer variable to a string. Try using my CharStr() function to convert a constant string to a variable:

// Convert const char * to char * string
inline char *CharStr(const char *val,char *str) { strcpy(str,val); return(str); }

...I.e:

char buffer[128];

SendAction(action,channel,CharStr("temporary +512",buffer));

(Where action and channel are the VDJ action and channel.)
 

Mensajes Sat 10 Jun 06 @ 7:06 pm
I have also made a version of the default DAC-3 mapper in the past with the crashing problem corrected. I can upload this if it's any help.
 

Mensajes Sat 10 Jun 06 @ 7:06 pm
Thanks for all your input, greatly appreciated! =)

Added your SendAction("pitch_bend",strchan,CharStr("temporary -512",buffer)); but although there is no crash, and the button works, the "temporary" is not being passed for some reason. the bend stays on after you release the button.

Perhaps if you could pop the working version of the default dac3 mapper on your website I can compare the changes. (I don't have access to the source section here)
 

Mensajes Sat 10 Jun 06 @ 7:31 pm
Oh, and also, if I wanted one button press, like
case 0x45: // waitlist
Waitlist[chan]=1;

to send 40 of these to virtual DJ,
SendAction("crossfade_video",strchan,CharStr("-100",buffer));
how would I do it?

I tried loop functions but the button press just locked up virtual DJ, proberly because it's in the middle of a switch command?

I also wanted to add a optin to switch to elapsed time instead of remain, I found the orig code
int t=(Song[chan].Length-Song[chan].Position)/441;
for(i=7;i>1;i--)
{
if(i!=4) {SetDigit(chan,i,t%10);t/=10;}
else {SetDigit(chan,i,t%6);t/=6;}


there has to be an easy way to do that =)
 

Mensajes Sun 11 Jun 06 @ 1:01 pm
If you create a loop with a delay in it, it will cause VDJ to hang. Without this, it would send all 40 actions to VDJ at once! The trick is to use a global variable to hold the loop count, and test to see if this is not zero in the OnTimer() function, where you will do the fading. In the DAC-3 mapper, OnTimer() is called once every 1/10th second, and I expect it's the same in the DAC-2.

For example, add the following to the private: section of class CDefaultDMC1Mapper:

int video_xfade;

...In the if(cmd==0) // init section of OnCommand(), add the following to initialise the above new variable:

if(cmd==0) // init
{
video_xfade = 0;

int i;for(i=0;i<2;i++)
{

At the start of the OnTimer() function, add the following before int chan,i;for(chan=0;chan<2;chan++):

if(video_xfade != 0) SendAction("video_crossfade","default",CharStr((video_xfade > 0) ? "+128":"-128",buffer));

...Now all you need to do to trigger the crossfade is set the video_xfade variable to a value > 0 (To crossfade right) or < 0 to crossfade left (E.g: 32 or -32)


For elapsed time, I use the function:

Song[chan].Position / 441

Add a variable to the private: part as follows:

int show_elapsed;

...Initialise it to 0 in the if(cmd==0) // init section (So remaining is shown by default):

show_elapsed = 0;

Then try changing:

int t=(Song[chan].Length-Song[chan].Position)/441;

...to...

int t=show_elapsed ? (Song[chan].Position / 441):((Song[chan].Length-Song[chan].Position)/441);

Then for the button that will toggle it, add:

show_elapsed = !show_elapsed;


For the sticking pitchbend problem, you need to trap the button being released and use this to stop the pitchbend. I'm not sure whether this is possible in the DAC-2 code. It's easy in the DAC-3 mapper because this traps both button presses and releases (Which is what the extra 'down' parameter to SendAction() is for.)

daniels might be able to help you with this probem.
 

Mensajes Sun 11 Jun 06 @ 8:33 pm
Quote :

For the sticking pitchbend problem, you need to trap the button being released and use this to stop the pitchbend. I'm not sure whether this is possible in the DAC-2 code. It's easy in the DAC-3 mapper because this traps both button presses and releases (Which is what the extra 'down' parameter to SendAction() is for.)

daniels might be able to help you with this probem.

But the release of the cue button is passed, when you press cue in cue mode the player plays for as long as you press the cue button (Same as the Pioneer CD plaers). This function is working fine, but the pitch bend function requires you pass tempoary or when you press the button VDJ will bend, and stay that way, same with the skins it seems.

This line also does not work!
else SendAction("sync",strchan,"temporary");
temporary here is also not passed, is this really supposed to be included with prams ie +128?
Kym
 

Mensajes Mon 12 Jun 06 @ 11:11 am
Tried adding the video crossfader, but it's telling me off for forgetting something?

error C2065: 'buffer' : undeclared identifier
 

Mensajes Mon 12 Jun 06 @ 11:46 am
And yes, i have used your buffer statement in the jog controlls, I don't understand why it doen't work with the new line? Full code is updated on my server.
 

Mensajes Mon 12 Jun 06 @ 1:36 pm
Quote :
But the release of the cue button is passed, when you press cue in cue mode the player plays for as long as you press the cue button (Same as the Pioneer CD plaers). This function is working fine, but the pitch bend function requires you pass tempoary or when you press the button VDJ will bend, and stay that way, same with the skins it seems.


Looking at the code again, it looks like velocity is used to determine whether button is pressed or released. It looks like the following section is for when a button is pressed:

else if((cmd==0x90)&&(velocity!=0))


And the following for when a button is released:

else if((cmd==0x90)&&(velocity==0))


Cue has the following defined for when it's released:


case 0x41: // cue
SendAction("cue_stop",strchan,"release");
break;


...-/+ also have a release function defined, but they will both send 'seek'! Using the cue code as an example, you probably want to change:


case 0x43: // +
case 0x44: // -
SendAction("seek",strchan,"+0");
break;


To something like:


case 0x43: // +
case 0x44: // -
SendAction("pitch_bend",strchan,"release");
break;


If that doesn't work, try the following:


case 0x43: // +
SendAction("pitch_bend",strchan,CharStr("-512",buffer));
break;
case 0x44: // -
SendAction("pitch_bend",strchan,CharStr("+512",buffer));
break;


(I.e: Does a pitchbend in the opposite direction to 'undo' the pitchbend when the button is released - If you use this, you will probably need to remove the temporary that you added to these in the function for the buttons being pressed.)

Also, you might want to use a value smaller than 512, because this will be very noticable audibly. I use 128 and 256 for fine and course pitchbends in the DAC-3 mapper.

Quote :

This line also does not work!
else SendAction("sync",strchan,"temporary");
temporary here is also not passed, is this really supposed to be included with prams ie +128?


Not all VDJ actions support temporary (But will probably still accept and ignore it though.) I don't think the 'sync' action accepts temporary - It wouldn't make sense because it sync's the beats each time it's called (There's no permanent effect, unlike say 'beatlock'.)

If you are using this for auto beatmatching, you might find SendAction("beatlock",channel,"temporary") more useful (Engages beatlock temporarily to match BPM and beats, but only while button is held. I don't use this myself, but it was asked for by users of my DAC-3 mapper.

Quote :
Tried adding the video crossfader, but it's telling me off for forgetting something?

error C2065: 'buffer' : undeclared identifier


If you are using SendAction() and CharStr() in the OnTimer() function, you will also need to define the buffer variable in this too (Because it's a local variable and only visible to the function it's defined in):


// this function will be called on a regular basis. Use it to update the display of the DMC1/DAC2
void CDefaultDMC1Mapper::OnTimer()
{
char buffer[128];
 

Mensajes Mon 12 Jun 06 @ 6:57 pm
I tried adding a slam to the video fader, if waitlist and shift if pressed, but for some reason eventhough the same if command works on other buttons it won't on this line! I know something is staring me ith the face here!! =)

Quote :

case 0x45: // waitlist
Waitlist[chan]=1;
if((chan==0)&&(Shift[chan]))SendAction("video_crossfade","default",CharStr("-4096",buffer));
else if((chan==1)&&(Shift[chan]))SendAction("video_crossfade","default",CharStr("+4096",buffer));
else if(chan==0)video_xfade = -32;
else if(chan==1)video_xfade = +32;
else video_xfade = 0;
break;


Also noticed that (While the slam command was disabled) that the crossfader function kept pushing, even after it reached the end of the slider, this was confirmed by dragging the slider with the mouse, even after a few minutes had passed.

The time fixes worked a treat, only need to add the pitch adjustment into the command for elapsed and remain as they don't seem to change when the pitch slider is moved. I tried reading it out of the DAC3 source but could'nt quite translate it. I expect it has something to do with
Quote :
Song[chan].Pitch,Song[chan].Bpm*(4096/32));


 

Mensajes Tue 13 Jun 06 @ 5:27 pm
Oh, and for some reason my pitch bend needs to be +128 on the press, and -512 on the undo, I'll have a look into what is causing the problem tomorrow.
Code updated!
 

Mensajes Tue 13 Jun 06 @ 5:45 pm
Quote :
I tried adding a slam to the video fader, if waitlist and shift if pressed, but for some reason eventhough the same if command works on other buttons it won't on this line! I know something is staring me ith the face here!! =)

case 0x45: // waitlist
Waitlist[chan]=1;
if((chan==0)&&(Shift[chan]))SendAction("video_crossfade","default",CharStr("-4096",buffer));
else if((chan==1)&&(Shift[chan]))SendAction("video_crossfade","default",CharStr("+4096",buffer));
else if(chan==0)video_xfade = -32;
else if(chan==1)video_xfade = +32;
else video_xfade = 0;
break;


For the slam, you probably want to use absolute values (Whole number) rather than +/-, i.e:


case 0x45: // waitlist
Waitlist[chan]=1;
if((chan==0)&&(Shift[chan])) {
SendAction("video_crossfade","default",CharStr("0",buffer));
video_xfade = 0;
} else if((chan==1)&&(Shift[chan])) {
SendAction("video_crossfade","default",CharStr("4096",buffer));
video_xfade = 0;
} else if(chan==0) video_xfade = -32;
else if(chan==1) video_xfade = +32;
else video_xfade = 0;
break;


For a crossfader, 0 = Left, 2048 = Centre, 4096 = Right. The video_xfade = 0 is used to stop any video crossfade that is currently taking place (I.e: If a fade to the left is still going and you slam right, it would continue to fade left afterwards without this!)

Quote :
Also noticed that (While the slam command was disabled) that the crossfader function kept pushing, even after it reached the end of the slider, this was confirmed by dragging the slider with the mouse, even after a few minutes had passed.


I forgot to include code to increment/decrement video_xfade back to 0 (So that it eventually stops fading.) Try changing it as follows:


void CDefaultDMC1Mapper::OnTimer()
{
char buffer[128];

if(video_xfade != 0)
{
SendAction("video_crossfade","default",CharStr((video_xfade > 0) ? "+128":"-128",buffer));
if(video_xfade > 0) video_xfade--;
if(video_xfade < 0) video_xfade++;
}


Quote :
The time fixes worked a treat, only need to add the pitch adjustment into the command for elapsed and remain as they don't seem to change when the pitch slider is moved. I tried reading it out of the DAC3 source but could'nt quite translate it. I expect it has something to do with Song[chan].Pitch,Song[chan].Bpm*(4096/32));


My DAC-3 mapper allows you to either show real time remaining (Taking pitch into account) or absolute time remaining in the song based on current position. Same goes for time elapsed. It looks like I gave you the absolute version. Try the following for real time remaining/elapsed.


int t=show_elapsed ? (MulDiv(Song[chan].Position,Song[chan].Pitch,4096) / 441):(MulDiv(Song[chan].Length - Song[chan].Position,4096 - Song[chan].Pitch + 4096,4096) / 441);


Quote :
Oh, and for some reason my pitch bend needs to be +128 on the press, and -512 on the undo, I'll have a look into what is causing the problem tomorrow.


Perhaps it's detecting the button being held down and sending the pitch_bend action more than once? You can test this by holding the pitch bend button down for different amounts of time and seeing whether this has more or less effect or not.
 

Mensajes Tue 13 Jun 06 @ 6:57 pm
WELL, it's been a productive day! Pitch bend is fixed! I found that although its not +ing for every press, telling VDJ to +128 after -128, was in fact being reset as soon as the new pitch-bend command was set, tus then telling it to -128 was taking 128 off zero. Easy fixed, the second command is now "0" for the release of both keys!
Quote :

case 0x43: // +
case 0x44: // -
SendAction("pitch_bend",strchan,CharStr("0",buffer));


On the video switch front, I still cannot get the slam function to work, and I even moved it to it's final resting spot (Change of buttons) but no luck. I've added the xfader 0 reset to the Load keys, thus the auto crossfade stops every time you press load, i may in the future move this to the.... EDIT, I now have move this to the Match button, it covers for the people that use their mouse to load tracks, its not usually used around the same time as the start crossfade keys (Loop/Preview), and it's only usually used once, per load!

The slam function has got me buggered! I tried it with two Shift checks, and it worked, and with two chan checks and it works, but both in one IF command just wont work!
Quote :

if((chan==0)&&(Shift[chan]))


Ive added the new display timers, but noticed the elapsed timer gets shorter, the slower the pitch, but is correct at pitch %0, it's reacting to the pitch figure in reverse perhaps, Ive added the non pitched version of elapsed, and left the new remain, as thats the main one that needs to be correct!

I've modded the Jogwheel code, with the intention of moving the record case (Removed the auto load!) when not playing, and a very light nudge (64) while playing for those that like to use the jog wheel for pitch bending. Problem is the mapper can't tell if your paused, and trying to adjust a cue point (Or create a new one). For the moment Ive added a faster nudge (128) attached to the shift button, so pressing shift & using the Jog, will allow you to move the track while paused, or stopped, but there must be a way of telling the mapper to do this by it's self?

Quote :

else if((cmd==0x90)&&((note&0xFE)==0x60))
{
//Jogwheel?
int chan=(note&0x01)?0:1;
if(Shift[chan]==1) SendAction("nudge",strchan,(velocity==0x30)?CharStr("+128",buffer):CharStr("-128",buffer));//FIXED?
else if (Song[chan].Playing!=1)
{
SendAction("browser_switch","default",strparam(2));
SendAction("browser_updown","default",(velocity==0x30)?CharStr("+1",buffer):CharStr("-1",buffer));//FIXED?

//LoadTree[chan]=0;
}
else SendAction("nudge",strchan,(velocity==0x30)?CharStr("+64",buffer):CharStr("-64",buffer));//FIXED?
}
else if((cmd==0x90)&&(velocity!=0)&&((note&0xE0)==0x20))
{
int chan=(note&0x10)?0:1;
int p=note&0x0F;if(p>=8) p=7-p;
//Outer Jog
if(Song[chan].Playing!=1)
{
if((abs(p)>1)&&((p*Wheel[chan]<=0)||(abs(p)>abs(Wheel[chan]))))
{
SendAction("browser_switch","default",strparam(1));
SendAction("browser_updown","default",strparam(p));

LoadTree[chan]=1;
}
Wheel[chan]=p;
}

I'ts getting there, there more I play, the more things makes sense!
Again, all thanks for the C++ Lessons to jpboggis. =)
Code updated!
 

Mensajes Wed 14 Jun 06 @ 1:43 pm
Quote :
The slam function has got me buggered! I tried it with two Shift checks, and it worked, and with two chan checks and it works, but both in one IF command just wont work!


Try the following, which should simplify the code a little bit, plus should allow either shift button to be used:


case 0x49: // preview
if(shift[0] || shift[1]) {
SendAction("video_crossfade","default",CharStr((chan == 1) ? "4096":"0",buffer));
video_xfade = 0;
} else video_xfade = (chan == 1) ? 32:-32;
break;


Quote :

Ive added the new display timers, but noticed the elapsed timer gets shorter, the slower the pitch, but is correct at pitch %0, it's reacting to the pitch figure in reverse perhaps, Ive added the non pitched version of elapsed, and left the new remain, as thats the main one that needs to be correct!


Try the following to correct the elapsed time (This may also be a bug in my DAC-3 mapper (Will need to check) - Not noticed because this uses absolute time by default):


int t=show_elapsed ? (MulDiv(Song[chan].Position,4096 - Song[chan].Pitch + 4096,4096) / 441):(MulDiv(Song[chan].Length - Song[chan].Position,4096 - Song[chan].Pitch + 4096,4096) / 441);


Quote :

I've modded the Jogwheel code, with the intention of moving the record case (Removed the auto load!) when
not playing, and a very light nudge (64) while playing for those that like to use the jog wheel for pitch bending. Problem is the mapper can't tell if your paused, and trying to adjust a cue point (Or create a new one). For the moment Ive added a faster nudge (128) attached to the shift button, so pressing shift & using the Jog, will allow you to move the track while paused, or stopped, but there must be a way of telling the mapper to do this by it's self?


Song[chan].Playing != 0 can be used to determine whether the song is currently playing or not. You would need some means of telling the mapper that you want to browse files rather than adjust the cue point while paused.

In my DAC-3 mapper, SHIFT+jogwheel is used to browse files - The jogwheel on its own will always adjust the song position while paused and do a fine pitchbend while playing.

Alternatively, you could perhaps use a button to toggle the jogwheel when paused between file browsing and cueing (Similar to time elapsed.)
 

Mensajes Wed 14 Jun 06 @ 7:27 pm
I've found that the formula for calculating real time elapsed/remaining isn't accurate at all pitch ranges. The following works far more accurately:

int t = MulDiv(show_elapsed ? Song[chan].Position:(Song[chan].Length - Song[chan].Position),1,MulDiv(441,Song[chan].Pitch,4096));
 

Mensajes Thu 15 Jun 06 @ 12:11 am
That last code for the time did the trick, spot on!
I'm still hawing no luck with the slam function, I did find however that using the left shift button with the right slam button and vice versa works, so it seems the hardware refuses to see a shift and the preview button on the same deck at once! For the moment Ive added the slam to the release of the button, and the smooth trans to the press, the result is tap for slam, press and hold for trans, and you can hold for a bit, then release for the slam, and create quite a different transition depending on how long you hold for! Also assigned the xfade=0 to the release, so the trans code is always stopped!

Ive has a few shots at adding the elapsed and remain images on the displays but with no luck i figured i'm proberly doing it the hard way! I tried both adding it with another call to
show_elapsed ? and adding it to the existing time code, I created a .dll that is guaranteed to crash everytime! code removed, I'll wait for someone who knows what they're doing on that one!
SetSymbol(i,0x07,true); // remain
SetSymbol(i,0x06,true); // elapsed

In testing the mapper at work last night I also found that I forgot that the elapsed/remain switch is global, almost soiled myself when I finnaly worked out what was happening, whats the easiest way of splitting the two displays up, I know they are already processing left and right decks seperately, (But I can't see "Who" is telling the code what player to calulate & when, unless it based on VDJ spitting the data out one player at a time?) how do I set them both up with seperate elapsed and remain switches. Perhaps creating a show_remain with a [chan] switch?
(Code Updated!)

Kym
 

Mensajes Thu 15 Jun 06 @ 7:45 pm
Quote :

Ive has a few shots at adding the elapsed and remain images on the displays but with no luck i figured i'm proberly doing it the hard way! I tried both adding it with another call to
show_elapsed ? and adding it to the existing time code, I created a .dll that is guaranteed to crash everytime! code removed, I'll wait for someone who knows what they're doing on that one!
SetSymbol(i,0x07,true); // remain
SetSymbol(i,0x06,true); // elapsed


Try the following (Assuming those codes are correct for the displays):


SetSymbol(i,0x07,show_elapsed == 0); // remain
SetSymbol(i,0x06,show_elapsed != 0); // elapsed


Quote :

In testing the mapper at work last night I also found that I forgot that the elapsed/remain switch is global, almost soiled myself when I finnaly worked out what was happening, whats the easiest way of splitting the two displays up, I know they are already processing left and right decks seperately, (But I can't see "Who" is telling the code what player to calulate & when, unless it based on VDJ spitting the data out one player at a time?) how do I set them both up with seperate elapsed and remain switches. Perhaps creating a show_remain with a [chan] switch?


You need to change show_elapsed into an array that holds the current setting for each of the two channels.

First, change:


// you can define your own private variables here
int Load[2],LoadTree[2],Shift[2],Waitlist[2],Loop[2],Pitch[2],Wheel[2],PitchLocked[2],temporary[2],video_xfade,show_elapsed;


...To...


// you can define your own private variables here
int Load[2],LoadTree[2],Shift[2],Waitlist[2],Loop[2],Pitch[2],Wheel[2],PitchLocked[2],temporary[2],video_xfade,show_elapsed[2];


Change:


int i;for(i=0;i<2;i++)
{
video_xfade = 0;
Load=0;
LoadTree=0;
Shift=0;
Waitlist=0;
show_elapsed = 0;


...To...


int i;for(i=0;i<2;i++)
{
video_xfade = 0;
Load=0;
LoadTree=0;
Shift=0;
Waitlist=0;
show_elapsed = 0;


...And:


case 0x45: // waitlist
Waitlist[chan]=1;
show_elapsed = !show_elapsed;
break;


...To...


case 0x45: // waitlist
Waitlist[chan]=1;
show_elapsed[chan] = !show_elapsed[chan];
break;


...And finally:


// Display Timer
int t = MulDiv(show_elapsed ? Song[chan].Position:(Song[chan].Length - Song[chan].Position),1,MulDiv(441,Song[chan].Pitch,4096));



// Display Timer
int t = MulDiv(show_elapsed[chan] ? Song[chan].Position:(Song[chan].Length - Song[chan].Position),1,MulDiv(441,Song[chan].Pitch,4096));


Also, if you added the SetSymbol() code above, change this to:


SetSymbol(i,0x07,show_elapsed == 0); // remain
SetSymbol(i,0x06,show_elapsed != 0); // elapsed
 

Mensajes Thu 15 Jun 06 @ 9:50 pm
Quote :

Awesome, did you notice that the foum software removed all th {i} bits in the code! I guess it means italic!


I didn't notice that. Forgot that {i} in BB code does italic.

Quote :

Have considered adding a flash for the last 30 seconds, either on the position bar, or on the main time window, not sure how easy it is though?


Add a variable called timer to the private part.

In the OnTimer() function, add the following after char buffer[128];


int remainflash;

timer++;

// Time remaining warning flash
remainflash = 0;
if((Song[chan].Length > 0) && Song[chan].Playing) {
int timeleft = MulDiv(Song[chan].Length - Song[chan].Position,4096 - Song[chan].Pitch + 4096,4096) / 44100;

if(timeleft < 4) {
remainflash = 1;
} else if(timeleft < 10) {
remainflash = 3;
}
}


This sets up a timer that increments each time OnTimer() is called, which if the same as the DAC-3 mapper should be 1/10th of a second.

remainflash is the divisor for the Flasher() function below and will be set to 3 (Slow flash) when time remaining is 10 seconds and 1 (Fast flash) when time remaining is less than 4 seconds.

Add the following to the small helper functions section:


// Flasher based on timer divided by divisor 1/10th secs
inline int Flasher(int timer,int divisor,int default) { return (divisor ? ((timer % (divisor * 2)) < divisor):default); }


Change:


// progress bar
SetBar(chan,Song[chan].Length?MulDiv(Song[chan].Position,10,Song[chan].Length):10);


...To...


// progress bar
SetBar(chan,Song[chan].Length ? ((remainflash && Flasher(timer,remainflash,0)) ? 0:MulDiv(Song[chan].Position,10,Song[chan].Length)):10);


Quote :

Had a play with Song Status, hoping it would fix my pause jog issue, but no luck (Copied the code from the DAC3 SDK!) so back to a shift press for me, if I post it up in the Plugins section I'll swap it back over to SHIFT for Browser scroll as I expect this would be more popular.


Song[chan].Playing should allow you to do that, but it must work differently in the DAC-2 mapper.

SHIFT for browisng is better, because this makes the DAC behave like a standard dual-CD player would when it's not held down (I.e: Cueing and pitchbending.)

Quote :

Don't suppose you want to post it under your ID, Jpboggis after all you wrote it, lol!?


Feel free to give me a mention in the code and/or documentation on how to use it. :)
 

Mensajes Fri 16 Jun 06 @ 7:10 pm
61%