Normalizing Audio in Convolution Node?
-
@Casmat have you tried using the file_analyser node?
-
@Casmat said in Normalizing Audio in Convolution Node?:
@Lindon i was hoping to do the detection while the sample file is "loading" into the convolution. Thought of getting the samplefile from the node itself and analyze that with some scripting, but cant seem to work out how. I'm trying to find a way to compensate for varying convolution sample volumes a user could import.. any ideas?
attach a gain control to let the user set the gain.
-
Like @alhug said, the file analyser node is what you need.
HiseSnippet 1495.3oc0X8zaaTDEeVmLND2Vfp1BWmKHbjJF6RnTARTm3jzZAN0pNDUNElr6X6Qd2YV1c1jXPbhK8Fm6M9HvUt0u.bpeQ3a.7d6t16t0tINVsEgsj0Nu4My768989yrtaf1VDFpCHVqevXeAw5pzdiUlgsFxkJR6cHVuKsCOzHBXIh1drOOLT3PrrV4An.q0WkD+4uu+1bWtxVjIhPNTKsEeqzSZxj1s42Hcc2i6HNP5kS6Ma11VqZoc0Q.dVgVm3ysGwGH1mipUhRrJuqiznC5Y3FQHny1Zmw8FpOUkn+gxP4wtBbPCROXiRDSZMT55zchsFRHVq1MyxWIwxuIsizQNUdlG38imfksh79.qRmGjZbIfjUNHsZBjtNsmcfz2jMChmqPaq.BoOGb04gRhtDqmSaoAETlZd7Qh8BfASWP06Vu9sYvOa7U8iT1FoVwzp80FwiTU2nxOWY8J+RE1KOU+9ycN7XBztthf4NMxtAm2Bqph7NVDba1Ib2HwTEAyunOs7h4SsSr5bJpUsURyi7Eoi2S65f9J74YY.RpaCd56ZuC2vQRIUFnmuHvHQ3Xsi3DHpNghVmtiHbjQ6Cw0yvePji1IxkaJFNg4MoS.9iBbHRTpPoYb97pKQLV8yMFaQg30ockF6gyGiklCFAO0aBLllYdM5t86KrMY.bU5dOYYSCqu3ogzjyuRZZHbl3ge0zgr8dRiBfX+Hushbj58jtHFnVVf4LIq7ozrL.+.gOOPbftqKeb0Ptmuq3w.vuM6XWs8ndxeRLaZieBt1F0np8PtRIbCWlrqxulpXQdrNxHUC5vMAxy.6Er+dPsaaQqTzg9fRXhUx353XLX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q113ql9IMHj4ul6rDq4yVh0r4RrlOeIVycWh07EKwZt24tF7emKMsCKUBB5taxEGr1Ug80iqlP9WbbZh+C
-
@Christoph-Hart wow.. hise sure is amazing.. as with you @Christoph-Hart and @alhug and @Lindon! Much thanks!
-
@Christoph-Hart what a great tool and thanks for the example. if file_analyser could also do LUFS or RMS that would be amazing. Analysing a longer audio file for true peak, like a noise layer sample for example, is not that useful.
-
@alhug Couldn't you do it with a snex or faust node, just store the peak values over time and root the mean of the squares? I'm asking, I have no idea myself, I've yet to dive into snex/faust.
-
@Christoph-Hart Doesn't this just analyse the impulse response volume and not the audio going in and coming out?
-
Anybody tried this?
-
@d-healey If you're doing 100% wet, it's one and the same, no?
If you want to do it for any other effect, you have to use the Peak node. Here I have the filter in front of the peak node, and if you disable peak, cable_expr and converter, you can hear it behaving as you would expect from a filter, the audio being barely audible as you play higher notes.
But once you enable these, they will normalize it back up. I extended Chris' safeguard range because these filtered signals get very, very quiet. Safeguard strictness is in how small the float in the expression is (original from Chris is 0.01, I further divided that by 1000).
If you remove the filter, I'm confident you can pack this whole thing in and use it as a node in and of itself, like a normalization node.
The "1.0/input" in the expression determines what value it's normalizing to. So if you need it to be quieter, put in another float, like 0.5/input.
HiseSnippet 1800.3oc2Y8zaaTDEe13LIMosnVZKvEjFohDtRkPraosBjvN+ysQfSLwgzxovjcGaOx6NyxtylDWDmfC8Fm6M9HvUtkO.EoJ0qb.9DP3S.7lcW6cWGGGGSaoEWopcduYl2u2+mYRMOoIy2W5gLlYyNtLjw4v06HTsVpEkKPqtLx3MvUo9JlGIhzhcbo99LKjgQt6pIXLyjnveGVZQpMUXxRHgPaI4lrOm6vUITqU9y311UnVrM4Nol8MKupoTrjzVF.3IGddjK0rMsIaMpdZSfQFSshEWI8pqnJlOxXxEkVcp2RtmHZ9aw846XyzCJfpCaTD4JRaKMh0TQK0haaUqqd6iPF3ZIVgbQVgKiqxs38nmXMtPHCRxJRaOLlHK7xkAdERCu4SAuA.IiTPZxHHcQb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APi5nb9LTFdpebo9zY+oMHYPSFyxkCKwB85lK0LFQ6ycwbwtfsgnZwHMgzAR983pVDJwm1f0Lf5YQ7k.Wph.kHTDedSA01mXIEuuR2ndORf605ux7D8UYdJ3.3Iwa4Ag5FnHeJA5k.+JPJQxWXt4IeXH8qQ9XR3GgmBJ81LMbLycBZlp19n6M0AOgpJ63blYp6ZjJSX5mqEA5kIzUvGYqWHPIcfikX0q8UbLPZcHSHvkRBA5MgQLB3s5tmDkjXwL46.GYY1SpUaeEPBqjVzZwSS50TXc7VVeQbI4WUbEGV5XcEwneP0mZ1+KDbB0mlHS8oLpdtgq52Y.cAuS+sB9oG+3eozouKXVM+T2Wn7ONZ33DaIFdHmSP9e0.rCf6dTj+AM+4qTNp95FLel5XRIyVVdQorsCM7T3+quj7UhXdV78o6xBe0ovSHekvwMjdNj6xfCOquZZgg7tSOcTe2I2Q9cmV2TAPXSOpv2U5yJjdm6iWwz7VloBDYmdDoLyRqdU.0K07NS4tDKllXMpHylAiyrSU0W6p6veuTzwKpy.swZceSPYo8E1WKv1mcetkpUgzKLgbwzjuGzCD7KlYtmetg8DbG6sGy9jGol+.tA9Tux8dbuF7zNYd2hY5hw5b8ozVA5xYColgX7MgbwFz.aUWpYyspJExt2RNwquACtheylrr0PGjBsfRQMamP4xk2fYyn9ox2duxeNboXpWXezwyVT3T+7oCze8N3H3RzEDHu99jb49e8SxM5YeP8vWs8huMFpKWjD5JI+23KeY7ncuLjgC0zStc7g+0I8mIjBn2hv+bQyfqpGSJf1M5HMX8K3gbf1EaaZpiW+.n6yfWSwwXM2XLVyMGi07QiwZt0XrlaOFq4NCcM5N0wmsVGyCDpsRzC.Xz8gQfvez+v3k7mU
-
@aaronventure Ah thanks, I was misunderstanding the purpose of this I think. I thought it was for makeup gain so that the input volume is the same as the output