Quick Sign In:  

Forum: Old versions

Topic: Script Help......... - Page: 1

This part of topic is old and might contain outdated or incorrect information

I should know this but I'm doing something wrong. I have a knob on my controller that I want to control the volume of the sampler with. I want it to control the volume of what ever sample is playing, or if I start another it stops controlling the previous one and controls the one that I just started.

Any help is greatly appreciated
Huey
 

Posted Mon 29 Oct 12 @ 1:08 pm
thats actually a pretty hard one huey... your best be is just to control all of the sample volumes together on one knob so every sample volume is adjusted at the same time... If you still need independent control of the volumes then you may have to map a shift to switch the action of the knob eg..

if you press a shift button then press the button that plays a particular sample it could activate the secondary shift to make the knob control the specific samples volume, this is only really suited for your nano pad though.

each individual play button

var 'shift' ? set 'arm' 1 : sampler 1 play_stop
var 'shift' ? set 'arm' 2 : sampler 2 play_stop
var 'shift' ? set 'arm' 3 : sampler 3 play_stop
var 'shift' ? set 'arm' 4 : sampler 4 play_stop
var 'shift' ? set 'arm' 5 : sampler 5 play_stop
var 'shift' ? set 'arm' 6 : sampler 6 play_stop
var 'shift' ? set 'arm' 7 : sampler 7 play_stop
var 'shift' ? set 'arm' 8 : sampler 8 play_stop
var 'shift' ? set 'arm' 9 : sampler 9 play_stop
var 'shift' ? set 'arm' 10 : sampler 10 play_stop
var 'shift' ? set 'arm' 11 : sampler 11 play_stop
var 'shift' ? set 'arm' 12 : sampler 12 play_stop

sampler volume for the specific slot when shifted.

var 'shift' ? var 'arm' 1 ? sampler 1 volume : var 'arm' 2 ? sampler 2 volume : var 'arm' 3 ? sampler 3 volume : var 'arm' 4 ? sampler 4 volume : var 'arm' 5 ? sampler 5 volume : var 'arm' 6 ? sampler 6 volume : var 'arm' 7 ? sampler 7 volume : var 'arm' 8 ? sampler 8 volume : var 'arm' 9 ? sampler 9 volume : var 'arm' 10 ? sampler 10 volume : var 'arm' 11 ? sampler 11 volume : var 'arm' 12 ? sampler 12 volume : sampler volume
 

Posted Mon 29 Oct 12 @ 4:49 pm
Hmm, not really liking the shift. I might just have to bust out the kontrol. I'm not at home but I'll post the script from the native mapping, its for the djc4. I'm not really understanding what they were trying to do.

Thanks bro!!
 

Posted Mon 29 Oct 12 @ 5:58 pm
Hmm, this kinda sucks.
This is what it says in the wiki, sampler volume : change the volume of the selected sample
So what I get from that is, I only need to map one knob with "sampler volume" and it'll control whatever sample is playing. The problem is, it only works about 50% of the time, lol! Chackls script almost worked, http://www.virtualdj.com/forums/165553/German_Forum/An_alle_Profi-Mapper__Lautst_rke_der_Sampler_mit_Slider_ver_ndern____.html?search=sampler%20volume&page=1
But when I translated it I found out it couldn't be done........ ugh!
 

Posted Sun 04 Nov 12 @ 8:32 am
djdadPRO InfinityDevelopment ManagerMember since 2005
The easiest way is to trigger the samples like this ..
sampler x select & sampler x play_stop
This way the ..
sampler default volume
action will always control the selected sample.
But of course you cant do much, if more than 2 samples are playing, as once you stop the one you triggered last, the first one is not selected at that moment and the volume knob will not control that.

I think this must be placed in the Wishes Forum, but there could be some workarounds as well.
 

Posted Sun 04 Nov 12 @ 1:13 pm
Ok heres the scripts im using and it only works for samplers 1-4, 5-8 it has no effect on. What am I doing wrong here??

device_side left ? holding 200ms ? sampler 1 stop : sampler 1 select & sampler 1 play_stutter : device_side right ? holding 200ms ? sampler 5 stop : sampler 5 select & sampler 5 play_stutter


device_side left ? holding 200ms ? sampler 2 stop : sampler 2 select & sampler 2 play_stutter : device_side right ? holding 200ms ? sampler 6 stop : sampler 6 select & sampler 6 play_stutter


device_side left ? holding 200ms ? sampler 3 stop : sampler 3 select & sampler 3 play_stutter : device_side right ? holding 200ms ? sampler 7 stop : sampler 7 select & sampler 7 play_stutter



device_side left ? holding 200ms ? sampler 4 stop : sampler 4 select & sampler 4 play_stutter : device_side right ? holding 200ms ? sampler 8 stop : sampler 8 select & sampler 8 play_stutter
 

Posted Sun 04 Nov 12 @ 7:11 pm
Soooo I guess I'll have to map the NanoKontrol then which I have to carry around another device.......
 

Posted Mon 05 Nov 12 @ 11:12 am
device_side left ? holding 200ms ? sampler 1 stop : sampler 1 select & sampler 1 play_stutter : device_side right ? holding 200ms ? sampler 5 stop : sampler 5 select & sampler 5 play_stutter

