Old 01-17-2020, 10:23 AM   #561
dtsmarin
Human being with feelings
 
Join Date: Dec 2017
Posts: 15
Default

Hello to all JS experts!

Is it possible to add fx parameters in realtime in JS?

I need to instantiate a parameter inside a JSFX plugin for every track in Reaper. That should cover existing tracks and new tracks added as well as the removal of tracks so that I don't have to resave scripts or do any sort of refreshing manually.


Also is it possible to set the values of the fx parameters from another script?
dtsmarin is offline   Reply With Quote
Old 01-17-2020, 12:48 PM   #562
mespotine
Human being with feelings
 
mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig, Germany
Posts: 2,034
Default

By another ReaScript-script or JSFX-script?
__________________
Pronounce me with she/her, when referencing me, please. Thanks :)
Ultraschall-API - 1111 ReaScript functions for Reaper
Reaper Internals - Developerdocs4Reaper
mespotine is offline   Reply With Quote
Old 01-17-2020, 02:29 PM   #563
pixpop
Human being with feelings
 
Join Date: Mar 2019
Location: Los Angeles
Posts: 10
Default Alternate path for jsfx plugins?

Is it possible to specify a custom path where Reaper would search for my custom jsfx plugins, or do I have to put them in the existing directories (REAPER/effects/delay, REAPER/effects/midi. etc.) ? I would want it to search the standard path as well as the custom one. I'd like to keep my plugins separate from the standard ones for ease of development.

I don't see a setting for this in the paths preference panel.

Last edited by pixpop; 01-17-2020 at 02:31 PM. Reason: Typo
pixpop is offline   Reply With Quote
Old 01-17-2020, 02:39 PM   #564
cfillion
Human being with feelings
 
cfillion's Avatar
 
Join Date: May 2015
Location: Québec, Canada
Posts: 3,060
Default

JSFX can also be per-project in an Effects folder next to the RPP.
cfillion is online now   Reply With Quote
Old 01-19-2020, 09:33 PM   #565
LarrySeyer
Human being with feelings
 
LarrySeyer's Avatar
 
Join Date: Sep 2006
Location: Austin, Tx
Posts: 84
Default Split Take Between Vocal Phrases

I've been looking but cannot find a scrip that will automatically split a vocal phrase in the blank spaces between the phrases.
Does it exist?

If not, any idea how I can create a 'split' at a point in a media item (or take) automatically when the audio level is below 'x' db for 'x' number of milliseconds?
LarrySeyer is offline   Reply With Quote
Old 01-20-2020, 12:02 AM   #566
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 8,648
Default

You should create a new thread with a decent caption to gain attention to your question.
-Michael
mschnell is online now   Reply With Quote
Old 01-20-2020, 12:05 AM   #567
LarrySeyer
Human being with feelings
 
LarrySeyer's Avatar
 
Join Date: Sep 2006
Location: Austin, Tx
Posts: 84
Default

Quote:
Originally Posted by mschnell View Post
You should create a new thread with a decent caption to gain attention to your question.
-Michael
Done.

Thank you!
LarrySeyer is offline   Reply With Quote
Old 03-16-2020, 09:05 AM   #568
cjweaver
Human being with feelings
 
Join Date: Mar 2020
Location: London
Posts: 1
Default Save Project in a specified location

I'm working on a script to populate a project with a number of tracks all with a given track name and number of input channels. Once this is done, I'd like to save the project with a given name on the users computer. Looking through the API function documentation I couldn't find any reference to saving the project under a different name (there is a function for "Save" which would require user input).

I'm guessing that this might be a case of being available under a different name1
cjweaver is offline   Reply With Quote
Old 03-20-2020, 07:46 AM   #569
jeck
Human being with feelings
 
Join Date: Mar 2020
Posts: 7
Default Convert Midi Number to Note Name

I'm trying to find a way to convert MIDI number to a Note Name as a string. As an example:

Convert MIDI Number (60) to Note Name (C4)

I'm trying to add note names to spectrum analyzer so that one can see the note that corresponds to a frequency. Any guidance is highly appreciated. Thanks in advance!

Last edited by jeck; 03-20-2020 at 10:32 AM.
jeck is online now   Reply With Quote
Old 03-21-2020, 03:25 PM   #570
Teddy
Human being with feelings
 
