 |
|
|
02-08-2018, 03:36 PM
|
#1
|
Human being with feelings
Join Date: Apr 2017
Location: St. Petersburg, FL
Posts: 880
|
JSFX tutorial for the total Newbie - guide
So I wrote a MIDI Note to CC plugin recently, and I thought I'd write a guide to how it's done.
I cover everything from basic MIDI concepts, to JSFX basics, to programming basics etc... I assume that the only thing you know is what Reaper is, how to create a text file and how to type.
There's no ads or anything on my site. So this is totally free unless you feel obliged to donate. (or become a patreon)
If you have any comments, questions or just want to berate me then I'm welcome to hear it. Thanks!
http://admiralbumblebee.com/music/20...m-scratch.html
p.s. I posted it here rather than the JSFX&ReaScript forum so that people _not_ generally interested in scripting already can see it.
EDIT - I don't even assume you know how to create a text file any more. The Tutorial is now 33% easier! (I'm sure that math works out)
Last edited by Robert Randolph; 02-08-2018 at 09:25 PM.
|
|
|
02-08-2018, 04:11 PM
|
#2
|
Human being with feelings
Join Date: Feb 2017
Posts: 4,540
|
cheers! i'll check it out.
|
|
|
02-08-2018, 06:51 PM
|
#3
|
Human being with feelings
Join Date: Apr 2010
Location: South West Michigan
Posts: 256
|
Dude, you are the shit! I'm definitely going to dive into this as I've been wondering for a while now on how to program a JS. Thanks!
__________________
ADK Laptop Intel i7 2860QM, 8 GB RAM, Avid MBOX Pro 3 (BLA Modified), Novation Remote SL37, DSI Mopho, DSI Tempest, Trilian, Aether 1.5.1, Valhalla, Nerve, Komplete 7
|
|
|
02-08-2018, 07:35 PM
|
#4
|
Administrator
Join Date: Jan 2005
Location: NYC
Posts: 15,229
|
Awesome, thank you! Reading now...
Some comments: - you can create a new JSFX from the FX browser (avoiding having to use an external text editor).
- this was undocumented (oops, fixed), but rather than using You can do:
Code:
slider1:ccValue=0<0,127,1>CC to send
(supported in REAPER 5.0+)
- You can also debug JSFX by using Ctrl/Cmd+K on a symbol to read its value (or if it points to memory, it will show you the value at that point in memory).
- JSFX can't actually be used to write video processors, but the language is the same for video processors (as well as EEL ReaScripts).
- I might ask you to ditch that askjf link if I get enough noise...

Last edited by Justin; 02-08-2018 at 08:09 PM.
|
|
|
02-08-2018, 09:22 PM
|
#5
|
Human being with feelings
Join Date: Apr 2017
Location: St. Petersburg, FL
Posts: 880
|
Quote:
Originally Posted by Justin
Awesome, thank you! Reading now...
Some comments: - you can create a new JSFX from the FX browser (avoiding having to use an external text editor).
- this was undocumented (oops, fixed), but rather than using You can do:
Code:
slider1:ccValue=0<0,127,1>CC to send
(supported in REAPER 5.0+)
- You can also debug JSFX by using Ctrl/Cmd+K on a symbol to read its value (or if it points to memory, it will show you the value at that point in memory).
- JSFX can't actually be used to write video processors, but the language is the same for video processors (as well as EEL ReaScripts).
- I might ask you to ditch that askjf link if I get enough noise...

