anp27 Posted January 30 Share Posted January 30 Has anyone else tried this? I've done a few tests and while Chat GPT does generate code that looks like it's going to work, when I actually paste the code into Scripter nothing really happens. Anybody got it working? What can I do to make the code work? Quote Link to comment Share on other sites More sharing options...
des99 Posted January 30 Share Posted January 30 (edited) ChatGPT is kind of amazing, but it has a fundamental problem, which is that it's "confidently wrong" a lot of the time. There's lots of articles on this if you google, but here's an example: https://mashable.com/article/chatgpt-amazing-wrong If you ask it a question, it will tell you the answer, but there is no guarantee it's the *correct* answer. It turns out it's an *excellent* BS-er... Same with code - you can't expect ChatGPT generated code to be correct/working/good, even if it *looks* good. However, it can be a useful head start, and if you know what you are doing, you can probably see, and fix it's mistakes, and still find it worthwhile to use. Just don't expect it to be right Edited January 30 by des99 1 Quote Link to comment Share on other sites More sharing options...
anp27 Posted January 31 Author Share Posted January 31 54 minutes ago, des99 said: However, it can be a useful head start, and if you know what you are doing, you can probably see, and fix it's mistakes, and still find it worthwhile to use. Yes, that's the problem, I don't 100% know what I'm doing 😀 I'm not from the coding world... I do however have enough understanding where I can edit the script, I just need to know how to fix the mistakes. Quote Link to comment Share on other sites More sharing options...
fuzzfilth Posted January 31 Share Posted January 31 (edited) 6 hours ago, des99 said: If you ask it a question, it will tell you the answer, but there is no guarantee it's the *correct* answer. It turns out it's an *excellent* BS-er... In other words, AI has already gone all the way in emulating the human mind. That is uncomfortably close... Edited January 31 by fuzzfilth 2 2 Quote Link to comment Share on other sites More sharing options...
gacki Posted January 31 Share Posted January 31 7 hours ago, anp27 said: I've done a few tests and while Chat GPT does generate code that looks like it's going to work, when I actually paste the code into Scripter nothing really happens. Could you share some of those attempts? 1 Quote Link to comment Share on other sites More sharing options...
analogika Posted January 31 Share Posted January 31 2 hours ago, fuzzfilth said: In other words, AI has already gone all the way in emulating the human mind. That is uncomfortably close... That's not even funny… Quote Link to comment Share on other sites More sharing options...
Jordi Torres Posted January 31 Share Posted January 31 (edited) 13 hours ago, anp27 said: What can I do to make the code work? If we don't see your code we cannot help. Would also help if you said what is it you're trying to achieve. J. Edited January 31 by Jordi Torres Edit for clarity 4 Quote Link to comment Share on other sites More sharing options...
anp27 Posted January 31 Author Share Posted January 31 Chat GPT has been down for several hours now, my post must have brought millions of people to site and caused the crash 😂 1 Quote Link to comment Share on other sites More sharing options...
des99 Posted January 31 Share Posted January 31 I signed up for an account, but never got a confirmation email, so kinda forgot about it... Quote Link to comment Share on other sites More sharing options...
gacki Posted January 31 Share Posted January 31 21 hours ago, des99 said: If you ask it a question, it will tell you the answer, but there is no guarantee it's the *correct* answer. It turns out it's an *excellent* BS-er... In that other thread about the "Hit Formula" I had linked to a video where ChatGPT basically failed when quizzed about harmonic progressions in jazz. What struck me as hilarious was the (perceived) confidence contained in the answer. Having worked in education for a long time I'm quite familiar with this strategy. 2 1 Quote Link to comment Share on other sites More sharing options...
des99 Posted January 31 Share Posted January 31 1 hour ago, gacki said: What struck me as hilarious was the (perceived) confidence contained in the answer. To be fair, 90% of jazz is being wrong, but in interesting ways... 😉 (Disclaimer: I know nothing about jazz, but I'm very confident in this answer.) 2 Quote Link to comment Share on other sites More sharing options...
anp27 Posted February 4 Author Share Posted February 4 On 1/31/2023 at 7:37 AM, gacki said: Could you share some of those attempts? On 1/31/2023 at 1:45 PM, Jordi Torres said: If we don't see your code we cannot help. Would also help if you said what is it you're trying to achieve. J. Ok, here's one example. I asked "generate code that adds MIDI CC 7 = 0 when MIDI note = note off" This is the code it generated: function addCC7onNoteOff(midiEvents) { for (let i = 0; i < midiEvents.length; i++) { if (midiEvents.type === "noteOff") { midiEvents.splice(i+1, 0, { type: "controlChange", controllerNumber: 7, value: 0, timestamp: midiEvents.timestamp }); } } return midiEvents; } I did this as a test because I already have a Scripter that does it for me (add volume = 0 at notes off) and I wanted to compare the two. Since I'm a noob with this stuff I wasn't able to come up with anything. Quote Link to comment Share on other sites More sharing options...
des99 Posted February 4 Share Posted February 4 (edited) This is the problem with these tools - "confidently wrong". It gives you code that *looks* plausible, especially to non-coders, and goes "there you are", but the code is likely entirely useless, leaving the end user going to forums saying "Can you debug this ChatGPT code?" - when it would probably just be easier to bypass the AI step, and ask the experts on the forum directly, and get something that *does* work.... 😄 It's been a minute since I've done any Scripter-ing in Logic, but (from memory) that code is not even how you do event processing in Logic's Scripter (which is not looping through an array of data to be processed, but on an event by event process). Like I say, the tools are interesting, but are a long-way from being dependable at this point. Let's see how they evolve. Edited February 4 by des99 1 Quote Link to comment Share on other sites More sharing options...
RobertAnthony Posted February 4 Share Posted February 4 (edited) Also I feel like asking it to “generate code” is like asking it to “generate language”. like, which one of the 7,139 currently spoken in the world? Maybe help it out by specifying Javascript lol. Edit: Wait, actually don’t help it out! We gotta prolong the AI Apocalypse as long as possible! Edited February 4 by RobertAnthony Quote Link to comment Share on other sites More sharing options...
gacki Posted February 4 Share Posted February 4 57 minutes ago, anp27 said: Ok, here's one example. I asked "generate code that adds MIDI CC 7 = 0 when MIDI note = note off" Did you specify the "operational surroundings" for this? In other words: It has to operate on "live" data, not on a MIDI file? Quote Link to comment Share on other sites More sharing options...
anp27 Posted February 4 Author Share Posted February 4 1 hour ago, gacki said: Did you specify the "operational surroundings" for this? In other words: It has to operate on "live" data, not on a MIDI file? Nope, this is the question I asked it verbatim: "generate code that adds MIDI CC 7 = 0 when MIDI note = note off" Quote Link to comment Share on other sites More sharing options...
gacki Posted February 4 Share Posted February 4 (edited) 15 minutes ago, anp27 said: Nope, this is the question I asked it verbatim: "generate code that adds MIDI CC 7 = 0 when MIDI note = note off" That's probably not specific enough to get the results you expected; ChatGPT can't "know" that this has to be realtime. As @des99 pointed out the function works on an array of MIDI commands and inserts data into this array. This would/could make sense when dealing with a MIDI file or "MIDI data" in general but not with "live" data. So the code actually is probably fine but it is generated under a certain (wrong) assumption. I wouldn't blame ChatGPT for this. Edited February 4 by gacki Quote Link to comment Share on other sites More sharing options...
anp27 Posted February 4 Author Share Posted February 4 26 minutes ago, gacki said: That's probably not specific enough to get the results you expected; ChatGPT can't "know" that this has to be realtime. As @des99 pointed out the function works on an array of MIDI commands and inserts data into this array. This would/could make sense when dealing with a MIDI file or "MIDI data" in general but not with "live" data. So the code actually is probably fine but it is generated under a certain (wrong) assumption. I wouldn't blame ChatGPT for this. Right, so how do I tell ChatGPT that it's supposed to deal with live data? Quote Link to comment Share on other sites More sharing options...
des99 Posted February 4 Share Posted February 4 (edited) 19 minutes ago, anp27 said: Right, so how do I tell ChatGPT that it's supposed to deal with live data? And here we come onto the finessing of the commands you feed these things - you might want to add some "using Scripter for Logic Pro" type qualifiers. Remember, the tool is drawing on it's knowledge base, and the corpus of Javascript is much larger than the specific implementation of JS for Scripter in Logic. Unless you tell it what you want, it has to guess. Once you start adding qualifiers, it helps it with refining it's answer from similar code it already knows about. You may require a bunch of juggling with the command to get something that works well enough unguided, or it may generate something good enough as a starting point to modify and fix. Let us know how you get on! Edited February 4 by des99 1 Quote Link to comment Share on other sites More sharing options...
jaffasplaffa Posted February 18 Share Posted February 18 Hey 🙂 Been trying for a few hours making a Scripter script that does real time humanising, like shiftting incoming midi notes a notch early or late. I get code that Scripter accepts, but it doesn't do anything. I think I am going to make my own thread about it, but I am "happy" to see that I am not the only one having issues getting it working. Well, not really, I would prefer it was working, but I see there might be other reasons than, errrrhhhmm... Me... That the script is not working. Anyway, I'll post the script here for context, but also create a new thread, since it's a different script. Here it is: var PluginParameters = [ { name: "Humanize Amount", type: "lin", minValue: 0, maxValue: 100, numberOfSteps: 100, defaultValue: 50 }, ]; function HandleMIDI(event) { if (event instanceof NoteOn || event instanceof NoteOff) { var humanizeAmount = GetParameter("Humanize Amount") / 100.0; var randomTiming = Math.random() * humanizeAmount * 2 - humanizeAmount; event.delta += randomTiming; Trace(randomTiming); // See the timing offset } event.send(); } function ParameterChanged(param, value) { if (param == 0) { humanizeAmount = GetParameter(param) / 100.0; // humanizeAmount = value / 100; Trace(value); // See value in console } } 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.