Old 05-20-2019, 09:24 AM   #1
zappazapper
Human being with feelings
 
zappazapper's Avatar
 
Join Date: Feb 2015
Posts: 188
Default Request modification (ReaScript)

There is a plugin called "Stereo Alignment Delay" written by Geraintluff that I want to make modifications to. I reached out to him with what I was looking for and he said that the modifications would require ReaScript, which is not his strong suit, according to him. He's given me permission to find somebody that can help me make the necessary modifications.

A brief description -

"Stereo Alignment Delay" is a phase alignment plugin in the style of Waves InPhase or SoundRadix Auto-Align. It measures the phase correlation between two signals and finds an ideal delay time and polarity to apply to one of the signals. It can be used on a stereo signal on one track or it can be used to correlate two separate tracks as it has the ability to send the signal from one instance of the plugin on one track to another instance on another track (the result of my original request and Geraintluff's gracious assistance).

The modification I'm looking for is the result of a particular problem I'm having with a mixing project I'm currently working on. 7 live shows of the same band, using the same equipment, but on different stages in different rooms. The individual signals themselves are similar enough from show to show to be able to mix them all in the same project, using the same mixer settings and effects, at least as a starting point, except that the "Stereo Alignment Delay" plugin has to be reset from show to show because of slightly different microphone placement with respect to each other. Because these are 3 hour shows, 20+ tracks each, applying/rendering the effect to the items takes a very long time and is not a realistic or very sophisticated solution. Using automation is also not an ideal solution.

What I was thinking is that since all the plugin is doing, once it is done measuring the correlation, is delaying the signal and possibly flipping the polarity, there's no reason why that necessarily has to be applied to the signal as a rendered effect, since nudging can handle the delay and polarity can be flipped on the item itself (Item Settings > Invert Phase).

So I would like to add a button on the effect called "Apply delay and polarity to selected item and reset", which would apply the delay time and polarity determined by the measured correlation to the item itself using Nudge and Invert Phase, and then reset those values on the plugin.

Can anybody help me with this? Geraintluff says he is willing to offer any help he can in terms of the JSFX stuff, but it should be pretty straight forward to anybody with ReaScript experience, which is not me either ��

Thanks in advance for any help ��

Last edited by zappazapper; 05-20-2019 at 09:32 AM.
zappazapper is offline   Reply With Quote
Old 05-21-2019, 07:36 AM   #2
geraintluff
Human being with feelings
 
geraintluff's Avatar
 
Join Date: Nov 2009
Location: mostly inside my own head
Posts: 286
Default

For clarification:

My guess is this requires a custom action. This action would need to:
  • determine the relevant Stereo Alignment Delay instance (e.g. which one is in the foreground - whatever's possible).
  • take the slider values from JSFX. Sliders 1/2 are left/right delays (in ms - may be negative), and sliders 6/7 are left/right polarity switches (0 normal, 1 inverted). For this, it's probably fine to assume both channels are the same.
  • move and optionally invert phase for all items currently selected
  • reset the slider values (1/2/6/7) to 0 in the effect instance
I don't believe this should need any modification to the JSFX, but I'm happy to help if it does.
geraintluff is offline   Reply With Quote
Old 05-21-2019, 11:51 AM   #3
geraintluff
Human being with feelings
 
geraintluff's Avatar
 
Join Date: Nov 2009
Location: mostly inside my own head
Posts: 286
Default

You know what, I've had a bash at it.

Here's a ReaScript action. When you run the action, all selected items will (hopefully) be shifted/inverted according to the Stereo Alignment Delay instance on their track (based on left channel).

It currently only works if Stereo Alignment Delay is on the same track as the item, not any parent tracks. If you want it to search parent tracks as well, I can add that in.

WARNING - there didn't seem to be a way to invert the items. (It's in the item settings, just not the API). So what I've done instead is set it to a negative volume. This might cause some subtle issues, but it was the only way I found to make it work.

Geraint
Attached Files
File Type: lua apply-alignment-delay.lua (2.1 KB, 20 views)
geraintluff is offline   Reply With Quote
Old 05-21-2019, 03:48 PM   #4
zappazapper
Human being with feelings
 
zappazapper's Avatar
 
Join Date: Feb 2015
Posts: 188
Default

Quote:
You know what, I've had a bash at it.

Here's a ReaScript action. When you run the action, all selected items will (hopefully) be shifted/inverted according to the Stereo Alignment Delay instance on their track (based on left channel).
oh, so it's not something that can be like a button on the plugin... fair enough, i'll put it in the toolbar or whatever...

Quote:
It currently only works if Stereo Alignment Delay is on the same track as the item, not any parent tracks. If you want it to search parent tracks as well, I can add that in.

in my project i'm disabling all the master/parent sends of all the tracks with items in them (i call them "tape" tracks) and sending them to a separate group of "mixer" tracks (it just seems easier to keep track of all the sidechain routing), and the plugin is on the "tape" tracks and there are no folders in the "tape" tracks, so each item is only ever going through one instance of the plugin... so not necessary for this particular application but i can see where it would be useful... i can also see where it could lead to problems, because then does the parent track's plugin get reset? and then what happens to the other child tracks?

Quote:
WARNING - there didn't seem to be a way to invert the items. (It's in the item settings, just not the API). So what I've done instead is set it to a negative volume. This might cause some subtle issues, but it was the only way I found to make it work.
fair enough... i'll test it out and let you know...

