@ustk aaahhhh here you go! haha. I gotta see this...brb.
Posts
-
RE: Background Task || Help me understand this please.posted in Scripting
-
RE: Background Task || Help me understand this please.posted in Scripting
@ustk I ended up figuring it out. I had it all twisted up. lol. I get it a little bit now tho. Thanks!

-
RE: Background Task || Help me understand this please.posted in Scripting
I think im confused how to name the functions properly.....


-
BackgroundTask.setFinishedCallback() || How to get status....posted in Scripting
How do I get the isFinished or wasCancelled state for scripting?
You can see what I did. Although my function seems to complete (do what I expect), I dont see either of the first two Console.print()'s or the one inside my isFinished() check.obviously I stole this little part from docs. Everything else seems to be working fine, I just get no action out of this part for some reason....
// We can use the finish callback to show / hide some elements bgFindTokens.setFinishCallback(function(isFinished, wasCancelled) //////////////////////// { bgFindTokens.setProgress(0.0); Console.print("Finished: " + isFinished); Console.print("Cancelled: " + wasCancelled); /// if (isFinished)// <-----I tried this too... if (bgFindTokens.isFinished) { Console.print("We FINISHED"); } }); -
RE: Background Task || Help me understand this please.posted in Scripting
@ustk Sweet. So other than that, is that pretty much the process?
I have helper functions that are called inside of my parsing script but exist outside of my function. Do those need to be dealt with specifically or are they automatically handled on the background thread also because they are called from within my background function?
-
Background Task || Help me understand this please.posted in Scripting
I have a heavy token parsing function that crashes when I query large directories. I was told to execute this function on a 'background thread' so I've been looking into it. I just need some clarification from someone with experience with this please.
I have this function:
inline function onbtnFindTokenControl(component, value) { // Search files here } btnFindToken.setControlCallback(onbtnFindTokenControl);This function is triggered with a Button on my interface labeled "LOAD".
Based on what i've read so far....is this pretty much how you do this?
inline function onbtnFindTokenControl(component, value) { // Search files here } btnFindToken.setControlCallback(onbtnFindTokenControl); BackgroundTask.callOnBackgroundThread(onbtnFindTokenControl); // I could put this into the button callback and changed my button callback to // a regular inline function.....is this correct? -
RE: Ableton Automation can't do math?posted in General Questions
@iamlamprey Looks like the value is being normalized somewhere.
-
RE: Syntax Error ?posted in Scripting
@Lindon I havent gotten that one much before. I get whats happening now.

-
RE: Setting ControlCallback w/ Loops ?posted in Scripting
@Lindon Thank You
Im gonna try this in a bit and get back to you. Appreciate it! Love the energy. 
-
RE: Setting ControlCallback w/ Loops ?posted in Scripting
@Lindon @Oli-Ullmann @d-healey

Thank Yous! ha.

-
RE: Syntax Error ?posted in Scripting
@d-healey Yeah I think it was a wrong type of value trying to be written in.
-
RE: Setting ControlCallback w/ Loops ?posted in Scripting
@Orvillain sheet. lol. See.. I told you im goofing it. all the loops got me in a loop. lol. Im not exactly sure how to go about that at the moment. Im definitely mixed up a little bit but still trying to figure it out.
-
Syntax Error ?posted in Scripting
I dont remember changing anything to do with this part of the script and all of a sudden I cant get rid of this error message "Syntax Error" . Any clues?
Everything was working fine until it wasnt. No clue why all of a sudden, Syntax Errorr...

EDIT:
I figured out how to get rid of the error, but I dont know what caused it. Can someone please shed some light?How I fixed: deleted "DrumKits.json" and re-compiled.
-
Setting ControlCallback w/ Loops ?posted in Scripting
Can someone please advise on this....
im trying to learn how to set control callbacks with loops for obvious reasons when dealing with large amounts of components.
I know i've seen an example of this before somewhere but I cant remember where, so I've been trying to do it from scratch but i've been stuck. Can you please advise?
Be nice, this is my first time doing this.

const var SimpleGain1 = Synth.getEffect("Simple Gain1"); const var SimpleGain2 = Synth.getEffect("Simple Gain2"); const var SimpleGain3 = Synth.getEffect("Simple Gain3"); const var SimpleGain4 = Synth.getEffect("Simple Gain4"); const var SimpleGain5 = Synth.getEffect("Simple Gain5"); const var SimpleGain6 = Synth.getEffect("Simple Gain6"); const var SimpleGain7 = Synth.getEffect("Simple Gain7"); const var SimpleGain8 = Synth.getEffect("Simple Gain8"); const var samplers = [ AudioLoopPlayer1Sampler, AudioLoopPlayer2Sampler, AudioLoopPlayer3Sampler, AudioLoopPlayer4Sampler, AudioLoopPlayer5Sampler, AudioLoopPlayer6Sampler, AudioLoopPlayer7Sampler, AudioLoopPlayer8Sampler ]; const var SampleVolumeKnobs = [Content.getComponent("knbVolume1"), Content.getComponent("knbVolume2"), Content.getComponent("knbVolume3"), Content.getComponent("knbVolume4"), Content.getComponent("knbVolume5"), Content.getComponent("knbVolume6"), Content.getComponent("knbVolume7"), Content.getComponent("knbVolume8")]; inline function onSampleVolumeKnobsControl(component, value) { for (i = 0; i < samplers.length; i++) // used samplers.length to be difficult. im using this length somewhere else also so it was convenient { i.setAttribute(0, value); } }; inline function allSampleVolumeKnobs(component, value) { for (i = 0; i < 7; i++) { if (value) { SimpleGain[i].setControlCallback(onSampleVolumeKnobsControl); } } }I have a good feeling that I goofed this. lmao.
-
RE: Wavetable Synth Crash on note playedposted in General Questions
@whereami518 Do you have anything scripted in onNoteOn?
-
RE: Imgur not working in the UK is really starting to piss me off!
posted in General Questions@dannytaurus
So you've never seen my pretty profile pic before?? haha
Nice to meet you!

-
RE: Check if (!FILE) do this...posted in Scripting
@Oli-Ullmann @iamlamprey I promise you guys I was looking for this. hahaha. Thank You

That was it...Thank you guys!
-
Check if (!FILE) do this...posted in Scripting
Im trying to just check if a text file exists, read the text....if no file exists, create an empty text file.
If I was doing this correctly the file should be created upon compiling (f5) correct?// Search All Files reg rootFolder = FileSystem.getFolder(FileSystem.Desktop); reg allFiles = FileSystem.findFiles(rootFolder, "*.wav", true); const appDataFolder = FileSystem.getFolder(FileSystem.AppData); const fileData = appDataFolder.getChildFile("LastUserSelectedFolder.txt"); const LastSelectedLocation = "Test this"; Console.print(fileData.loadAsString()); if (fileData) { rootFolder = fileData.loadAsString(); Console.print("File Is Here: " + rootFolder); } else { Console.print("Nothing Is Here"); fileData.writeString(""); }