LeosScripts Posted November 27, 2023 Share Posted November 27, 2023 This is the first time i'm posting here (and at any forum). I found it incredibly annoying that the universal audio b3 organ doesn't have a midi mapping section so me and my good friend chat gpt made this simple script. I know you can do this with the logic controller assignments but found this to be faster and easy use in both mainstage and logic UADx Waterfall B3 midi cc fix 2.pst 1 Quote Link to comment Share on other sites More sharing options...
Jordi Torres Posted November 27, 2023 Share Posted November 27, 2023 Hi Leo, Thanks for sharing your script. Although it will not affect the functionality, it could be made more concise by using an object literal instead of that big switch statement. Also, you don't really need that Reset function. J. UADx Waterfall B3 midi cc fix 2_JT.pst 1 1 Quote Link to comment Share on other sites More sharing options...
LeosScripts Posted December 2, 2023 Author Share Posted December 2, 2023 oooh that's so good to know for future scripts! Thank you Jordi! 1 Quote Link to comment Share on other sites More sharing options...
Jordi Torres Posted December 2, 2023 Share Posted December 2, 2023 You're welcome Leo! Modern JS is such an improvement over JS from 2014 and earlier, and it's great we can use it within Scripter as long as the version of the macOS JavaScriptCore framework is recent (which will be the case if macOS itself is recent 🙂). J. Quote Link to comment Share on other sites More sharing options...
Dewdman42 Posted December 5, 2023 Share Posted December 5, 2023 Scripter basically uses whatever is in safari as I understand it Quote Link to comment Share on other sites More sharing options...
Jordi Torres Posted December 5, 2023 Share Posted December 5, 2023 31 minutes ago, Dewdman42 said: Scripter basically uses whatever is in safari as I understand it Well, Safari's WebKit browser engine's JS engine is also based in JavaScriptCore, but I think that what Scripter uses may be coming from what we have in /System/Library/Frameworks/JavaScriptCore.framework But I just checked, and Safari and Ventura's JavaScriptCore framework appear to be in sync and both support the latest ECMAScript (Edition 14 - ECMAScript 2023). They both support the new Array.prototype.toSorted method. J. Quote Link to comment Share on other sites More sharing options...
Dewdman42 Posted December 5, 2023 Share Posted December 5, 2023 which version of macOS are you using to confirm that? I'm still on Monterey, so I guess mine isn't edition 14 hehehe But good to know. Quote Link to comment Share on other sites More sharing options...
Jordi Torres Posted December 5, 2023 Share Posted December 5, 2023 I'm on the latest Ventura (13.6.1), as per my signature 😉 There's even a little shell (jsc) you can play around with in macOS: https://seasidetesting.com/2021/07/10/conveniently-start-a-javascript-shell-jsc-on-macos/ Once you are able to run it comfortably from your Terminal, you can save the code in this gist to a js file and run it with jsc to find out which version of ECMAScript you have on your system. J. Quote Link to comment Share on other sites More sharing options...
Dewdman42 Posted December 5, 2023 Share Posted December 5, 2023 hmm, that's pretty interesting about jsc also, I will have to check that out later. I have just been using node, but it would be good to use the one that matches Scripter on my machine. 1 Quote Link to comment Share on other sites More sharing options...
Dewdman42 Posted December 5, 2023 Share Posted December 5, 2023 By the way the gist you referred to, I was able to run it in Scripter by just using Trace instead of console.log.... Evaluating MIDI-processing script... Script evaluated successfully! Number of plugin parameters reduced. Existing automation data may have been deleted. ECMAScript Edition: 13 Name: ECMAScript 2022 Released: 2022-06 I'm on MacOS 12.7.1 Quote Link to comment Share on other sites More sharing options...
Jordi Torres Posted December 5, 2023 Share Posted December 5, 2023 Just now, Dewdman42 said: By the way the gist you referred to, I was able to run it in Scripter by just using Trace instead of console.log.... Evaluating MIDI-processing script... Script evaluated successfully! Number of plugin parameters reduced. Existing automation data may have been deleted. ECMAScript Edition: 13 Name: ECMAScript 2022 Released: 2022-06 I'm on MacOS 12.7.1 Cool! 👍 J. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.