|
Awesome. I updated everything you listed and switched the askjf link.
Thank you very much for reading and the corrections! I feel annointed by the Holy Reaper Seer now.
|
|
|
02-08-2018, 11:30 PM
|
#6
|
Human being with feelings
Join Date: Dec 2015
Posts: 1,685
|
Quote:
Originally Posted by Robert Randolph
So I wrote a MIDI Note to CC plugin recently, and I thought I'd write a guide to how it's done.
I cover everything from basic MIDI concepts, to JSFX basics, to programming basics etc... I assume that the only thing you know is what Reaper is, how to create a text file and how to type.
There's no ads or anything on my site. So this is totally free unless you feel obliged to donate. (or become a patreon)
If you have any comments, questions or just want to berate me then I'm welcome to hear it. Thanks!
http://admiralbumblebee.com/music/20...m-scratch.html
p.s. I posted it here rather than the JSFX&ReaScript forum so that people _not_ generally interested in scripting already can see it.
EDIT - I don't even assume you know how to create a text file any more. The Tutorial is now 33% easier! (I'm sure that math works out)
|
You rock, man ! Awesome blog btw.
|
|
|
02-09-2018, 12:25 AM
|
#7
|
Human being with feelings
Join Date: Jul 2008
Location: The Netherlands
Posts: 3,514
|
Cool!
A very minor nitpick, but it might be worth mentioning anyway: You can also write hex numbers as e.g. 0x90 instead of $x90. This is more in line with other programming languages e.g. C/C++, JavaScript, etc. This does require REAPER v4.25+.
|
|
|
02-09-2018, 01:11 AM
|
#8
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,238
|
Very nice !
I hope it will help users to make their own modes :P
What's next step ?
Audio Processing ?
GFX ? :P
|
|
|
02-09-2018, 09:28 AM
|
#9
|
Human being with feelings
Join Date: Apr 2017
Location: St. Petersburg, FL
Posts: 880
|
Quote:
Originally Posted by Tale
Cool!
A very minor nitpick, but it might be worth mentioning anyway: You can also write hex numbers as e.g. 0x90 instead of $x90. This is more in line with other programming languages e.g. C/C++, JavaScript, etc. This does require REAPER v4.25+.
|
Thanks. I wasn't aware of that.
I picked up the $x notation (and most of the JSFX syntax) by reading through other scripts.
Unfortunately I don't think I can fully correct the $x usage, since there's so many screenshots that use the $x notation. I will update the post to mention it though.
|
|
|
02-11-2018, 04:03 AM
|
#10
|
Human being with feelings
Join Date: Jul 2008
Location: The Netherlands
Posts: 3,514
|
Quote:
Originally Posted by Robert Randolph
Unfortunately I don't think I can fully correct the $x usage, since there's so many screenshots that use the $x notation.
|
Of course! I guess in the end it's more of a personal preference anyway.
Quote:
Originally Posted by Robert Randolph
I will update the post to mention it though.
|
Cool. Do note however that is should be 0x0F, not just x0F.
|
|
|
02-11-2018, 05:56 AM
|
#11
|
Human being with feelings
Join Date: May 2011
Posts: 2,633
|
As pretty much your target audience I think it was very generous of you to share your time and expertise. As to the content, the best compliment I can pay you would be to say you may be the Kenny of the JSFX world!
|
|
|
02-12-2018, 01:21 PM
|
#12
|
Human being with feelings
Join Date: Jun 2012
Posts: 348
|
Quote:
Originally Posted by Robert Randolph
So I wrote a MIDI Note to CC plugin recently, and I thought I'd write a guide to how it's done.
|
Well done. I imagine creating that tutorial was a lot of work. If/when I decide I want to write a plugin, I'll be back to work through the tutorial in detail.
Note, the link in this text near the top of the tutorial:
"This tutorial really isn’t for you, but maybe you can skip to results to see what happened."
... needs to target the anchor #result (singular) rather than the anchor #results (plural) which doesn't exist.
Despite having clicked that link, the tutorial is for me (even though I'm an experienced programmer), I was curious to skip to the end then come back or the beginning.
|
|
|
02-12-2018, 06:59 PM
|
#13
|
Mortal
Join Date: Jan 2006
Location: Wickenburg, Arizona
Posts: 14,009
|
Thank you for this, this is awesome!
|
|
|
02-12-2018, 08:16 PM
|
#14
|
Human being with feelings
Join Date: Apr 2017
Location: St. Petersburg, FL
Posts: 880
|
Quote:
Originally Posted by pbattersby
Well done. I imagine creating that tutorial was a lot of work. If/when I decide I want to write a plugin, I'll be back to work through the tutorial in detail.
Note, the link in this text near the top of the tutorial:
"This tutorial really isn’t for you, but maybe you can skip to results to see what happened."
... needs to target the anchor #result (singular) rather than the anchor #results (plural) which doesn't exist.
Despite having clicked that link, the tutorial is for me (even though I'm an experienced programmer), I was curious to skip to the end then come back or the beginning.
|
Great catch on that anchor mistake.
I'm fixing it now!
|
|
|
02-12-2018, 10:02 PM
|
#15
|
Human being with feelings
Join Date: Jun 2010
Location: Texas
Posts: 353
|
Whoa! Thank you so much for this! Exactly what I needed, exactly when I needed it!
|
|
|
02-13-2018, 12:33 PM
|
#16
|
Human being with feelings
Join Date: Apr 2012
Location: Denver, CO
Posts: 249
|
Great Work!
Thanks for this. The level of detail will help many of us.
|
|
|
Thread Tools |
|
Display Modes |
Hybrid Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 08:31 PM.
|