Jump to content

Schoorstijn

Member
  • Posts

    6
  • Joined

  • Last visited

Schoorstijn's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. I've made the plunge and upgraded to Sierra. Guess what... It wall works without the blink of an error! Didn't expect that it would solve the problem immediately but it did. I would say El Capitan with the latest version of Logic pro x should still do the trick but I guess not.. Happy scripting, thanks a lot guys!
  2. Hmmm alright, seems like upgrading is the way to go to update Java en then see if works like that. I think upgrading to Sierra is pretty safe at the moment anyways, so I might try it later this week Will get back to you guys to let you know how it went! Thanks for all the help guys and Unheardofski haha I can imagine!/memberlist.php?mode=viewprofile&u=67516
  3. Thanks again for the great help! I think you're right about there being some kind of issue with JavaScriptCore.. I copied the text and created a 'script.html' file which I then opened in Safari with the developer Error console enable. I open the page in Safari, but I just see the same text that I copied and pasted and saved (as a proper html file, no text file extension or something). Attached you can see how it looks! No error, just the script text on a webpage.. It's no problem for me to begin a debugging process of Javascript, but I don't think this will tell you anything right? About the last step, any new project I create with a midi channel + scripter + probability script will generate this error for me... Cheers, Stijn Script.html in safari
  4. Hi Nseruame, Thanks for the quick response again buddy! Hmmm yeah I thought it must be the case, did seem like it should just work.. There are definitely no other lines of code, I made sure to clean the whole area and just paste the code above. I'm running El Capitan (10.11.2) and Logic Pro X 10.3.1, not sure if that would cause issues but if you think I need to upgrade to Sierra or 10.3.2 then I might try Hmm nope haven't modified any of the original scripts as far back as I can remember. Other preset scripts that are included with Logic are running fine as is.. Hope someone has an idea! Might have to do a fresh install of Logic, hopefully not the OS but might try that further down the line. Thanks!
  5. Hi Nseruame! Thanks for the respone and all the useful info! Yeah I'm not sure what I'm doing wrong, I have a project with a MIDI track, a midi region (just for the sake of testing) with some notes, the scripter in the midi effects slot. I copy the entire script I download which looks as attached. I've added a screenshot of what happens when I press 'run script'. As said I've tried to edit some of the parameters, but to me it looks like it doesn't use the right code language necessary to define all the assets. I might be wrong of course.. Any help you could point me to as to what I'm doing wrong? I will definitely dive into those Javascript resources, but it will probably take some before I can diagnose the errors correctly myself.. Transpose probability script run screenshot // // Probably Note // Created by Attila Enhardt on 2017-04-14 // Copyright codecave STHLM / LogicScripts 2017. // PluginParameters = []; let scriptName = new Parameter(null, "Probably Note by codecave STHLM") let prob = new Parameter(null, "Transpose probability", "lin", "prop", null, 0, 100, 0, 100, " %"); let semiTones = new Parameter(null, "Transpose semitones", "lin", null, null, -12, 12, 0, 24, " st."); let noteLookUp = []; for (let i = 0; i < 128; i++) { noteLookUp.push(i); } function HandleMIDI(e) { if (e instanceof NoteOn) { treatNoteOn(e); } if (e instanceof NoteOff) { treatNoteOff(e); } e.send(); } function treatNoteOn(e) { let p = Math.floor(Math.random() * 101); if (p <= GetParameter("Transpose probability")) { let originalPitch = e.pitch; e.pitch += GetParameter("Transpose semitones"); noteLookUp[originalPitch] = e.pitch; } } function treatNoteOff(e) { let originalPitch = e.pitch; e.pitch = noteLookUp[e.pitch]; noteLookUp[originalPitch] = originalPitch; } function Parameter(cb, n, t, pc, vs, miv, mav, def, nos, unit) { let vsl = vs ? vs.length : null; this.callBack = cb || function(v) { this.currentValue = v; }; this.name = n; this.type = t || "text"; this.pc = pc || null; this.valueStrings = vs || null; if (t != "checkbox") { this.minValue = miv || 0; this.maxValue = mav || 0; } this.defaultValue = def || Math.floor(vsl / 2) || 0; this.numberOfSteps = nos || vsl || null; this.unit = unit || null; this.pc = pc || null; this.currentValue = 0; this._index = PluginParameters.length; this.remove = function() { PluginParameters.splice(this._index, 1); }; PluginParameters.push(this); }
  6. Hi guys, I'm interested in exactly this same thing, and registered on this forum (which looks rather helpful anyway) to respond to this conversation. The script provided doesn't seem to work for me and even though I tried adjusting some of the parameters (I have no knowledge of Javascript yet) I can't get it to work. Could someone post a version of this script that works in Logic Pro X 10.3.1 ? Also if you have some good pointers for learning Javascript it would be greatly appreciated! Cheers
×
×
  • Create New...