|
|
|
11-16-2019, 05:02 AM
|
#1
|
Human being with feelings
Join Date: Sep 2019
Posts: 1,131
|
JS Notepad?
Just an idea, because the required skills i unfortunately lack.
Would be nice to have one as a native (as it were) Reaper plugin, if the scripting language is at all suitable for the task.
|
|
|
11-16-2019, 10:42 AM
|
#2
|
Human being with feelings
Join Date: Mar 2013
Posts: 5,844
|
In regards to notes or a notepad, these options currently come into mind:
If you're referring with 'JS Notepad' to something else: can you please elaborate or post more details about what features you're looking for.
Last edited by solger; 11-16-2019 at 11:20 AM.
|
|
|
11-16-2019, 02:01 PM
|
#3
|
Human being with feelings
Join Date: Sep 2019
Posts: 1,131
|
Thank you for suggestions. Of these I'm aware, Lokasenna's text editor as far as I understand is not an independent utility. It seems to only work as part of complete scripts and is not meant to accept text in real time.
I envision a JS plugin which can be loaded alongside FX on a track much like Notepad VSTs of which there're a few in existence.
The functions can be the most basic without fancy formatting options and even font selection.
Probably provide as much as the ability to adjust font size which can have variable within the code itself without GUI controls, be able to wrap text to fit the window which can be resizable, and generate vertical scroll bar.
I assume the FX rack is one of the most frequented locations in the program and with a JS Notepad loaded on a particular track a user will always have the notes at their fingertips. And it also would be readily accessible in the MCP from the insert slot.
Last edited by Buy One; 11-16-2019 at 02:09 PM.
|
|
|
11-16-2019, 02:43 PM
|
#4
|
Human being with feelings
Join Date: Sep 2008
Location: Sweden
Posts: 7,416
|
Quote:
Originally Posted by Buy One
<snip>
I envision a JS plugin which can be loaded alongside FX on a track much like Notepad VSTs of which there're a few in existence.
<snap>
|
What is wrong with using any of these existing ones?
__________________
// MVHMF
I never always did the right thing, but all I did wasn't wrong...
|
|
|
11-16-2019, 03:34 PM
|
#5
|
Human being with feelings
Join Date: Sep 2019
Posts: 1,131
|
Nothing wrong. On the other hand with JS Notepad Reaper would have its own, and provided it's added to the ReaPack, its users would as well.
In essence Reaper didn't have to include JS plugins at all if it was able to load and run VSTs, but it does offer them, so why not a Notepad as well?
|
|
|
11-17-2019, 09:50 AM
|
#6
|
Human being with feelings
Join Date: Jul 2013
Location: Portugal
Posts: 1,827
|
Melda plugins have a free pack, one of the plugins is a notepad .
https://www.meldaproduction.com/MNotepad
|
|
|
11-17-2019, 09:55 AM
|
#7
|
Human being with feelings
Join Date: Sep 2019
Posts: 1,131
|
Appreciate the suggestions however the thread is not about lack of VST notepads as such on the market, it's about what's stated in the initial post.
|
|
|
11-23-2019, 02:37 AM
|
#8
|
Human being with feelings
Join Date: Feb 2017
Posts: 305
|
I don't know is it still need or not but I've just came across on that
http://blog.wavosaur.com/7-free-utility-vst-plugins/
edit: I didn't notice last post
Last edited by Ivannn Bennnettt; 11-23-2019 at 02:49 AM.
|
|
|
11-25-2019, 06:57 AM
|
#9
|
Human being with feelings
Join Date: Jul 2008
Location: The Netherlands
Posts: 3,645
|
I'm not sure how useful a JS notepad would be, because JSFX can't access the OS clipboard, so you wouldn't be able to copy/paste to/from it.
|
|
|
11-25-2019, 08:48 AM
|
#10
|
Human being with feelings
Join Date: Jul 2013
Location: Portugal
Posts: 1,827
|
Quote:
Originally Posted by Tale
I'm not sure how useful a JS notepad would be, because JSFX can't access the OS clipboard, so you wouldn't be able to copy/paste to/from it.
|
Not quite sure that is true, just did some text in notepad and copy /paste to a JSFX and it worked!
|
|
|
11-25-2019, 09:33 AM
|
#11
|
Human being with feelings
Join Date: Jul 2008
Location: The Netherlands
Posts: 3,645
|
Quote:
Originally Posted by pepe44
Not quite sure that is true, just did some text in notepad and copy /paste to a JSFX and it worked!
|
You mean into a slider input box, right? If so, then do note that you can only paste numbers. Also, a JSFX notepad would need to have a graphical interface, and AFAIK there is no way to paste anything into gfx_getchar().
|
|
|
06-02-2021, 09:37 AM
|
#12
|
Human being with feelings
Join Date: Apr 2020
Posts: 1,499
|
Quote:
Originally Posted by Tale
You mean into a slider input box, right? If so, then do note that you can only paste numbers. Also, a JSFX notepad would need to have a graphical interface, and AFAIK there is no way to paste anything into gfx_getchar().
|
https://geraintluff.github.io/jsfx-u...on-text-inputs
I have no understanding how any of this works but does this mean it would be possible to add text inputs?
|
|
|
06-03-2021, 12:03 AM
|
#13
|
Human being with feelings
Join Date: Jul 2008
Location: The Netherlands
Posts: 3,645
|
Quote:
Originally Posted by Pink Wool
I have no understanding how any of this works but does this mean it would be possible to add text inputs?
|
I guess it would, nice! But only if you have a custom GUI, and AFAICT you still can't copy-paste from/to the clipboard.
|
|
|
06-03-2021, 04:37 AM
|
#14
|
Human being with feelings
Join Date: Sep 2018
Location: HH
Posts: 916
|
Quote:
Originally Posted by Tale
You mean into a slider input box, right? If so, then do note that you can only paste numbers. Also, a JSFX notepad would need to have a graphical interface, and AFAIK there is no way to paste anything into gfx_getchar().
|
But in gfx you could display what is in a textbox.
|
|
|
06-03-2021, 04:44 AM
|
#15
|
Human being with feelings
Join Date: Jul 2008
Location: The Netherlands
Posts: 3,645
|
Quote:
Originally Posted by Zeno
But in gfx you could display what is in a textbox.
|
Yeah, I guess... I don't think I really understand what you mean?
FWIW, here is as far as I got with an actual JSFX notepad. It's a long way from being actually useful, and like I said, the bigggest problem is that it can't communicate with the OS clipboard, making it kinda useless (IMHO, YMMV).
Code:
desc:JSFX notepad
options:want_all_kb
@init
gfx_ext_retina = ext_noinit = 1;
gfx_clear = 0xFFFFFF;
function home(idx)
global(buf)
(
while(idx > 0 && str_getchar(buf, idx - 1) != '\n' ? idx -= 1);
idx;
);
function end(idx)
global(buf, len)
(
while(idx < len && str_getchar(buf, idx) != '\n' ? idx += 1);
idx;
);
function insert(idx, c)
global(buf, len)
local(tmp)
(
idx < len ? (
strcpy_from(tmp = #, buf, idx);
strncpy(buf, buf, idx);
str_setchar(buf, idx, c);
strcat(buf, tmp);
) : (
str_setchar(buf, idx, c);
);
len += 1;
);
function delete(idx)
global(buf, len)
local(tmp)
(
idx + 1 < len ? (
strcpy_from(tmp = #, buf, idx + 1);
strncpy(buf, buf, idx);
strcat(buf, tmp);
);
len -= 1;
);
@serialize
file_var(0, len);
file_string(0, buf);
@gfx 20 1
gfx_set(0);
gfx_setfont(1, "Arial", 15 * gfx_ext_retina);
tab = gfx_texth * 2;
gfx_setcursor(32513, "text");
c = gfx_getchar();
c >= 1 ? (
c == 'left' ? (
idx = max(idx - 1, 0);
) :
c == 'rght' ? (
idx = min(idx + 1, len);
) :
c == 'down' ? (
j = end(idx);
j < len ? (
i = home(idx);
j += 1;
loop(idx - i, j < len && str_getchar(buf, j) != '\n' ? j += 1);
idx = j;
);
) :
c == 'up' ? (
j = home(idx);
j > 0 ? (
i = home(j - 1);
idx = min(i + idx - j, j - 1);
);
) :
c == 8 ? (
idx > 0 ? delete(idx -= 1);
) :
c == 'del' ? (
idx < len ? delete(idx);
) :
c == 'home' ? (
idx = home(idx);
) :
c == 'end' ? (
idx = end(idx);
) :
c == '\r' ? (
insert(idx, '\n');
idx += 1;
) :
c == 'ins' ? (
mode = !mode;
) :
c >= 32 && c < 127 ? (
mode ? (
str_setchar(buf, idx, c);
len = max(len, idx += 1);
) : (
insert(idx, c);
idx += 1;
);
);
);
gfx_x = gfx_y = 0;
x2 = mouse_x + 2 * gfx_ext_retina;
i = ofs;
j = -1;
while(i <= len && gfx_y < gfx_h) (
i == idx ? (
x = gfx_x;
y = gfx_y;
);
x2 >= gfx_x && mouse_y >= gfx_y ? j = i;
i < len ? (
(c = str_getchar(buf, i)) == '\n' ? (
gfx_x = 0;
gfx_y += gfx_texth;
) :
c == '\t' ? (
gfx_x = (floor(gfx_x / tab) + 1) * tab;
) : (
gfx_drawchar(c);
);
);
i += 1;
);
(mouse_cap & 1) && !(cap & 1) && j >= 0 ? idx = j;
cap = mouse_cap;
idx < ofs ? ofs = home(idx) :
idx >= i && y >= gfx_h ? ofs = end(ofs) + 1;
!gfx_ext_flags && (blink < 6 || !len) ? (
gfx_x = x;
gfx_y = y;
gfx_drawchar(blink >= 6 ? ' ' : mode ? '_' : '|');
);
(blink += 1) >= 12 ? blink = 0;
Last edited by Tale; 08-01-2021 at 01:09 AM.
Reason: Added @serialize section, added left mouse click, fixed/ignore non-ASCII chars, don't blink when embedded, added 20:1 .
|
|
|
06-04-2021, 04:04 AM
|
#16
|
Human being with feelings
Join Date: Oct 2017
Location: Larisa, Greece
Posts: 3,795
|
Hi Tale thanks a lot for your Js notepad, i like that we can embed it on TCP.
When it's embedded we can't write something on it, would it be possible to support this feature? Thanks!
|
|
|
07-08-2021, 11:42 PM
|
#17
|
Human being with feelings
Join Date: Jun 2018
Posts: 138
|
I used Tale's JS Notepad in my project, and noticed that the note isn't saved in the project file, so gets lost when you reopen it...Otherwise this would be very useful.
|
|
|
07-29-2021, 04:23 PM
|
#18
|
Human being with feelings
Join Date: Aug 2020
Location: Colombia
Posts: 165
|
Quote:
Originally Posted by USR
I used Tale's JS Notepad in my project, and noticed that the note isn't saved in the project file, so gets lost when you reopen it...Otherwise this would be very useful.
|
Have you tried saving it as a preset?
|
|
|
07-29-2021, 05:37 PM
|
#19
|
Human being with feelings
Join Date: Jun 2018
Posts: 138
|
Quote:
Originally Posted by dagamusik
Have you tried saving it as a preset?
|
I've just tested what happens when it's saved as a preset and an fx chain, but no luck unfortunately.
|
|
|
07-29-2021, 11:33 PM
|
#20
|
Human being with feelings
Join Date: Jul 2008
Location: The Netherlands
Posts: 3,645
|
You're right, the code I posted doesn't @serialize the data.
|
|
|
07-31-2021, 03:33 AM
|
#21
|
Human being with feelings
Join Date: Jul 2008
Location: The Netherlands
Posts: 3,645
|
I've just added a simple @serialize section to the code I posted earlier, so now it should save the text with your project.
EDIT: I've also added left mouse click support, and I've fixed non-ASCII characters by ignoring them.
Last edited by Tale; 07-31-2021 at 04:19 AM.
|
|
|
07-31-2021, 11:03 PM
|
#22
|
Human being with feelings
Join Date: Apr 2020
Posts: 1,499
|
Thank you for this Tale! It saves perfectly now!
How (if possible) would I have to edit the code so that when the effect is embedded, the cursor would stop blinking? Not a big deal but would be nice!
Also, anyway to add the option to write on it when embedded without opening the effect?
Last edited by Pink Wool; 07-31-2021 at 11:14 PM.
|
|
|
07-31-2021, 11:24 PM
|
#23
|
Human being with feelings
Join Date: Jun 2018
Posts: 138
|
Thanks, Tale! This is great.
I modified the gfx width/height ratio, so the embedded GUI doesn't get tiny when the track height is small. 20:1~30:1 seems like a sweetspot. (It was talked about in another thread here: https://forum.cockos.com/showthread....72#post2451172)
And I also think it would be nice if we could hide the cursor in the embedded GUI. The more instances of this you use, the more blinking cursors you see, which can be annoying for some.
|
|
|
08-01-2021, 01:09 AM
|
#24
|
Human being with feelings
Join Date: Jul 2008
Location: The Netherlands
Posts: 3,645
|
Quote:
Originally Posted by Pink Wool
How (if possible) would I have to edit the code so that when the effect is embedded, the cursor would stop blinking? Not a big deal but would be nice!
Also, anyway to add the option to write on it when embedded without opening the effect?
|
But how would you know where you would write without the blinking cursor? That being said, it would seem that embedded JSFX don't get keyboard input, so it isn't possible to anyway.
But I have just added a !gfx_ext_flags check, so the cursor isn't displayed at all when embedded.
|
|
|
08-01-2021, 05:08 AM
|
#25
|
Human being with feelings
Join Date: Apr 2020
Posts: 1,499
|
I know this is probably way too advanced stuff to ask here but can JSFX inherit properties from a track? What I mean, would it be possible to have the notes inherit bg colouring from a track?
|
|
|
08-02-2021, 11:39 PM
|
#26
|
Human being with feelings
Join Date: Jul 2008
Location: The Netherlands
Posts: 3,645
|
I don't think JSFX can do that, at least not directly. I guess it might be possible to figure out the track color some other way, and then pass this info to a JSFX plugin.
|
|
|
03-25-2022, 02:03 PM
|
#27
|
Human being with feelings
Join Date: Jul 2017
Posts: 10
|
Embedded MCP UI
Hi I tried the Notepad JS effect and love the idea! For me it would be a whole lot better if the embedded MCP UI would work (only the embedded UI in the TCP works at the moment). Is there a way to have the height of the UI in the mcp depend on the lines typed in the notepad?
|
|
|
05-24-2022, 02:48 AM
|
#28
|
Human being with feelings
Join Date: Nov 2019
Posts: 16
|
Change color text
Wow! this plugin is amazing, the only thing I would like to change is the text color. I can change the background color from: FFFFFF to 141414 (which is a nice dark color), but don´t find any code for the text color. Would this be possible to do?
Thanks in advance and thank you very much for the code.
p.s.: JFSX plugins are written in javascript or it is another language?
Last edited by aklo sabbaoth; 05-24-2022 at 04:08 AM.
Reason: c
|
|
|
05-24-2022, 06:53 AM
|
#29
|
Human being with feelings
Join Date: Jul 2008
Location: The Netherlands
Posts: 3,645
|
Quote:
Originally Posted by aklo sabbaoth
I can change the background color from: FFFFFF to 141414 (which is a nice dark color), but don´t find any code for the text color. Would this be possible to do?
|
Yeah sure, just replace gfx_set(0) (just below @gfx) with gfx_set(r, g, b). Note that r, g, and b are values between 0.0 and 1.0 (not 0 and 255), so e.g. this would set the color to orange:
Code:
@gfx 20 1
gfx_set(1.0, 0.5, 0.0);
Quote:
Originally Posted by aklo sabbaoth
p.s.: JFSX plugins are written in javascript or it is another language?
|
They are written in EEL2, although I usually refer to it as simply "JSFX".
|
|
|
05-24-2022, 10:48 AM
|
#30
|
Human being with feelings
Join Date: Nov 2019
Posts: 16
|
Quote:
Originally Posted by Tale
Yeah sure, just replace gfx_set(0) (just below @gfx) with gfx_set(r, g, b). Note that r, g, and b are values between 0.0 and 1.0 (not 0 and 255), so e.g. this would set the color to orange:
Code:
@gfx 20 1
gfx_set(1.0, 0.5, 0.0);
They are written in EEL2, although I usually refer to it as simply "JSFX".
|
Thank you very much man! I´ll check it out right now.
Ok, so I already changed it, nice dark background color, with a light gray text color and in bold font, so it makes it easier on the eyes, specially at 4 am. Here´s what I changed:
1) here´s for the background color:
Code:
@init
gfx_ext_retina = ext_noinit = 1;
gfx_clear = 0*141414;
2) Here´s for the font size, color and bold style:
Code:
@gfx 20 1
gfx_set(0.7, 0.7, 0.7);
gfx_setfont (1, "Arial" , 20 , 'b' * gfx_ext_retina);
I´ve asked about the code because I want to make a contribution to the community and make simple, but perhaps, some useful plugins that suits more people, like an horizontal Loudness Meter, an automatic VU gain staging plugin, a native gain rider and so on. And perhaps then more complex and useful ones.
Last edited by aklo sabbaoth; 05-24-2022 at 11:25 AM.
|
|
|
10-13-2022, 02:47 AM
|
#31
|
Human being with feelings
Join Date: Jan 2012
Location: Greece
Posts: 95
|
Quote:
Originally Posted by solger
In regards to notes or a notepad, these options currently come into mind:
If you're referring with 'JS Notepad' to something else: can you please elaborate or post more details about what features you're looking for.
|
The "Extensions -> Notes" is great! Global notes, track notes, item notes, and more
|
|
|
07-01-2023, 06:50 PM
|
#32
|
Human being with feelings
Join Date: Nov 2019
Posts: 15
|
Thank you for creating and editing this JSFX plugin Tale and everyone.
For getting around copy/paste issue, I use this short AutoHotKey(V1) script to send keystrokes from the clipboard via a keyboard shortcut.
Code:
SetKeyDelay, 35
1:: Send % Clipboard
|
|
|
09-09-2023, 02:27 PM
|
#33
|
Human being with feelings
Join Date: Nov 2021
Posts: 13
|
background opacity
Is there a way to make the background transparent? thank you
|
|
|
09-10-2023, 02:55 AM
|
#34
|
Human being with feelings
Join Date: Jul 2008
Location: The Netherlands
Posts: 3,645
|
Quote:
Originally Posted by smda123
Is there a way to make the background transparent? thank you
|
AFAIK that's not possible in JSFX.
|
|
|
10-31-2023, 02:50 AM
|
#35
|
Human being with feelings
Join Date: May 2020
Posts: 337
|
Thanks for making this, just what I was after.
One thing that's occurring for me is that it's not adding a space when hitting the spacebar, although Shift+Space enters a space ok. I'm on a UK keyboard in case that's relevant.
|
|
|
11-01-2023, 12:34 AM
|
#36
|
Human being with feelings
Join Date: Jul 2008
Location: The Netherlands
Posts: 3,645
|
Quote:
Originally Posted by robotron
One thing that's occurring for me is that it's not adding a space when hitting the spacebar, although Shift+Space enters a space ok. I'm on a UK keyboard in case that's relevant.
|
Same here, but if I right-click on the plug-in name after adding it, and enable "Send all keyboard input to plug-in", then I can use the spacebar.
|
|
|
Thread Tools |
|
Display Modes |
Linear 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 03:17 AM.
|