Hi all , been a while since I have posted . I have taken a interest in procedural generation and I thought i would start with what i consider the hardest, sound.
I am unsure if this is possible using love.sound so I'm asking for a simple example on getting tabled wave data ( from what iv have read ranges from -1 to 1) into a playable sound.
any tips or code will be appreciated
Procedural sound in Love ; looking for an example
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: Procedural sound in Love ; looking for an example
Recently, I attempted the same. Unfortunately, it failed to generate anything near useful.
I'm rather interested in what this turns up, but I have no tips or code that could be of use.
I'm rather interested in what this turns up, but I have no tips or code that could be of use.
Help us help you: attach a .love.
- BlackBulletIV
- Inner party member
- Posts: 1261
- Joined: Wed Dec 29, 2010 8:19 pm
- Location: Queensland, Australia
- Contact:
Re: Procedural sound in Love ; looking for an example
Moan is a good example of procedural sound.
Re: Procedural sound in Love ; looking for an example
thanks , I'll take a look at itBlackBulletIV wrote:Moan is a good example of procedural sound.
- Taehl
- Dreaming in associative arrays
- Posts: 1025
- Joined: Mon Jan 11, 2010 5:07 am
- Location: CA, USA
- Contact:
Re: Procedural sound in Love ; looking for an example
As just a quick little example:
That will give you a burst of static which will fade out.
Code: Select all
local samples = math.floor(.2 * 44100) --.2 seconds long
local data = love.sound.newSoundData(samples, 44100, 16, 1)
for i = 0,samples do data:setSample(i, (math.random()*2-1)*(1-i/samples)) end
staticBurst = love.audio.newSource(data)
Earliest Love2D supporter who can't Love anymore. Let me disable pixel shaders if I don't use them, dammit!
Lenovo Thinkpad X60 Tablet, built like a tank. But not fancy enough for Love2D 0.10.0+.
Lenovo Thinkpad X60 Tablet, built like a tank. But not fancy enough for Love2D 0.10.0+.
Re: Procedural sound in Love ; looking for an example
thank you sooo much is spent a goodly time looking at moan yesterday , and i still could not see the exact minimum neededTaehl wrote:As just a quick little example:That will give you a burst of static which will fade out.Code: Select all
local samples = math.floor(.2 * 44100) --.2 seconds long local data = love.sound.newSoundData(samples, 44100, 16, 1) for i = 0,samples do data:setSample(i, (math.random()*2-1)*(1-i/samples)) end staticBurst = love.audio.newSource(data)
- Taehl
- Dreaming in associative arrays
- Posts: 1025
- Joined: Mon Jan 11, 2010 5:07 am
- Location: CA, USA
- Contact:
Re: Procedural sound in Love ; looking for an example
You're welcome. Good luck on your project.
Earliest Love2D supporter who can't Love anymore. Let me disable pixel shaders if I don't use them, dammit!
Lenovo Thinkpad X60 Tablet, built like a tank. But not fancy enough for Love2D 0.10.0+.
Lenovo Thinkpad X60 Tablet, built like a tank. But not fancy enough for Love2D 0.10.0+.
Who is online
Users browsing this forum: aikusuuta, Bing [Bot] and 14 guests