luaplayer.org
September 08, 2010, 03:26:57 AM
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
: IMPORTANT: Please read the following post
http://luaplayer.org/forums/index.php?topic=693
Home
Help
Search
Login
Register
luaplayer.org
>
Phoenix Game Engine
>
PGE Help
>
Sound Wave generation
Pages: [
1
]
« previous
next »
Print
Author
Topic: Sound Wave generation (Read 169 times)
emcp
Sr. Member
Posts: 479
Sound Wave generation
«
on:
March 03, 2010, 04:26:26 PM »
How much change to pge source
would be required inorder for me to be capable of creating dynamic in-game music
Basically, im going to have several 'sine' waves, at different frequencies etc, use superposition and then pass it to the speakers
thanks
Logged
Criptych
Global Moderator
Hero Member
Posts: 692
Why, oh why, didn't I take the blue pill?
Re: Sound Wave generation
«
Reply #1 on:
March 03, 2010, 07:20:29 PM »
What about creating your waveforms as strings and using
pge.wav.loadmemory
? (Don't forget to add a RIFF header, too.) Not sure how well this would perform in real-time, but generating sounds ahead-of-time shouldn't be too bad.
Alternatively, if your music only uses a limited range of sounds, you could store each one as a WAV file and just play them at the appropriate time and pitch, kind of like a synthesizer. For example, you could play a simple tune with just one "piano key" sound, by changing the pitch across a full octave.
Logged
I used to be a schizophrenic - but we're okay now.
FFN Browser
|
Nanotank! PSP
|
Google Maps PSP
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Phoenix Game Engine
-----------------------------
=> PGE General Discussion
=> PGE Help
=> PGE Bug Reports
=> PGE Requests
=> PGE Articles & Tutorials
-----------------------------
Lua Player
-----------------------------
=> Lua Player Discussion
=> Lua Player Help
=> Lua Player Bug Reports
=> Lua Player Requests
=> Lua Player Articles & Tutorials
-----------------------------
Other
-----------------------------
=> Homebrew Releases
=> Off Topic
Loading...