Ingreso rápido:  

Forum: General Discussion

Tema: vdjscript (if song x is on deck x then do this, otherwise do that) question... - Page: 1

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

Hi everyone.

I am trying to do the following (and it's not working, so I need a little help...):

I have a sampler (deck 5) with beat loops. I have only one button to operate that sampler. If there's no other sample playing, I want that single button to load and start playing the asigned sound file (looped) when I push the button once. When I push the button again, it should stop playing said file. If I hold the button, it should sync the sound file to the other deck. If there's another (different) sound file playing, the button should not do anything.

This is one of the (non-working) frasings I've come up with:

<button action="deck 5 load 'A:\BASS DRUM.mp3' ? deck 5 play ? holding ? deck 5 sync : off & deck 5 stop : on & deck 5 goto_first_beat & deck 5 loop 4 & deck 5 play_sync_onbeat & deck 5 beatlock : deck 5 play ? nothing : on & deck 5 load 'A:\BASS DRUM.mp3' & deck 5 goto_first_beat & deck 5 loop 4 & deck 5 play_sync_onbeat & deck 5 beatlock">

Can anyone help me correct the syntax of this script?
 

Mensajes Thu 16 Apr 15 @ 12:28 pm
locoDogPRO InfinityModeratorMember since 2013
I don't think your initial query was right, you really have a A:\ ? unusual...

try this and report back

HANG FIRE THIS ISN'T RIGHT

<button action="deck 5 get_filepath & param_equal 'A:\BASS DRUM.mp3' ? deck 5 play ? holding ? deck 5 sync : off & deck 5 stop : on & deck 5 goto_first_beat & deck 5 loop 4 & deck 5 play_sync_onbeat & deck 5 beatlock : deck 5 play ? nothing : on & deck 5 load 'A:\BASS DRUM.mp3' & deck 5 goto_first_beat & deck 5 loop 4 & deck 5 play_sync_onbeat & deck 5 beatlock">
 

Mensajes Thu 16 Apr 15 @ 1:03 pm
Thank you Locodog! I've tried your script but there's no change in the function of the button: like before, everything works except for the stop function... Might be that my frase is completely wrong in following order of the commands.

Any ideas?

Yeah, I'm using all my drive letters :)

 

Mensajes Thu 16 Apr 15 @ 1:18 pm
locoDogPRO InfinityModeratorMember since 2013
I'm having a horrible time with it, it will only play while held for me,

There's some really buggy behaviour with goto_first_beat,
It's a good idea but I can't help,
 

Mensajes Thu 16 Apr 15 @ 2:08 pm
Thanks ever so much for trying to help me, Locodog!!!

Anyone else in here who can help me?

DJDad?
 

Mensajes Thu 16 Apr 15 @ 3:16 pm
Over 300 hits on thsi post and nobody can help me?

Devs maybe?
 

Mensajes Fri 17 Apr 15 @ 3:49 am
Deejay Corny wrote :
Over 300 hits on thsi post and nobody can help me?

Devs maybe?


make that: over 500 hits
:P

(sneaky post bumper)
 

Mensajes Fri 17 Apr 15 @ 10:27 am
Could one of the devs take a look at this post, please?
Logically (script-wise), it should be possible. But it's not working.

@DJDAD: any ideas as to where the error lies?
 

Mensajes Thu 28 May 15 @ 3:11 am
AdionPRO InfinityCTOMember since 2006
Try to cut the script in smaller pieces to find out what part exactly is not doing what you expected.
 

Mensajes Thu 28 May 15 @ 3:26 am
That's exactly the way I wrote the script, Adion: little by little. The parts work, but not the complete command (which is what I need...)
:(
Thank's for your input, though!
:)
 

Mensajes Thu 28 May 15 @ 3:37 am
Almost a thousand hits and not a single word from the software developers yet?
 

Mensajes Thu 28 May 15 @ 7:01 am
locoDogPRO InfinityModeratorMember since 2013
You've had a reply from the CTO, what next Scalve to pop round and write it for you?
You understand script keep working at it.
 

Mensajes Thu 28 May 15 @ 8:06 am
Don't know what cto is, but assume Adion is from VDJ, right? If that is so, then I stand corrected Locodog :)
Who is Scalve?
I am, I truly am: look at the post dates. I'm working on it. And I'm patient. Just no luck yet... :( Was looking for some guidance or a clear and direct answer that it just isn't possible due to bugs or software restriction, that's all. Don't wanna waste my time with something they know isn't possible (yet) either...
Thanks for your input, though! :)
 

Mensajes Thu 28 May 15 @ 8:12 am
locoDogPRO InfinityModeratorMember since 2013
CTO = chief technology officer
Scalve = The boss.

If it wasn't possible they'd say, keep picking at it you may be on to a bug.
 

Mensajes Thu 28 May 15 @ 8:46 am
Will do!
:)
 

