Ingreso rápido:  

Forum: General Discussion

Tema: Script School - Page: 17.35

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

locoDogPRO InfinityModeratorMember since 2013
param_equal `get_browsed_folder` "YOUR_STRING" ? TRUE : FALSE

could also use

param_contains
with
get_browsed_filepath

if you need the query to not be as specific
 

Mensajes Tue 28 Sep 21 @ 11:16 am
NicotuxHome userMember since 2014
if its only for samples they are virtual elements

param_equal `get_browsed_song extension` vdjsample ? browser_window songs
 

Mensajes Tue 28 Sep 21 @ 4:39 pm
mg_1978PRO InfinityMember since 2008
get_browsed_filepath & param_contains ‘Recordings’
is perfect! thanks for the script; i have another question:
with a button i would record max 9 files in folder ‘Recordings’, i have write this script:
browser_gotofolder ‘Sampler\Recordings’ & browser_window ‘songs’ & file_cont 10 ? nothing : sampler_rec ‘master’
but with this script i push 2 time button for recording…1 time for set folder focus in folder ‘Recordings’ and 2 time for recording from master….could i do this with script that record or not pushing only 1 time button? thanks a lot!
 

Mensajes Wed 29 Sep 21 @ 8:10 am
mr.ZvooK wrote :
Hello everyone. So, I have a few questions.
1) Play Next or automix_add_next - which of these 2 functions will be more suitable for me? You need to add a script to the task schedule:
add one (specific or random) file from the folder as follows! Let's call them * workfile (s), while it is located in one specific folder (or it can be a virtual folder). Next.... We expand the possibilities.... There are 72 files in that folder, 3 pcs. for each hour, i.e. you need to run a file every time that has not yet been played today.

2) Task schedule - This task must be repeated every 20 minutes during the day.

Let's start with this, if there is a correct solution, then I will continue to throw up interesting ideas.


There is no answer or recommendation to my question?
 

Mensajes Wed 29 Sep 21 @ 12:40 pm
NicotuxHome userMember since 2014
@mg_1978

try

browser_gotofolder 'sampler://Recordings' & browser_enter & param_equal `file_count` 10 !? sampler_rec master

or add some delay for browser to end action if too slow

browser_gotofolder 'sampler://Recordings' & repeat_start dx 170ms 1 & browser_enter & param_equal `file_count` 10 !? sampler_rec master

take care about the count if some more 10 other records exist, script will do
may prevent by using

browser_gotofolder 'sampler://Recordings' & browser_enter & param_bigger `file_count` 9 ? sampler_rec master
 

Mensajes Wed 29 Sep 21 @ 2:22 pm
mg_1978PRO InfinityMember since 2008
@Nicotux
thanks a lot, your scripts works!

today my question is: if i use scripts like ‘mic_rec’ or ‘linein_rec’, in the deck there is the recorded…can i directly save a .vdj or .mp3 file (with script button that i don’t know) that is in my deck? or i can only put deck recorded in loop and use sampler_rec 1 (for example) to create a sample file .vdj? thanks
 

Mensajes Thu 30 Sep 21 @ 8:14 am
locoDogPRO InfinityModeratorMember since 2013
@mr.ZvooK, setting up adverts?

make a filter that grabs for your 72 files, also include & Last Play > 0.5
[use 0.5 as 1 would allow for no variety day after day]
Random is tricky, maybe when your 20 minute timer strikes, jump to your filter,
something like this to get a random number,
set test `param_mod "file_count" "get_time elapsed"`

then use test as the count for a rsi performing browser_scroll
 

Mensajes Thu 30 Sep 21 @ 1:45 pm
locoDogPRO InfinityModeratorMember since 2013
JUMP TO FILTER & set test `get_clock 1000 & param_multiply 0.001 & param_cast 'frac' & param_multiply 1000` & set test `param_mod "file_count" "get_var test"` & var_smaller 'test' 0 ? param_multiply "get_var test" -1 & RSI WITH BROWSER SCROLL : RSI WITH BROWSER SCROLL

I forgot about get_clock 1000, probably the best way to get a random number.
 

Mensajes Fri 01 Oct 21 @ 7:36 am
mg_1978PRO InfinityMember since 2008
have you any ideas??? thanks a lot

today my question is: if i use scripts like ‘mic_rec’ or ‘linein_rec’, in the deck there is the recorded…can i directly save a .vdj or .mp3 file (with script button that i don’t know) that is in my deck? or i can only put deck recorded in loop and use sampler_rec 1 (for example) to create a sample file .vdj? thanks[/quote]

 

