登录:     


Forum: VirtualDJ Technical Support

Topic: need assistance with colour rules syntax
Dear friends,

I like to get the following to work:

light grey: normal Mp3's
darker grey: Mp3's with lower bitrate than 320
lighter white: Flacs and waves

This for general overview to quickly see which files are better sounding.

But then I want some "Live" colours as well:

tracks turn blue when they are compatible ( bpm difference <= 5 ) etc.

But I want to include the above mp3s and flacs etc. ( to turn blue when compatible) And when no tracks are active I want them to revert to their initial colouring.

I can only get one or the other not both to work. It often doesn't include the file in the compatibility colours even when there is less than 5 bpm difference.

Please assist me in how to correctly write the colour rules commands and give me some examples of how to create these "layered" colour rules.

Thanks!
 

发表时间 Fri 22 May 26 @ 2:42 pm
I'd go dynamic rule first [because it needs to be] and then I'd think about tag colouring tracks as they're not going to change bitrate/format, then I'd have colour as a browser field that way you can still have a visual even when the compatible colour scheme is in effect.
But you're not forced to tag colour, you could have rules for the bit rate & file type but you're making work for the machine

As for the filter, don't use bpm difference, use pitch difference it's just better, <=4.1 is ~5 bpm if you play round the 128 tempo.
To make it dynamic to only trigger while playing, you've got to get creative, filters/colour rules check against a tag.
So we need to give it something that is always true to catch every single track if we're playing and then something impossible when we're not playing, there's a few contender tags but I think rating is the easiest.

if playing include tracks with a rating > -1 [all tracks]
if not playing include tracks with a rating > 5 [not possible, no tracks]
tie that up with 'and pitch difference...' and you have something like this.

pitch difference <= 4.1 and Rating > `deck 1 is_audible ? constant -1 : deck 2 is_audible ? constant -1 : deck 3 is_audible ? constant -1 : deck 4 is_audible ? constant -1 : constant 5`
 

@devs Any point in a True = `query ? constant True : constant False`
type filter being added [it probably needs a better name] ? Rating is a solid hack and I doubt querying the xml costs much but it's still a hack and it needs arcane knowledge.
 

deck 1 is_audible ? on : deck 2 is_audible ? on ....
should work I think?
 

I don't think it does unless I'm making a syntax mistake, it always has to compare against a tag

colour Red script `deck 1 is_audible ? on : off`
 

Ah yes, will see if scripts could be supported directly