Join Date: Sep 2011
Posts: 157
Default Access clips just recorded while playback is running

Hi,

I have a script that unarms a track as soon as possible after the playback cursor hits a new measure. Then I want to access the clip I just recorded, while the playback is still running. Is there a way to achieve this or does this hit a limitation in how reaper works?

Thanks
Teddy is online now   Reply With Quote
Old 03-21-2020, 05:55 PM   #571
mespotine
Human being with feelings
 
mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig, Germany
Posts: 2,034
Default

Quote:
Originally Posted by cjweaver View Post
I'm working on a script to populate a project with a number of tracks all with a given track name and number of input channels. Once this is done, I'd like to save the project with a given name on the users computer. Looking through the API function documentation I couldn't find any reference to saving the project under a different name (there is a function for "Save" which would require user input).

I'm guessing that this might be a case of being available under a different name1
Not possible, has been requested numerous times over the years but not included yet.
I managed to code such a function in Lua, but it was really messy to do it and a hacky function, so it's not in the wild.
__________________
Pronounce me with she/her, when referencing me, please. Thanks :)
Ultraschall-API - 1111 ReaScript functions for Reaper
Reaper Internals - Developerdocs4Reaper
mespotine is offline   Reply With Quote
Old 03-21-2020, 06:01 PM   #572
mespotine
Human being with feelings
 
mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig, Germany
Posts: 2,034
Default

Quote:
Originally Posted by jeck View Post
I'm trying to find a way to convert MIDI number to a Note Name as a string. As an example:

Convert MIDI Number (60) to Note Name (C4)

I'm trying to add note names to spectrum analyzer so that one can see the note that corresponds to a frequency. Any guidance is highly appreciated. Thanks in advance!
Maybe this readme could help. It is a documentation for our Ultraschall-Soundboard-plugin and shows, which note holds which soundboard-slot.
It also includes in this list MIDI Note Number and Note Name, so this could help you writing such a function.

https://github.com/Ultraschall/ultra...p/docs/MIDI.md
__________________
Pronounce me with she/her, when referencing me, please. Thanks :)
Ultraschall-API - 1111 ReaScript functions for Reaper
Reaper Internals - Developerdocs4Reaper
mespotine is offline   Reply With Quote
Old 03-21-2020, 06:07 PM   #573
mespotine
Human being with feelings
 
mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig, Germany
Posts: 2,034
Default

Quote:
Originally Posted by Teddy View Post
Hi,

I have a script that unarms a track as soon as possible after the playback cursor hits a new measure. Then I want to access the clip I just recorded, while the playback is still running. Is there a way to achieve this or does this hit a limitation in how reaper works?

Thanks
Haven't tested it, but you could try the following:

Before unarming:
- Use CountMediaItems to count the items before recording as variable count_1:
https://mespotin.uber.space/Ultrasch...ountMediaItems

Unarm:
- unarm the tracks
- Use CountMediaItems to count the items AFTER recording as variable count_2:
https://mespotin.uber.space/Ultrasch...ountMediaItems

The Items with the indexnumbers between count_1 and count_2 are the ones who just got recorded.

To get the recorded items, just loop through them, using the counts, stored in count_1 and count_2:

Code:
counter=0 -- a counter
MediaItems_justrecorded={} -- this table will hold all recorded MediaItems

for i=count_1, count_2, do
 counter=counter+1
 MediaItems_justrecorded[counter]=reaper.GetMediaItem(0, i)
end
In this code, the table MediaItems_justrecorded holds the recorded MediaItems and counter the number of recorded MediaItems.
__________________
Pronounce me with she/her, when referencing me, please. Thanks :)
Ultraschall-API - 1111 ReaScript functions for Reaper
Reaper Internals - Developerdocs4Reaper
mespotine is offline   Reply With Quote
Old 03-21-2020, 06:26 PM   #574
tack
Human being with feelings
 
tack's Avatar
 
Join Date: Jan 2014
Location: Ontario, Canada
Posts: 957
Default

Consider this sequence of events:
  1. Transport start
  2. JSFX on track sends note-on (but not note-off)
  3. Transport stop - no note-off yet
  4. Transport start again
Reaper seems to have some anti-note-hanging logic such that at step 4, Reaper simulates the note-off having been emitted from the FX that issued the note-on in step 2.

