Entra:     


Forum: General Discussion

Topic: extreme jog mapping... ive hit a wall... - Page: 1

Questa parte dell'argomento è obsoleta e potrebbe contenere informazioni obsolete o errate

so as ive been mad busy with life stuff, everything else got put on hold.

now however, i have returned to one of my mapping projects and to the forums with an insanely difficult mapping quiery for the MP3e2

as some of you may recall (if your not old and grey by now) a loooong time ago i decided i was going to turn my MP3e2 into a dedicate fx/sampler unit?

if no one recalls, then thats fine ill blame it on you for developing erm that memory los thing... i cant remember what its called... oh yeat.. purple toaster...wait... no... anywho.......

so i want to map my jogs to do the folowing..ish

if sampler select toggle is active on either deck... use the corresponding jog for sampler volumes.

if not, then use the joggs for effect parameters 1&2 for both decks one and two... "seperatley"

so if deck 1 is playing an effect, then the jogs are used for that effect unless governed by a sampler toggle

if deck 2 is playing an effect then use the jogs for that effect unless governed by a sampler toggle

if both decks are playing an effect, incorporate the cross fader to switch between decks (without moving the actual fader) to alter both sides alternatley, unless governed by a sampler toggle.

hopefully someone can help me with this and the aim is lear enough from the short description

so far i have this, and the latest alteration regarding the "effect_active"? has broken everything lol

device_side "left"? var "sample_shiftl"? deck 1 sampler volume & param_multiply 1% : var "deck 1 effect_active"? deck 1 effect slider 1 : device_side "right"? var "sample_shiftr"? deck 2 sampler volume & param_multiply 1% : var "deck 1 effect active"? deck 1 effect slider 2
 

Inviato Sat 01 Jun 13 @ 1:48 pm
F#@k!!!!!!!!!!! i JUST WROTE OUT A WHOLE SOLUTION AND ACCIDENTALLY PRESSED TAB THEN BACKSPACE AND IT WAS GONE!!!!! PLEASE ATOMIX DISABLE THE BACKSPACE WHEN THE CURSOR IS NOT IN THE TEXTAREA OR ATLEAST HAVE A PROMPT BEFORE THE WINDOW RELOADS WHEN PRESSING BACKSPACE OR AJAX THE CURRENT TEXTAREA CONTENTS TO YOUR SERVER OR EVEN TO THE USERS SESSION DATA. ANYTHING IS BETTER THAN WHAT IS USED NOW!!!!!!

http://www.w3schools.com/php/php_sessions.asp
http://www.w3schools.com/php/php_ajax_intro.asp
http://www.w3schools.com/jsref/dom_obj_event.asp "event.preventDefault()"


back to the matter at hand.... Your one probably isn't working because you don't have any white space between the variable "name" and the question mark.. it should throw a syntax error. If you want you can use this.. it is a little more in depth, but hopefully not too complicated.

the variables it uses are

var '$sampShift' "this is used to determine if the sampler shift is active, you can use this on the LEDS, it is a toggle"
var '$sampLeft' "this will determine what sampler slot the left side of the controller will control, it is a cycle 0-6"
var '$sampRight' "this will determine what sampler slot the right side of the controller will control, it is a cycle 0-6"
var '$effect' "this will determine what deck the controller will control when in effect mode, it is a toggle"

crossfader

param_smaller 50% ? set '$effect' 0 : set '$effect' 1


jogs // the bold nothings could be out of place

device_side 'left' ?
var '$sampShift' ?
var '$sampLeft' 1 ? param_multiply 1% & sampler 1 volume :
var '$sampLeft' 2 ? param_multiply 1% & sampler 2 volume :
var '$sampLeft' 3 ? param_multiply 1% & sampler 3 volume :
var '$sampLeft' 4 ? param_multiply 1% & sampler 4 volume :
var '$sampLeft' 5 ? param_multiply 1% & sampler 5 volume :
var '$sampLeft' 6 ? param_multiply 1% & sampler 6 volume : nothing :
var '$effect' 0 ? param_multiply 1% & deck left effect slider 1 : param_multiply 1% & deck right effect slider 1 :
var '$sampShift' ?
var '$sampRight' 1 ? param_multiply 1% & sampler 7 volume :
var '$sampRight' 2 ? param_multiply 1% & sampler 8 volume :
var '$sampRight' 3 ? param_multiply 1% & sampler 9 volume :
var '$sampRight' 4 ? param_multiply 1% & sampler 10 volume :
var '$sampRight' 5 ? param_multiply 1% & sampler 11 volume :
var '$sampRight' 6 ? param_multiply 1% & sampler 12 volume : nothing :
var '$effect' 0 ? param_multiply 1% & deck left effect slider 2 : param_multiply 1% & deck right effect slider 2