Mensajes Sat 02 Oct 21 @ 8:37 am
NicotuxHome userMember since 2014
TIP about complex actions in actions
( I don't know how site will accept this :\ )

Sometimes actions need to use result of actions and strings
they can use back quotes and quotes and apostrophes ( `xxx` 'xxx ' and "xx" )

when the result have to be display in a text or button or slider ....
the skin need to enclose it in quotes or apostrophes
text="" or format="" or action="" ...
this can be an issue

there is a standard workaround to this : remember xml entities : > < & " '

you can then write complex strings like that :

action="param_add `param_add "get_text ')' " 'param_add "get_automix_song artist +1"' " - (" ` `param_add 'get_automix_song title +1' "get_text ' Comming next : ' " ` & param_cast text"
 

Mensajes Sun 03 Oct 21 @ 6:19 am
mg_1978PRO InfinityMember since 2008
hi at all, in my Pioneer DDj-RZX i have mapped 2 buttons like Rekordbox Sequencer..but i record from ‘master’ output…could i record from sampler output? for example i have mapped a button: sampler_rec ‘master’; i tried to write sampler_rec ‘sampler’ but doesn’t work :(; if i choose deck 3 output for sampler i tried to write button: deck 3 sampler_rec but doesn’t work :( can you help me? thanks!
 

Mensajes Tue 05 Oct 21 @ 5:36 am
locoDogPRO InfinityModeratorMember since 2013
deck 1 sampler_rec
works here, are you internal or external mixer?
 

Mensajes Tue 05 Oct 21 @ 6:46 am
mg_1978PRO InfinityMember since 2008
locodog wrote :
deck 1 sampler_rec
works here, are you internal or external mixer?


thanks for answer, i have internal mixer mode, but deck 1 sampler_rec record track or loop or portion track that is in deck 1…i would record output about sampler…for example i would record sampler 1 playing + sampler 2 playing + sampler 7 playing, like a rekordbox sequencer…now i make this recordind master output…but i would record only sampler output…

 

Mensajes Tue 05 Oct 21 @ 8:36 am
locoDogPRO InfinityModeratorMember since 2013
so output to a deck not in use. If all 4 decks are in use there is the invisible deck option but it might confuse your workflow.
 

Mensajes Tue 05 Oct 21 @ 9:07 am
mg_1978PRO InfinityMember since 2008
locodog wrote :
so output to a deck not in use. If all 4 decks are in use there is the invisible deck option but it might confuse your workflow.

sorry deck1 sample_rec is perfect! recording all sound that flow in mixer channel 1 👏👏
 

Mensajes Tue 05 Oct 21 @ 10:25 am
mg_1978PRO InfinityMember since 2008
mg_1978 wrote :
locodog wrote :
so output to a deck not in use. If all 4 decks are in use there is the invisible deck option but it might confuse your workflow.

sorry deck1 sample_rec is perfect! recording all sound that flow in mixer channel 1 👏👏


question: can i record from sampler headphones? wich is correct script? sampler_rec ‘headphones’ or ‘headphones’ sampler_rec don’t works :(
 

Mensajes Tue 05 Oct 21 @ 6:07 pm
locoDogPRO InfinityModeratorMember since 2013
answer; no not possible.
 

Mensajes Tue 05 Oct 21 @ 6:19 pm
locoDogPRO InfinityModeratorMember since 2013
get_beat_bar & some applied maths.

May as well write something, and I last said, get_beat_bar, so what is it?
It returns a value between 0.0 & 1.0 to represent the current position of the current bar,
if it returns 0.25, you're exactly on the second beat, 0.5 third beat.

it accepts a parameter [any positive integer]
so get_beat_bar 1, returns 0.5 when you are half way between two beats
get_beat_bar 32, returns 0.5 when you are exactly on the 17th beat.

lets make something with it. How about an echo that turns itself off

effect_active 'echo' on & repeat_start 'rsEchoEnd' 30ms -1 & param_bigger `get_beat_bar 4` 0.03125 ? effect_active 'echo' off & repeat_stop 'rsEchoEnd' : nothing

nothing much to it, echo on, rsi started, when 0.03125 is bigger than what beat_bar 4 returns, turn the fx off and the rsi off

let's do something a bit more involved.
let's make the filter dial oscillate from off [50%] to 80% and back over 8 beats. button on button off

Without thinking we'll do the bits we can do without thinking, button on button off logic, is a rsi running? yes stop it : no so we'll start it

repeat_start_instant 'filtOsc' ? repeat_stop 'filtOsc' : repeat_start_instant 'filtOsc' 30ms -1 &...


we have some things to figure out. Lets think about going up from 0.5 to 0.8 first.

when beat_bar 8 returns 0.0 we want the filter to be 0.5
when beat_bar 8 returns 0.5 we want the filter to be 0.8
so 0.5 change from beat_bar is 0.3 change in the filter, so 3/5ths, multiply by 0.6, then add 0.5 because our filters start is 0.5

get_beat_bar 8 & param_multiply 0.6 & param_add 0.5 & param_cast & filter

test that on a button, it seems to work, but it breaks our design spec when beat_bar returns more than 0.5, let's check for beat_bar >0.5

param_bigger `get_beat_bar 8` 0.5 ? 0.5 is bigger than beat_bar, we have the script for that : 0.5 is smaller than beat_bar, we need to work out how to do that.

0.0 to 0.5 worked very well for the way up, how can we get 0.5 to 0.0 for the way down?
well, 1 - get_beat_bar 8 would do that but how to script that.

get_beat_bar 8 & param_multiply -1 & param_add 1 &

*SIDE NOTE AT THE END*

try it out on a test button
get_beat_bar 8 & param_multiply -1 & param_add 1 & param_multiply 0.6 & param_add 0.5 & param_cast & filter

seems ok when beat bar is > 0.5, lets combine both buttons and the >/< 0.5 check

param_bigger `get_beat_bar 8` 0.5 ? get_beat_bar 8 & param_multiply 0.6 & param_add 0.5 & param_cast & filter : get_beat_bar 8 & param_multiply -1 & param_add 1 & param_multiply 0.6 & param_add 0.5 & param_cast & filter


Strap it all together, job done

repeat_start_instant 'filtOsc' ? repeat_stop 'filtOsc' : repeat_start_instant 'filtOsc' 30ms -1 & param_bigger `get_beat_bar 8` 0.5 ? get_beat_bar 8 & param_multiply 0.6 & param_add 0.5 & param_cast & filter : get_beat_bar 8 & param_multiply -1 & param_add 1 & param_multiply 0.6 & param_add 0.5 & param_cast & filter


Side note
get_beat_bar 8 & param_multiply -1 & param_add 1 &
works but could also be expressed as
get_beat_bar 8 & param_invert &
 

Mensajes Thu 07 Oct 21 @ 6:02 am
mg_1978PRO InfinityMember since 2008
wow!!
 

Mensajes Thu 07 Oct 21 @ 8:29 am
mg_1978PRO InfinityMember since 2008
hi at all! i’m modifying sampler page and i would record with pad 9-16 in rightdeck what i “play” samples 1-8 in leftedeck..like a sequencer. i’m in “Recordings bank” and i have put 8 samples..in this way i can play samples in leftdeck….in rightdeck with pad 9-16 i would record what i play (for this i have a var ‘bank’ = 0 for pad 1-8 and 1 for pad 9-16) and i have mapped pad 1:
var ‘bank’ 1 ? leftdeck ? sampler_bank ‘recordings bank’ ? sampler_loaded 9 ? sampler_pad 9 : sampler_rec 9 ‘master’ : sampler_pad 9 ‘master’ : sampler_bank ‘recordings bank’ ? sampler_loaded 9 ? sampler_pad 9 : sampler_rec 9 ‘master’ : sampler_loaded 9 : var ‘bank’ 0 ? leftdeck ? sampler_bank ‘recordings bank’ ? sampler_loaded 1 ? sampler_pad 1 : sampler_rec 1 ‘master’ : sampler_pad 1 : sampler_bank ‘recordings bank’ ? sampler_loaded 1 ? sampler_pad 1 : sampler_rec 1 ‘master’ : sampler_pad 1 : nothing

and i have mapped param1:
param_bigger 0.5 ? var ‘bank’ 0 ? sampler_loaded 8 ? set ‘bank’ 1 : nothing : var ‘bank’ 1 ? set ‘bank’ 0

but my problem is in rightdeck (with var ‘bank’ 1) sampler_pad 9 ‘play’ same sample in leftdeck sampler_pad 1 (with var ‘bank’ 0) :(
can you help me?
thanks!
 

Mensajes Thu 07 Oct 21 @ 8:52 am
37%