In my testing, the JSFX doesn't appear to have any visibility into this forged note-off, so I've no apparent means of intercepting and preventing it.

Is there a way to configure the JSFX to have Reaper suppress the forged note-off events to begin with?
tack is offline   Reply With Quote
Old 03-21-2020, 07:36 PM   #575
jeck
Human being with feelings
 
Join Date: Mar 2020
Posts: 7
Default

Quote:
Originally Posted by mespotine View Post
Maybe this readme could help. It is a documentation for our Ultraschall-Soundboard-plugin and shows, which note holds which soundboard-slot.
It also includes in this list MIDI Note Number and Note Name, so this could help you writing such a function.

https://github.com/Ultraschall/ultra...p/docs/MIDI.md
Thanks!! Will check it out. I appreciate you getting back with me!
jeck is online now   Reply With Quote
Old 03-22-2020, 01:56 AM   #576
Teddy
Human being with feelings
 
Join Date: Sep 2011
Posts: 157
Default

Quote:
Originally Posted by mespotine View Post
Haven't tested it, but you could try the following:

Before unarming:
- Use CountMediaItems to count the items before recording as variable count_1:
https://mespotin.uber.space/Ultrasch...ountMediaItems

Unarm:
- unarm the tracks
- Use CountMediaItems to count the items AFTER recording as variable count_2:
https://mespotin.uber.space/Ultrasch...ountMediaItems

The Items with the indexnumbers between count_1 and count_2 are the ones who just got recorded.
Thanks, mespotine! This is the technique I've been trying to use in lua, but it seems CountMediaItems doesn't update until after playback stops. Just confirmed now that it doesn't update in eel either.

Is there something I need to do in preferences, maybe?
Teddy is online now   Reply With Quote
Old 03-22-2020, 05:23 AM   #577
mespotine
Human being with feelings
 
mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig, Germany
Posts: 2,034
Default

You can defer it, after unarming, as deferred scripts update between defer-cycles.
__________________
Pronounce me with she/her, when referencing me, please. Thanks :)
Ultraschall-API - 1111 ReaScript functions for Reaper
Reaper Internals - Developerdocs4Reaper
mespotine is offline   Reply With Quote
Old 03-22-2020, 05:46 AM   #578
Teddy
Human being with feelings
 
Join Date: Sep 2011
Posts: 157
Default

Quote:
Originally Posted by mespotine View Post
You can defer it, after unarming, as deferred scripts update between defer-cycles.
Yes, but that doesn't really work, since I want to loop the recorded clip while playback is running. I could use defer to make it loop after playback is stopped, but that doesn't help me, I'm afraid.
Teddy is online now   Reply With Quote
Old 03-26-2020, 01:24 PM   #579
Xasman
Human being with feelings
 
Xasman's Avatar
 
Join Date: Jun 2009
Posts: 306
Default MIDI to Audio Frequency Calculator+Tuning Fork

Quote:
Originally Posted by jeck View Post
I'm trying to find a way to convert MIDI number to a Note Name as a string. As an example:

Convert MIDI Number (60) to Note Name (C4)

I'm trying to add note names to spectrum analyzer so that one can see the note that corresponds to a frequency. Any guidance is highly appreciated. Thanks in advance!
Hi jeck,

I'm not sure whether this would be of any help to you or not but I've just ported my online MIDI to Audio Frequency Calculator+Tuning Fork utility to a JSFX plugin. You can find it (along with a download link to the plugin) here.
Xasman is offline   Reply With Quote
Old 03-26-2020, 07:19 PM   #580
mespotine
Human being with feelings
 
mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig, Germany
Posts: 2,034
Default

Quote:
Originally Posted by Teddy View Post
Yes, but that doesn't really work, since I want to loop the recorded clip while playback is running. I could use defer to make it loop after playback is stopped, but that doesn't help me, I'm afraid.
With deferring I actually meant, only deferring once, not continously.
Means, after unarming the tracks, defer once(!) and then get the new count of items, etc.
__________________
Pronounce me with she/her, when referencing me, please. Thanks :)
Ultraschall-API - 1111 ReaScript functions for Reaper
Reaper Internals - Developerdocs4Reaper
mespotine is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 01:28 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.