View Single Post
Old 08-11-2018, 03:56 PM   #33
_Stevie_
Human being with feelings
 
_Stevie_'s Avatar
 
Join Date: Oct 2017
Location: Black Forest
Posts: 5,054
Default

Quote:
Originally Posted by FnA View Post
Don't feel too bad. There's quite a bit of code syntax to get a handle on. And then, the further you get into positioning things, the harder it gets. I'm pretty much discouraged from posting midi scripts in that regard myself. Reaper can throw you some curveballs. Imagine trying to do something based on project grid in ignore project tempo item which may be stretched, have start offset, not begin on grid, cross gradual tempo changes. Sucks.
Ah thanks man, that's encouraging, that you are having the same issues.
Of course it's a always a challenge somehow, but if I see all the crazy scripts you guys are pulling off...

Quote:
Are more comments the answer, or more readable code?

Naming functions/variables so that they're obvious, breaking giant functions into a bunch of smaller clearly-named steps, organizing the code by task or something... there's a lot you can do that makes comments less necessary.
Absolutely, refactoring! But when I check back into my scripts it's like: why the hell did I do that? The comment doesn't help at all here! Back then, it made completely sense, since I was completely into coding, but after a while I forget about these methods I used. I guess the only thing that would help is to record myself talking about it, haha.


Another issue is, that I have so many things at the moment in parallel. So, I don't know where to continue...

- scripts that needs refatctoring
- script ideas, that I have yet to put into an algorithm
- scripts that haven't been finished yet since I took a break at the wrong time (Thonex' trash example! Haha)
- adapting my MIDI scripts to Set/GetAllEvts, like the current one in this thread


And last but not least: the problem of code visualisation. Like: what happens
with the data when it goes thru all the different functions... e.g. keeping track of the whole data and how it is processed. At least for me, it takes a lot of concentration.
__________________
My Reascripts forum thread | My Reascripts on GitHub
If you like or use my scripts, please support the Ukraine: Ukraine Crisis Relief Fund | DirectRelief | Save The Children | Razom
_Stevie_ is offline   Reply With Quote