// Back and forward buttons will reset the sampler cycle to 0 by holding them, this is the only way you can know what sample the decks will play without hitting them first. resetting the samples also allows the effects to operate this will activate the effects depending on the side of the controller which is held, you could maybe incorporate the leds to be on at shifts 1 & 3 or something. Pressing the buttons will cycle backward and forward.
// if you modify a skin you could use the 'sampLeft/Right' variables to show pannels of the active sampler for each deck, but currently it willl select the most recent selection of each deck

back

device_side 'left' ?
holding ? set '$sampShift' 0 & set '$sampLeft' 0 & set '$effect' 0 : set '$sampShift' 1 & cycle '$sampLeft' -7 & var '$sampLeft' 1 ? sampler 1 select : var '$sampLeft' 2 ? sampler 2 select : var '$sampLeft' 3 ? sampler 3 select : var '$sampLeft' 4 ? sampler 4 select : var '$sampLeft' 5 ? sampler 5 select : var '$sampLeft' 6 ? sampler 6 select : nothing :
holding ? set '$sampShift' 0 & set '$sampRight' 0 & set '$effect' 1 : set '$sampShift' 1 & cycle '$sampRight' -7 & var '$sampRight' 1 ? sampler 7 select : var '$sampRight' 2 ? sampler 8 select : var '$sampRight' 3 ? sampler 9 select : var '$sampRight' 4 ? sampler 10 select : var '$sampRight' 5 ? sampler 11 select : var '$sampRight' 6 ? sampler 12 select : nothing


forward

device_side 'left' ?
holding ? set '$sampShift' 0 & set '$sampLeft' 0 & set '$effect' 0 : set '$sampShift' 1 & cycle '$sampLeft' 7 & var '$sampLeft' 1 ? sampler 1 select : var '$sampLeft' 2 ? sampler 2 select : var '$sampLeft' 3 ? sampler 3 select : var '$sampLeft' 4 ? sampler 4 select : var '$sampLeft' 5 ? sampler 5 select : var '$sampLeft' 6 ? sampler 6 select : nothing :
holding ? set '$sampShift' 0 & set '$sampRight' 0 & set '$effect' 1 : set '$sampShift' 1 & cycle '$sampRight' 7 & var '$sampRight' 1 ? sampler 7 select : var '$sampRight' 2 ? sampler 8 select : var '$sampRight' 3 ? sampler 9 select : var '$sampRight' 4 ? sampler 10 select : var '$sampRight' 5 ? sampler 11 select : var '$sampRight' 6 ? sampler 12 select : nothing


// here is an example of what you can do with other buttons if you follow the pattern. one oddity is that either the left of right deck will activate/deactivate the effect based on the crossfader position.

play

device_side'left' ?
var '$sampShift' ?
var '$sampLeft' 1 ? sampler 1 play_stop :
var '$sampLeft' 2 ? sampler 2 play_stop :
var '$sampLeft' 3 ? sampler 3 play_stop :
var '$sampLeft' 4 ? sampler 4 play_stop :
var '$sampLeft' 5 ? sampler 5 play_stop :
var '$sampLeft' 6 ? sampler 6 play_stop : nothing :
var '$effect' 0 ? deck left effect active : deck right effect active :
var '$sampShift' ?
var '$sampRight' 1 ? sampler 7 play_stop :
var '$sampRight' 2 ? sampler 8 play_stop :
var '$sampRight' 3 ? sampler 9 play_stop :
var '$sampRight' 4 ? sampler 10 play_stop :
var '$sampRight' 5 ? sampler 11 play_stop :
var '$sampRight' 6 ? sampler 12 play_stop : nothing :
var '$effect' 0 ? deck left effect active : deck right effect active
 

is ther emuch new syntax dcoming into play recently preceeding the v8 release?

