AudioKit / AudioKit

Audio synthesis, processing, & analysis platform for iOS, macOS and tvOS
http://audiokit.io
MIT License
10.69k stars 1.56k forks source link

change in AKZitaReverb from 4.7.1 to 4.9 #1879

Closed inhumanscale closed 5 years ago

inhumanscale commented 5 years ago

I'm noticing difference in the behavior of AKZitaReverb from 4.7.1 to 4.9. Minimal example follows,

        let path = Bundle.main.resourcePath! + "/leadloop.wav"
        let player = AKPlayer(url: URL(fileURLWithPath: path))!
        player.isLooping = true
        let zr0 = AKZitaReverb(player)
        let zr1 = AKZitaReverb(zr0)
        AudioKit.output = zr1
        zr0.start()
        zr1.start()
        try? AudioKit.start()
        player.play()

Levels are definitely off but I cannot determine if there is more.

aure commented 5 years ago

Because I'm so grateful that you pointed out the memory leak, I thought I'd investigate this next and what's interesting is that we updated Soundpipe on May 15th, and had to update the tests to reflect that Zita Reverb did change. The answer is definitely something in here https://github.com/AudioKit/AudioKit/commit/031a7dcc421850cb40cfc8d51636fba3f4b3dea8

aure commented 5 years ago

Here's the change:

interface->addHorizontalSlider(interface->uiInterface, "level", &dsp->fHslider0, 0.f, -70.f, 40.f, 0.1f);
interface->addHorizontalSlider(interface->uiInterface, "level", &dsp->fHslider0, -20.f, -70.f, 40.f, 0.1f);
getdunne commented 5 years ago

I had fixed this way back, but updating Soundpipe probably un-fixed it.

aure commented 5 years ago

Why was it changed only in AudioKit and not in Soundpipe? Which value is "correct"?

aure commented 5 years ago

Happy to revert, just want to have a consensus.

getdunne commented 5 years ago

Pretty sure the changes I made were to the Soundpipe code. That fHslider business. The problem was that the Zita reverb gain wasn't getting initialized at all, so it was basically default to 0, hence no sound out. Look in the history of that file, and you'll see where I fixed it before.

aure commented 5 years ago

I do see it, but it never made it back to the Soundpipe repo.

aure commented 5 years ago

I committed the reversal.