Quick Sign In:  

Forum: Old versions

Topic: Device Definition: Color, dual purpose elements possible or redundant?

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

Hi all, I'm working a definition file for VDJ 8.1, need advice for LED feedback.

I've succeeded in naming all the buttons and sliders, and I'm now seeking advice on what is the current best practice for multicolor LED feedback.

I've seen two methods, the first simply consisting of multiple <led ... /> lines for each element, the second is <color ... />.

What is the syntax for setting pad values? -- Is there a quick and dirty way to toggle a 4x4 matrix (based on a $variable)?
The ccred, ccblue method I do not understand.

----

If, I wanted to reuse a <slider .../> as a <bar ... /> in another mode to make a VU meter ... Is there an advantage or difference? This would imply two elements cc=x, but different names.

Do I just call it a slider, or make a new map or channel or something?

Thanks
 

Posted Thu 28 Jan 16 @ 12:51 am
 

Posted Thu 28 Jan 16 @ 7:38 am
djdadPRO InfinityDevelopment ManagerMember since 2005
about the LEDs , it all depends on how many colors each one offers. If its just 2 to 4 different colors, then <color> is not suggested (makes no sense to use).
If its just 2 colors (e.g. blue-red) then best way is to define 2 <led> lines with value=""
If its 3 to 4 then maybe its best to have <led note/cc="" min="" max="" and then use constant 0.0 to 0.99 to get the wanted color
Use <color> if the LED offers true RGB or lots of colors. Use <color cc/note="" values="table" table=".." .

Be more specific on what the LEDs of your controller offer , to guide you further.
 

Posted Thu 28 Jan 16 @ 2:06 pm
PhantomDeejay wrote :
<slider /> is input to the software (from controller to software)
<bar /> is output from the software (from software to controller)

http://www.virtualdj.com/wiki/ControllerDefinitionMIDIv8.html

Thanks! No idea how I could have missed that. In reality it is a touchstrip, but I decided to call it a slider.

Presuming, this should not matter, my impression is that this is a simple naming convention, internally is there a difference?
---

Thanks DjDad. The device I'm working on is the Livid Base. I've still got a lot of experimentation to do regarding color feedback.

What I like about the definition file is that since by default the default map sends much too many messages, I can filter only the messages I want to make use of. (A pad sends note, cc, and aftertouch... all elements are such.)

My intention, is to create up to 8 'mode' features, corresponding to the side buttons. Looking at the Ableton mapping python script, there are many (allow me to misuse) "morphologies" of MIDI assignment stemming from the same midi map on channel 1. In this aspect, the script vs markup shows advantage in the fact that sysex "flushing" is used extensively to differentiate the preset modes.

LIVID BASE DOCS wrote :

Example
Turn all pads red:
◾ F0 00 01 61 0C 04 09 09 09 09 09 09 09 09 09 09 09 09 09 09 09 09 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 F7


While I do not see anything of the sort from markup language, I did notice the action (controllers)
assign_controller
reinit_controller
refresh_controller
rescan_controller

While I'm particularly interested in <init /> sections of the definition.xml to replace multiple conditional 'mode' statements, can I switch maps on the fly? To me this seems best but usage context and/or examples would be a godsend.

As for colors:
"LIVID BASE WIKI" wrote :
The Indicator LEDs on BASE have 8-states.
Velocity/Value: Color Generated
◾ 127-127: Color7 (Green) ◾ 064-126: Color6 (Yellow) ◾ 032-063: Color5 (Blue) ◾ 016-031: Color4 (Red) ◾ 008-015: Color3 (Magenta) ◾ 004-007: Color2 (Cyan) ◾ 001-003: Color1 (White) ◾ 000-000: < off >


I'll toy around some using <color name=xx note=xx values="...." />

Ok... this is straying off topic a bit lol... but I'll experiment and report back, possibly upon success submitting wiki examples.

In the mean time is it possible to obtain clarification on color table, and the "controllers" actions I mentioned? This is really interesting...

Thanks!
 

Posted Thu 28 Jan 16 @ 8:20 pm
1) If you are talking about touch strip vs slider then there's a difference regarding if you want to use relative or absolute mode. Relative mode needs to be defined as <touchstrip /> while absolute mode needs to be defined as <slider />
2) The "Turn all pads red" code you wrote is actually a SYSEX. Usually you can send SYSEX messages when device starts and when it shuts down.
If you want to send SYSEX messages during operation you will need to use <sysex /> definition:
<sysex value="F0 00 01 61 0C 04 09 09 09 09 09 09 09 09 09 09 09 09 09 09 09 09 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 F7" name="SYS_ALLRED" />
3) The actions you mention are pretty much self explanatory and usually they are not used during normal operation of a controller.
assign_controller, assigns a controller to work against a specific deck
reinit_controller, reinitializes a controller by running again it's exit and init statements of both definition and mapper
refresh_controller, refreshes the screen and the less of the controller (it sends again the output of the software to the controller)
rescan_controller, makes VirtualDj to rescan for any supported controllers that may be connected on your system
4) To change modes and other stuff on-the-fly you need to define <sysex /> messages that will send the appropriate syses command when you want to change mode. I already gave you an example above. What you need to remember is that the syses command is send each time it's action goes from false to true or from 0 to 1.
5)<color note="0x3C" name="LED_PAD1" default="PAD1" values="0x7F=green,0x64=yellow,0x28=blue,0x14=red,0x0A=magenta,0x05=cyan,0x02=white,0x00=black" deck="1" channel="7" />


PS: If on your first question you're asking if there's a difference between output and input <slider /> vs <bar /> then of course there is. Also keep in mind that on several cases you may need different commands for input and output. That's why we always name the less of the same button differently.
 

Posted Fri 29 Jan 16 @ 12:51 am


(Old topics and forums are automatically closed)