thanks again...
zappazapper is offline   Reply With Quote
Old 05-22-2019, 04:10 AM   #5
geraintluff
Human being with feelings
 
geraintluff's Avatar
 
Join Date: Nov 2009
Location: mostly inside my own head
Posts: 286
Default

Quote:
Originally Posted by zappazapper View Post
oh, so it's not something that can be like a button on the plugin...
Yeah, JSFX can't really perform modifications to the project - that's a ReaScript thing.
geraintluff is offline   Reply With Quote
Old 05-22-2019, 07:45 AM   #6
Dafarkias
Human being with feelings
 
Dafarkias's Avatar
 
Join Date: Feb 2019
Location: England
Posts: 79
Default

Quote:
Originally Posted by geraintluff View Post
WARNING - there didn't seem to be a way to invert the items. (It's in the item settings, just not the API). So what I've done instead is set it to a negative volume. This might cause some subtle issues, but it was the only way I found to make it work.
Geraint
This script, plugin, and post really interested me after having read it, so I've been keeping tabs on it.

Wouldn't it be possible to use reaper.SetMediaTrackInfo_Value(track*, "B_PHASE" , number newvalue*) and send individual items to new tracks, flip their polarity, render them, and then send back to a single track?
Dafarkias is offline   Reply With Quote
Old 05-22-2019, 07:55 AM   #7
zappazapper
Human being with feelings
 
zappazapper's Avatar
 
Join Date: Feb 2015
Posts: 188
Default

Quote:
Originally Posted by Dafarkias View Post
This script, plugin, and post really interested me after having read it, so I've been keeping tabs on it.

Wouldn't it be possible to use reaper.SetMediaTrackInfo_Value(track*, "B_PHASE" , number newvalue*) and send individual items to new tracks, flip their polarity, render them, and then send back to a single track?
Rendering is the problem. 22 tracks at 3 hours a piece x 7 shows... Trying to find something that doesn't take hours to process...
zappazapper is offline   Reply With Quote
Old 05-22-2019, 08:36 AM   #8
Dafarkias
Human being with feelings
 
Dafarkias's Avatar
 
Join Date: Feb 2019
Location: England
Posts: 79
Default

Quote:
Originally Posted by zappazapper View Post
Rendering is the problem. 22 tracks at 3 hours a piece x 7 shows... Trying to find something that doesn't take hours to process...
Oops I looked at the code, and I don't think it would be necessary to send individual items to separate tracks for render at all.

Still, the API function I mentioned in my last post would invert phase for a specific track..
Dafarkias 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 12:35 PM.


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