Mensajes Thu 28 May 15 @ 8:54 am
Haven't had any luck yet :(
But I'll let you guys know when I find the solution!
:)
 

Mensajes Sat 11 Jul 15 @ 8:44 am
I'm almost there...
 

Mensajes Thu 21 Jan 16 @ 11:54 am

I'm still trying to use a deck (with all it's advantages, like volume slider, effects, etc.) as a "loops sampler", to put looped and instantly synced and locked beat samples on songs with weak beats...

Okay, so what I've found out about above codes is that they won't work well because of some kind of conflict between containers and deck specifications in the button action itself. In VDJ8 - if I understand correctly - you have to make containers for decks and panels. So I've cleaned up the code and this should have been working perfectly, but it gives a rather esoteric behaviour...

<button action="play? get loaded_song 'filename' & param_equal 'BASS DRUM [4 LOOP - 120 BPM].mp3' ? on & stop & unload : nothing : load 'Y:\EFFECTS\BEAT LOOPS\BASS DRUM [4 LOOP - 120 BPM].mp3' & play_sync_onbeat & beatlock">

This code is inside the deck container. I've tested this 120 BPM loop sample with a 137 BPM song (setting PitchRange to 50% and autoPitchRange to yes in the options) and sometimes the beat is synced, sometimes it's slower (original BPM), and this puzzles me: sometimes it's too fast!

Can anyone shed some light on this erratic behaviour? Is it my fault and am I writing wrong code or is it a bug in VDJ8?
 

Mensajes Fri 22 Jan 16 @ 9:13 am
I furthermore discovered that the sample does not start everytime at the first beat, but sometimes there's a little pause (silence that's at the beginning of the sample?)...

Does anyone know if the verb "goto_first_beat" is actually working?

Another thing that's bothering me is that when I include "loop 4" in my frase, the whole thing stops working! My complete (and non-functional) code - as I need it - would be:

<button action="play? get loaded_song 'filename' & param_equal 'BASS DRUM [4 LOOP - 120 BPM].mp3' ? on & stop & unload : nothing : load 'Y:\EFFECTS\BEAT LOOPS\BASS DRUM [4 LOOP - 120 BPM].mp3' & goto_first_beat & loop 4 & play_sync_onbeat & beatlock">

This would make a button that:

1. loads and plays a specific, looped, synced and locked beat sample if nothing else is playing
2. does nothing if another sample is playing
3. stops and unloads the beat sample if it is the specified one for that button that's playing
4. only lights up when playing the specified sample

Maybe someone has a better idea of how to achieve this...
Or maybe someone could test my code...



P.S.
Could a moderator change the title of this post to something like: "making a custom loops sampler from a normal deck" to get more relevant attention?
 

Mensajes Fri 22 Jan 16 @ 9:37 am
I've replace the "go to first beat" statement with the "go to fifth beat" one... and now IT WORKS!

<button action="play? get loaded_song 'filename' & param_equal 'BASS DRUM [4 LOOP - 120 BPM].mp3' ? on & stop & unload : nothing : load 'Y:\EFFECTS\BEAT LOOPS\BASS DRUM [4 LOOP - 120 BPM].mp3' & goto 5 & loop 4 & play_sync_onbeat & beatlock">

This will give you the functions as described in my post above :)
Hope this is useful to someone.
 

Mensajes Fri 22 Jan 16 @ 11:05 am
95%