If you scroll down past the shenanigans in that Stack Overflow question there’s a kind person who has thrown together a simple example in C#: https://dsp.stackexchange.com/a/36778
A solution in Lua should be quite similar!
If you scroll down past the shenanigans in that Stack Overflow question there’s a kind person who has thrown together a simple example in C#: https://dsp.stackexchange.com/a/36778
A solution in Lua should be quite similar!
Just looked at this and it seems simple enough. Question though, if you undestand C#; in the following line of code what does the ‘f’ represent in the 0.5f and 1f parts? Is that just defining the data type as a ‘float’? Or is it a variable that I’m just not reading in that code:
volumes[0] = Math.Sqrt(0.5f * (1f + t));
Good question. IIRC the f suffix in C# does denote a float literal; it’s not a variable 
The help is much appreciated. I believe I know what lua math functions and data structures that I can use to solve the problem. It’s a simple one I’m sure but new to me. Excited to get it sorted tomorrow. I’ll share the results once I’ve got the solution.
Cheers!
I wrote constant power crossfade code for the NTS-1 in C++, you should be able to translate it.