ill try some of the items you have posted synth, and see where i go, i notice your scripts arent 60 mile long anymore lol, im sure we can get it going :)
 

Blulite wrote :
i... i notice your scripts arent 60 mile long anymore lol, i....


Not true. Andrew is now making the scripts in paragraphs to look smaller :P

 

Oh sorry I wrote that in the original version before I lost it, you need to delete out the new lines. if you use a text editor like sublime text 2 or notepad++ you can use regular expression to find '\n' and replace with '\s' "whitespace". I tend to write scripts like that as they are easier to manage and I'm a little out of practice... here is a simple webpage that you can use to delete the spaces, just open notepad paste it in and save it as vdjregexer.html, then open it in firefox, chrome or safari 'it won't look very nice in IE less than version 10' ;-)


<!doctype html><html><head><script type="text/javascript">function regexme(){input = document.getElementById('input').value;input = input.replace(/\n/g, ' ');input = input.replace(/\s\s/g, ' ');document.getElementById('output').innerHTML = input;}</script><style type="text/css">body{background:#222;padding:50px;font-family:sans-serif;}article{background: #242424;color:#9d8980;font-family:sans-serif;width:1000px;margin:auto;box-shadow: 2px 2px 15px #111;padding:20px;}textarea, input[type=text]{background: #333;border:none;color:#59a;border:1px solid #1d1d1d;transition:1.5s border;box-shadow: 2px 2px 10px 0px #222 inset;max-width: 1000px;min-width: 1000px;}textarea:focus, input[type=text]:focus{background: #3d3d3d;}input[type=button]{background: #00b7ea;background: -webkit-linear-gradient(top, #00b7ea 0%,#33aaff 52%,#009ec3 100%);background: linear-gradient(to bottom, #00b7ea 0%,#2299dd 52%,#009ec3 100%);height:50px;width:150px;border:none;border-radius: 5px;box-shadow: 2px 2px 5px #111;float:right;}input[type=button]:hover{background: #00b7ea;background: -webkit-linear-gradient(top, #00b7ea 0%,#33aaff 52%,#009ec3 100%);background: linear-gradient(to bottom, #00b7ea 0%,#33aaff 52%,#009ec3 100%);height:50px;width:150px;border:none;border-radius: 5px;box-shadow: 2px 2px 15px #111;}h1{font-size: 50px;padding-top:0px;text-shadow:2px 2px 5px #111;text-align: center;}#by{text-align:center;margin-left:auto;margin-right:auto;color:#a53;font-size:12px;}</style></head><body><div id="content"><header><h1>VDJ RegExr</h1></header><article><form><textarea name="input" id="input" cols="125" rows="20" spellcheck="false"></textarea><input type="button" value="RegExMe" onclick="regexme()"></form><br><br><br><p id="output">output here</p></article><p id="by">synthet1c</p></div></body></html>
 

djdad wrote :
Blulite wrote :
i... i notice your scripts arent 60 mile long anymore lol, i....


Not true. Andrew is now making the scripts in paragraphs to look smaller :P



lmao.. yeah i see what you mean now andrew has re typed the script....

synth... DAYMNNN BROTHER! seriously if bed time fun was as long as that my wife would be extremely happy lmao..

..................................................

EDIT: :(... lmao andrew, i need a script to make my jogs work, not to delete whitespace lmao... you really are out of practice it would seem hehe..

 

getting closer :)

device_side "left"? var "sample_shiftl"? deck 1 sampler volume & param_multiply 1% : deck 1 effect active on? deck 1 effect slider 1 : deck 1 effect active on? deck 1 effect slider 2 : var "sample_shiftr"? deck 2 sampler volume & param_multiply 1% : deck 2 effect active on? deck 2 effect slider 1 : device side "left"? deck 2 effect active on? deck 2 effect slider 2 : nothing
 

still stuck, fr some reason i cant get this quirte right?????????????

device_side "left"? var "sample_shiftl"? deck 1 sampler volume & param_multiply 1% : deck 1 effect active on? deck 1 effect slider 1 : deck 1 effect active on? device_side “left”? deck 1 effect slider 2 : var "sample_shiftr"? deck 2 sampler volume & param_multiply 1% : deck 2 effect active on? deck 2 effect slider 1 : device_side "right"? deck 2 effect active on? deck 2 effect slider 2 : nothing

any ideas ?
 

device_side 'left' ?
var 'sample_shiftl' ? param_multiply 1% & sampler volume
deck left effect active ? param_multiply 1% & deck left slider 1 :
deck_right effect active ? param_multiply 1% & deck right slider 1 :
nothing :
var 'sample_shiftr' ? param_multiply 1% & sampler volume :
deck left effect active ? param_multiply 1% & deck left effect slider 2 :
deck right effect active ? param_multiply 1% & deck right effect slider 2 :
nothing

the problem with doing it like this is that the left effect will always override the right.
 

didnt work, nothing at all worked lol. im gonna try a mixture of mine and your scripots tho and see what i can pull out of the hat.

this things proving extremely difficult :)

 

