Quick Sign In:  

Forum: VirtualDJ Plugins

Topic: Problems with fourcc

This topic is old and might contain outdated or incorrect information.

Ok. I'm trying to finish my mapper for DENON HC4500.

I have noticed that in the new "fourcc" definitions, a lot things are not defined as they should.
For instance:
#define DENON_LED_JOGMODE_GREEN 'SCRA'
#define DENON_LED_JOGMODE_ORANGE 'SCRA'
#define DENON_LED_PITCH_GREEN 'PITC'
#define DENON_LED_PITCH_ORANGE 'PITC'
#define DENON_LED_TAP_GREEN 'TAP'
#define DENON_LED_TAP_ORANGE 'TAP'
#define DENON_LED_FX1_RED 'FX1'
#define DENON_LED_FX1_GREEN 'FX1'
#define DENON_LED_FX2_RED 'FX2'
#define DENON_LED_FX2_GREEN 'FX2'
#define DENON_LED_FX3_RED 'FX3'
#define DENON_LED_FX3_GREEN 'FX3'
#define DENON_LED_1 '1'
#define DENON_LED_1_DIMMER '1'
#define DENON_LED_2 '2'
#define DENON_LED_2_DIMMER '2'
#define DENON_LED_3 '3'
#define DENON_LED_3_DIMMER '3'
#define DENON_LED_4 '4'
#define DENON_LED_4_DIMMER '4'
#define DENON_LED_5 '5'
#define DENON_LED_5_DIMMER '5'
#define DENON_LED_6 '6'
#define DENON_LED_6_DIMMER '6'

By using these definitions, I am not able to turn the jogmode button for instance green or orange. It will only turn on orange... (It's the same definition)

Also, on the definitions file I had to "reverse" the mapping in order to make it work with 5.2
I don't think I should have done that, so my questions are:

1) Is there any newer DENON definitions file that allows me to use my device in full extent?
2) Is there anything special I should put on my project file that would allow me NOT to reverse the definitions?


PS: The definitions I've got was in the format:

#ifndef IDenonMapperH
#define IDenonMapperH


#ifndef FOURCC

#define DENON_BTN_EJECT 0x01
#define DENON_BTN_PLAYLIST 0x02
#define DENON_BTN_LAYER 0x03
#define DENON_BTN_JOGMODE 0x04
..................
#else

#define DENON_BTN_EJECT 'EJEC'
#define DENON_BTN_PLAYLIST 'PLIS'
#define DENON_BTN_LAYER 'LAYR'
#define DENON_BTN_JOGMODE 'SCRA'
...................

#endif


// Button index numbers
#define DENON_IDX_BTN_EJECT 0
#define DENON_IDX_BTN_PLAYLIST 1
#define DENON_IDX_BTN_LAYER 2
#define DENON_IDX_BTN_JOGMODE 3
#define DENON_IDX_BTN_PITCH 4
#define DENON_IDX_BTN_KEY 5
...............................


In order to make my mapper work on 5.2 I had to transform this file as follows:

#ifndef IDenonMapperH
#define IDenonMapperH


#ifndef FOURCC

#define DENON_BTN_EJECT 'EJEC'
#define DENON_BTN_PLAYLIST 'PLIS'
#define DENON_BTN_LAYER 'LAYR'
#define DENON_BTN_JOGMODE 'SCRA'
...................
#else
#define DENON_BTN_EJECT 0x01
#define DENON_BTN_PLAYLIST 0x02
#define DENON_BTN_LAYER 0x03
#define DENON_BTN_JOGMODE 0x04
..................
#endif


// Button index numbers
#define DENON_IDX_BTN_EJECT 0
#define DENON_IDX_BTN_PLAYLIST 1
#define DENON_IDX_BTN_LAYER 2
#define DENON_IDX_BTN_JOGMODE 3
#define DENON_IDX_BTN_PITCH 4
#define DENON_IDX_BTN_KEY 5
...............................


PS2: I'm using PCDJ VJ if that matters....
 

Posted Sun 12 Oct 08 @ 4:13 pm
I found the answer to my second question. It's just not me realizing how c++ works.
However, my first question remains the same:
Is there any newer definitions file?
Also on the one I've got, #define DENON_LED_SYMBOL_TRACK_BLINK is missing from fourcc
(not that it worked in previous versions though)

 

Posted Sun 12 Oct 08 @ 4:23 pm
SBDJPRO Infinity Member since 2006
Sorry, I have no idea what you are talking about when you talk about fourcc definitions.

In the SDK I have, the definitions for each colour are different - for example DENON4500_LED_PITCH_GREEN and DENON4500_LED_PITCH_ORANGE are different values.

I don't see how they could be the same values, as the compiler would substitute the values at compile time, and hence in the code they would end up as identical values?
 

Posted Sun 12 Oct 08 @ 7:49 pm
Yes in the old definitions "DENON4500Mapper.h" everything is as it should.

However version 5.2 uses a so called "fourcc" scheme of definitions.

For instance:
#define DENON_BTN_CUE 0x42

is now

#define DENON_BTN_CUE 'CUE'

Now, correct me if I'm wrong but if I use the following syntax in c++ what will I get?

#define ONE 1
#define TWO 1
#define THREE 1

I believe I'll get ONE=TWO=THREE=1 right?

In other words since
#define DENON_LED_JOGMODE_GREEN 'SCRA'
#define DENON_LED_JOGMODE_ORANGE 'SCRA'
are defined with the SAME value, they will act the same.
 

Posted Mon 13 Oct 08 @ 1:18 am
That file was created by me based on technical information supplied to me at the time the fourcc format was implemented for the HC4500. There are currently no updates available or needed at this time.

When including the file, you need to add the following for the fourcc values to be used instead of the original SDK values:

#define FOURCC
#include "DenonMapper.h"


To set the dual coloured LED's, you will need to use the value field of SetLed(): 0 = Off, 1 = First colour, 2 = Second colour, 3 = Both colours (Creates a yellow LED.)

There was no fourcc value provided to me for DENON_LED_SYMBOL_TRACK_BLINK, but this didn't work in the previous versions anyway. For blinking LED's or symbols, it's better to implement these yourself by simply turning them on/off at the appropriate interval in OnTimer().
 

Posted Mon 13 Oct 08 @ 1:00 pm


(Old topics and forums are automatically closed)