I'm pretty sure that the holding query time is too short... 200ms ain't very long, maybe increase it to 500ms & remember that when you use "holding" the button fires on release of the button as it first checks to see how long you have held the button down before performing either of your actions on release of the button.

And you don't really need the device_side right ? bit as that is implied from being the opposite of left.

This is all you should really need ;-)

device_side left ? holding 500ms ? sampler 1 stop : sampler 1 select & sampler 1 play_stutter : holding 500ms ? sampler 5 stop : sampler 5 select & sampler 5 play_stutter
 

Posted Mon 05 Nov 12 @ 11:28 am
I Need the holding cause if the sample is a loop it'll never stop, so that is how I stop the sample from playing. Or am I missing something here??
 

Posted Mon 05 Nov 12 @ 11:35 am
damn your quick Huey LMAO...

I just fixed it up after thinking about it a little more.. the original post was wrong
 

Posted Mon 05 Nov 12 @ 11:36 am
Haha!! This is one of my last hurdles and the DJC4 is going on the road with turntables. I've used it on a few gigs but never with the tables so I'm pretty excited. Wish it had all the features the chinese version has but it's a best and I like it, lol!!

I'll try that scriPt when I get home tonight and let you know
As always , Thanks for the help bro!!
 

Posted Mon 05 Nov 12 @ 11:48 am
Unman I think their might be a bug when using 'device_side Left'. I got the same results, the volume will work with samplers 1-4 but it wont work with samplers 5-8.

Could a member of the team take a look at this and let me know if I'm right?? Ive been racking my brain trying to get this to work, as well as other but nothing is working how it should.

Please help.......
 

Posted Mon 05 Nov 12 @ 5:14 pm
try pressing key learn on the left side an pressing one of the buttons, then repeat for the right side... Did you get the same button or were they different? if they were different then you need to map then independently of each other.

There's no mapper to confirm how it's defined sorry Bro.. Although the built in mapper uses this

leftdeck ? sampler 1 play_stop & sampler 1 select : sampler 5 play_stop & sampler 5 select

I have never seen "leftdeck" as a query before, It was my understanding that it was to assign the left deck and "deck left ?" was the query, but it may be usable in both instances.. I would try that.
 

Posted Mon 05 Nov 12 @ 6:02 pm
It shows up as the same and yeah Ive never seen 'leftdeck' used like that either. Im all out of ideas yet all I know is that with the 'select sampler' in there it works for samplers 1-4 but has no effect on samplers 5-8...........
 

Posted Mon 05 Nov 12 @ 6:43 pm
djdadPRO InfinityDevelopment ManagerMember since 2005
Which device are you using ?
 

Posted Wed 07 Nov 12 @ 3:56 am
Stanton DJC.4
 

Posted Wed 07 Nov 12 @ 7:08 am
djdadPRO InfinityDevelopment ManagerMember since 2005
device_side works here (tried with an TM4), but some midi controllers are mapped differently (see MC6000 and others).
So try this..
action_deck 1 ? sampler 1 play_stop : action_deck 2 ? sampler 5 play_stop
if it works, we will come up with a full script on what you're asking
 

Posted Wed 07 Nov 12 @ 12:44 pm
Well the samples will play but the sample volume only works on the first sampler.

Im done with this though, weve wasted enough time here, lol!! I got the sampler working how I want which is the most important thing but as for the volume I'll just use my mouse until I give into the Korg NanoKontrol, lol!!

Hey Thanks for trying though
Huey

P.S. Wheres Chris (CSTOLL) been lately? Hope everything is good.......
 

Posted Wed 07 Nov 12 @ 6:05 pm
Ok I have a button on my DJC.4 and it switches from deck 1 to 3 on the left side and on the right it switches from 2 to 4. I want it to switch timecode control from deck 1 to 3 and the same on the other side when I hold down "SHIFT" .

Ive tried a couple of different things but its really giving me problems. Heres the script I use on my Ecler to switch,
deck 1 timecode_active on ? deck 1 timecode_active off & deck 3 timecode_active on & deck 3 timecode_mode "relative" & deck 3 rightdeck & deck 3 select : deck 3 timecode_active on ? deck 3 timecode_active off & deck 1 timecode_active on & deck 1 rightdeck & deck 1 select , thats for deck 1 and 3.
This is for decks 2 and 4,
deck 2 timecode_active on ? deck 2 timecode_active off & deck 4 timecode_active on & deck 4 rightdeck & deck 4 select : deck 4 timecode_active on ? deck 4 timecode_active off & deck 2 timecode_active on & deck 2 rightdeck & deck 2 select

And heres the script that the DJC.4 uses now,
action_deck 1 ? deck 1 leftdeck : action_deck 2 ? deck 2 rightdeck : action_deck 3 ? deck 3 leftdeck : action_deck 4 ? deck 4 rightdeck : nothing

Any help would be great and Thanks for the time
Huey
 

Posted Sun 11 Nov 12 @ 6:26 pm
Anyone??

I'll be glad when 8 comes out cause scripting looks like it's going to be a lot easier.........
 

Posted Mon 12 Nov 12 @ 11:40 am
63%