it was written on a tablet. I can see a mistake of deck_right... at the end of sampler shift there is no colon, and the left side effects don't say 'effect' sorry bro it's on predictive text and don't know how to turn it off. This should work

device_side 'left' ?
var 'sample_shiftl' ? param_multiply 1% & sampler volume :
deck left effect active ? param_multiply 1% & deck left effect slider 1 :
deck right effect active ? param_multiply 1% & deck right effect slider 1 :
nothing :
var 'sample_shiftr' ? param_multiply 1% & sampler volume :
deck left effect active ? param_multiply 1% & deck left effect slider 2 :
deck right effect active ? param_multiply 1% & deck right effect slider 2 :
nothing
 

thats, fine, i noticed several items that werent quite right, as we usually do, i made some changes to your script and got most things working, the issue i have now is that the sampler volume will not work on individual decks, im not sure why, it doesnt seem to matter which var "sampler_shift" is active, the sampler volume is still turning on both decks as opposed to individually while the variable is active, heres the edited script

device_side 'left' ? var 'sample_shiftl' ? deck 1 sampler volume & param_multiply 1% : deck 1 effect active on? deck 1 effect slider 1 : deck 2 effect active on? deck 2 effect slider 1 : nothing : var 'sample_shiftr' ? deck 2 sampler volume & param_multiply 1% : deck 1 effect active on ? deck 1 effect slider 2 : deck 2 effect active on? deck 2 effect slider 2 : nothing

from what i can gather, my mistake in my original script was the seperation of the script using a "nothing" in the middle, the rest pretty much was the same as yours more or less.
 

oh, and if your using an android tablet, goto 'settings > lamguages & input' all the settings to turn off predictive text ans the likes are in there.
 

nice one, will do... do you know how to highlight a word to copy and paste... I can't do it everytime, and can never do it on any HTML text embedded in the page.
 

yeah, hold the screen like a long press, youll get either a pop up with "select all, copy, cut & paste" on it
or you will get two arrows on the text, these arrows you drag over the text you want and then tap the screen and it will auto copy it to your clipboard
 

it might be the version I am using, it's the X-86 android project as I have an atom windows tablet. when I hold on text it asks if I want to copy the background image...
 

i this case, try to double tap the text and see if the highlight arows appear. if that doesnt work, then im afraid im not sure.
 

ive still not quite got this to work, its working about 80% still have a few little bits to work out, next thing though is deciding what i want to do with the rest of the unit.
 

synthet1c wrote :
F#@k!!!!!!!!!!! i JUST WROTE OUT A WHOLE SOLUTION AND ACCIDENTALLY PRESSED TAB THEN BACKSPACE AND IT WAS GONE!!!!! PLEASE ATOMIX DISABLE THE BACKSPACE WHEN THE CURSOR IS NOT IN THE TEXTAREA OR ATLEAST HAVE A PROMPT BEFORE THE WINDOW RELOADS WHEN PRESSING BACKSPACE OR AJAX THE CURRENT TEXTAREA CONTENTS TO YOUR SERVER OR EVEN TO THE USERS SESSION DATA. ANYTHING IS BETTER THAN WHAT IS USED NOW!!!!!!


99.99% of websites behave this way.

This is why you always type long posts into Notepad first.
 

it's not really that hard to fix though. You just need to see if there is any text in the textarea, if there is show a prompt and allow the user to decide if they want to lose everything eg.


function areYouSure(){
var c=confirm("are you sure you want to leave?")
if (c==true){
window.back();
}
}
if(document.getElementsByTagName('textarea')[0].value != ''){
window.onBeforeUnload = function(){areYouSure()}
}

 

95%