Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER General Discussion Forum

Reply
 
Thread Tools Display Modes
Old 04-03-2019, 09:48 AM   #1
millertone
Human being with feelings
 
Join Date: Sep 2017
Posts: 17
Default Xenakios/SWS: Normalize to dB value bug?

Hi Folks,
I have a track with a bunch of hits. I usually normalize these sounds to -6dB, either individually or in groups, using the Xenakios/SWS: Normalize to dB value action. Strangely, it's working just fine on all of the media items on this particular track, except for two of them, where it seems the levels are being attenuated down to - infinity. I've linked a video to demonstrate what's happening. Oh yeah, I'm using Reaper v5.973/x64 and SWS v2.10.0 on Windows.

https://www.dropbox.com/s/q4yxswbhp6...e_Bug.mov?dl=0

-Matt

Last edited by millertone; 04-03-2019 at 09:54 AM.
millertone is offline   Reply With Quote
Old 04-03-2019, 10:17 AM   #2
millertone
Human being with feelings
 
Join Date: Sep 2017
Posts: 17
Default

Update: This is happening when the phase has been inverted on the item.
millertone is offline   Reply With Quote
Old 04-03-2019, 11:15 AM   #3
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 10,980
Default

This is a bug in Reaper API I'd say.

GetMediaItemTakeInfo_Value(take, "D_VOL") (which this SWS action uses) seems to return an inverted value if take phase is inverted.
In the pic both take volumes are set to 0.0 dB, right take has phase inverted.


Last edited by nofish; 04-03-2019 at 12:06 PM.
nofish is offline   Reply With Quote
Old 04-03-2019, 05:40 PM   #4
millertone
Human being with feelings
 
Join Date: Sep 2017
Posts: 17
Default

Quote:
Originally Posted by nofish View Post
This is a bug in Reaper API I'd say.
Thanks for tracking that down. The workaround for now is to change the order of operations and invert the phase after normalizing...

Matt
millertone is offline   Reply With Quote
Old 04-03-2019, 06:58 PM   #5
Breeder
Human being with feelings
 
Breeder's Avatar
 
Join Date: Nov 2010
Location: Croatia
Posts: 2,415
Default

Quote:
Originally Posted by nofish View Post
This is a bug in Reaper API I'd say.

GetMediaItemTakeInfo_Value(take, "D_VOL") (which this SWS action uses) seems to return an inverted value if take phase is inverted.
In the pic both take volumes are set to 0.0 dB, right take has phase inverted.

I wouldn't call it a bug, more of a clumsy, but still a valid way to handle passing of this information to the caller of the API. I wouldn't count this ever gets fixed - it should be handled on the side using the API - from the script, extension etc...
Breeder is offline   Reply With Quote
Old 04-03-2019, 09:14 PM   #6
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 10,980
Default

Quote:
Originally Posted by Breeder View Post
I wouldn't call it a bug, more of a clumsy, but still a valid way to handle passing of this information to the caller of the API. I wouldn't count this ever gets fixed - it should be handled on the side using the API - from the script, extension etc...
The API description says:
Quote:
D_VOL : double *, take volume
and nothing about it being flipped if phase is flipped.
So if this isn't regarded as bug at least the API doc should be supplemented with this info imo.

Last edited by nofish; 04-03-2019 at 09:20 PM.
nofish is offline   Reply With Quote
Old 04-04-2019, 06:33 PM   #7
Breeder
Human being with feelings
 
Breeder's Avatar
 
Join Date: Nov 2010
Location: Croatia
Posts: 2,415
Default

Quote:
Originally Posted by nofish View Post
The API description says:


and nothing about it being flipped if phase is flipped.
So if this isn't regarded as bug at least the API doc should be supplemented with this info imo.
Good thinking, haha
I think some stuff in SWS relies on this behavior so changing it would break things. Better for Cockos to just put it into API description.

I kinda got used to stuff like this to be honest, REAPER is full of idiosyncratic things such as these - I guess that's the price we pay for all that power of customization.
Breeder is offline   Reply With Quote
Old 04-05-2019, 10:33 AM   #8
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 10,980
Default

Hm, I noticed for setting it's the same behaviour, i.e. if I do

Code:
reaper.SetMediaItemTakeInfo_Value(invPhaseTake, "D_VOL", 1.0)
on a take which has phase reversed it sets the phase back to normal.
Need to do:

Code:
reaper.SetMediaItemTakeInfo_Value(invPhaseTake, "D_VOL", -1.0)
to keep the reversed phase.

Is this also intended?
At least I noticed some SWS things are affected by this (causing a bug in not keeping reversed phase, e.g. Xenakios/SWS: Reset active take volume to 0.0 dB) because when coded this obviously wasn't taken into account (how should it if it's not mentioned in the API doc. :P).

edit:
I see there seems no explicit function to Get/Set take phase, so maybe this is intended as (undocumented) substitute for it...

Last edited by nofish; 04-05-2019 at 10:58 AM.
nofish is offline   Reply With Quote
Old 04-05-2019, 11:20 AM   #9
Breeder
Human being with feelings
 
Breeder's Avatar
 
Join Date: Nov 2010
Location: Croatia
Posts: 2,415
Default

Quote:
Originally Posted by nofish View Post
Hm, I noticed...

Is this also intended?
Might as well ask Justin about that xd
Breeder is offline   Reply With Quote
Old 04-05-2019, 11:48 AM   #10
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 10,980
Default

Wasn't meant to be addressed specifically at you.
I hope that Justin/schwa sees it and chimes in.
nofish is offline   Reply With Quote
Old 04-06-2019, 07:04 AM   #11
ashcat_lt
Human being with feelings
 
Join Date: Dec 2012
Posts: 6,304
Default

Maybe you should report this on the SWS issue tracker.

https://github.com/reaper-oss/sws/issues
ashcat_lt is online now   Reply With Quote
Old 04-06-2019, 10:22 AM   #12
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 10,980
Default

Actually I looked into it in SWS already and it wouldn't be hard to fix there but I'm hesitant to submit as I'm not sure if the issue is on Reaper API or SWS side.

edit:
Started a thread in the developer forum:
https://forum.cockos.com/showthread.php?t=219385

Last edited by nofish; 04-06-2019 at 01:18 PM.
nofish 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 10:29 AM.


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