Page 1 of 1

Different ways to adjust audio

Posted: Sat Mar 30, 2024 12:14 pm
by Gunroar:Cannon()
I want to create a gibberish-like speech thing and do that by making different short audio tracks of sounds (like nah, bah, kan, etc). Then add them together with slight fluctuations in the pitch. For characters with deeper voices I'll make the average pitch lower, and higher pitches for "cuter" characters.

Now I was wondering if there's more I can do besides changing pitch (so I can use same sounds for more characters). I noticed the love.audio.setEffect and setFilter, but I know close to nothing about what lowpass, etc filters do.

Could you please help guide and explain some more ways I could change Audio? Thank you.

Re: Different ways to adjust audio

Posted: Wed Apr 03, 2024 8:36 am
by RNavega
I'm in the same boat, in that I haven't tried the Löve audio system yet.
What I'd do is make a folder with a main.lua inside it and treat it like a sandbox, testing all kinds of stuff.

You mentioned that Banjo Kazooie style of speech, I think there are only two ways: playing the same source over and over, setting the pitch of the source each time, or creating a set of audio buffers for each pitch level, then queueing them at random with a queueable source, if it's supported. In this last method, also having a buffer of silence for spaces.
But which method works best, I don't know. Some testing should let you know better, as there might be something we're not considering here.

Re: Different ways to adjust audio

Posted: Wed Apr 03, 2024 1:27 pm
by zorg
You could just use one sounddata for one "vocal" grunt, and write to a short buffer in a way to interpolate between samplepoints when you want to sample between the stored ones (to manually alter the playback rate, so, the pitch and speed)

That said, the effects themselves might not really be needed for just that kind of gibberish vocals. EffectType does have a list explaining what they do, and if that doesn't help, look up random youtube videos on the topics or download a DAW like FL studio (demo's free) and experiment.

Re: Different ways to adjust audio

Posted: Wed Apr 03, 2024 10:33 pm
by dusoft
I would recommend maybe going over code of these libs:
https://github.com/Ulydev/wave (If I understand it already provides pitch modulation etc.)
https://github.com/tesselode/ripple (This one has some effects)

I haven't studied the code, but I would start here for some inspiration and tips.

Reverb is well explained here:
https://en.wikipedia.org/wiki/Reverb_effect

These are also good info for beginners on various effects including diff passes:
https://www.productionmusiclive.com/blo ... ained-2021
https://www.izotope.com/en/learn/guide- ... fects.html
(I know you can Google too ;-)

Re: Different ways to adjust audio

Posted: Fri Apr 05, 2024 6:11 am
by zorg
(Source:setPitch in and of itself already provides changing the pitch (=resampling rate), you don't necessarily need a library for that for just grunts)

And neither wave, nor the ripple library does not add any effects, so to speak. The former just adds some helper functions for existing functionality to be easier to use, and the latter just explicitly mentions you can use löve's with it.

Also, would be nice if those sites didn't shill specific tools' capabilities and just talked generically about effects; otherwise people will have silly preconceptions about things... :c

Speaking of, here's my library that does implement independent time stretching and pitch shifting effects, along with non-effect features that you can *use* as effects, like reverse playback, custom loop points and flipped buffers, and some other things.