llPlaySoundAtPitch()
|
|
Lex Neva
wears dorky glasses
Join date: 27 Nov 2004
Posts: 1,361
|
08-11-2006 16:31
Here's an interesting idea that I just thought of: llPlaySoundAtPitch(string sound, float volume, float pitch); The sound library used in SL already has the ability to pitch-bend sound, because they use that for the doppler effect. It's probably just a simple system that varies the playback speed, but many MOD trackers out there can tell you that there's a lot you can do with just this rudimentary form of pitch-bending. Using this, you could add a little bit of random pitch-bending to sound-effects to make them a lot less repetitive and more interesting, for example gunshots. You could also play a sound at two slightly different pitches, which would (I think) generate a strange flangey effect.
|
|
Jillian Callahan
Rotary-winged Neko Girl
Join date: 24 Jun 2004
Posts: 3,766
|
08-11-2006 16:56
*whimpers* Pleeeeeeeeeeeaaaaaaaaaaaassssssseeeeeeeee?
llLoopSoundAtPitch(string sound, float volume, float pitch) llChangeSoundPitch(float pitch)
Perdy please?
|
|
Rickard Roentgen
Renaissance Punk
Join date: 4 Apr 2004
Posts: 1,869
|
08-11-2006 17:07
Added to the todo list at 5,442,469,004,345th
|
|
Jesse Malthus
OMG HAX!
Join date: 21 Apr 2006
Posts: 649
|
08-11-2006 21:36
I love it. Even if I can't hear...
_____________________
Ruby loves me like Japanese Jesus. Did Jesus ever go back and clean up those footprints he left? Beach Authority had to spend precious manpower. Japanese Jesus, where are you? Pragmatic!
|
|
Haravikk Mistral
Registered User
Join date: 8 Oct 2005
Posts: 2,482
|
08-12-2006 04:07
Would be awesomely handy for using the same sound at different pitches to make it more varied for explosions and such-like. Myth: The Fallen Lords had this YEARS ago and it is one of the most immersive games for the ambient sounds.
_____________________
Computer (Mac Pro): 2 x Quad Core 3.2ghz Xeon 10gb DDR2 800mhz FB-DIMMS 4 x 750gb, 32mb cache hard-drives (RAID-0/striped) NVidia GeForce 8800GT (512mb)
|
|
Aodhan McDunnough
Gearhead
Join date: 29 Mar 2006
Posts: 1,518
|
08-12-2006 04:52
@Lex It's not a change in playback speed. MP3s for example are sounds reassembled from frequency spectra. By changing the base frequency you can shift the whole spectrum up or down easily. This will change even speech without creating the Chipmunk effect. A 2 second sound clip will still play for 2 seconds regardless of the shift. C'mon LL, can we have this LSL instruction ... pleeeeeeeeeeeze?
_____________________
Aodhan's Forge shop at slurl.com/secondlife/Rieul/95/213/107
|
|
Jesse Malthus
OMG HAX!
Join date: 21 Apr 2006
Posts: 649
|
08-16-2006 19:23
*shameless bump for coolness*
_____________________
Ruby loves me like Japanese Jesus. Did Jesus ever go back and clean up those footprints he left? Beach Authority had to spend precious manpower. Japanese Jesus, where are you? Pragmatic!
|
|
Ashrilyn Hayashida
Registered User
Join date: 6 Jul 2006
Posts: 103
|
08-23-2006 14:19
This would be a nice feature.. I think it would be nice if there were a version that does the "chipmunk effect" when the pitch is raised - one that affects the length as well as the pitch (and makes a sound very slow at a low pitch). But one that doesn't affect the length of the sound would have good uses as well, surely.
|
|
Lex Neva
wears dorky glasses
Join date: 27 Nov 2004
Posts: 1,361
|
08-24-2006 08:42
From: Ashrilyn Hayashida This would be a nice feature.. I think it would be nice if there were a version that does the "chipmunk effect" when the pitch is raised - one that affects the length as well as the pitch (and makes a sound very slow at a low pitch). But one that doesn't affect the length of the sound would have good uses as well, surely. The chipmunk effect was what I was thinking. I didn't know that changing the pitch of a sample without affecting its playing length was as easy as Aodhan said. Even still, I think that'd at least require a fourier transform, which may not be so speedy to do in a realtime fashion in SL. Besides, most change-pitch-but-retain-length programs I've heard distorted the sample and made it sound jittery. Speed-changing is really simple to do, and I know that FMOD does it, so I was figuring that was the route to quickest implementation.
|
|
Rickard Roentgen
Renaissance Punk
Join date: 4 Apr 2004
Posts: 1,869
|
08-24-2006 10:26
From: Lex Neva The chipmunk effect was what I was thinking. I didn't know that changing the pitch of a sample without affecting its playing length was as easy as Aodhan said. Even still, I think that'd at least require a fourier transform, which may not be so speedy to do in a realtime fashion in SL. Besides, most change-pitch-but-retain-length programs I've heard distorted the sample and made it sound jittery. Speed-changing is really simple to do, and I know that FMOD does it, so I was figuring that was the route to quickest implementation. Quick point for any linden readers (even though I'm sure it will occur to you anyway) Great way to conserve resources. I know, not much maybe, but every little bit counts. Engines that use one sound instead of 3 or 4. chimes that use one sound, instruments that you can play notes on using... you guessed it, ONE SOUND  . And ya, changing play length along with pitch is perfectly fine, in fact it's better. Imagine those annoying water noises people like to put 30 of in one place on their property. Now imagine if the scripts randomly pitched them on rez! Jesus Mary and Joseph, if the play rate and pitches all varied slightly it would improve the ambience no end!!!
|
|
Gerami Fizz
That Guy
Join date: 15 Jun 2005
Posts: 88
|
08-31-2006 14:27
I approve of this idea.
In fact, multiply that approval by an arbitrary number higher than 100,000.
This would uncomplicate playable instruments to an AWESOME degree and let those of us who make them concentrate on more advanced features. Plus, it sucks to upload 70 sound samples, realize I did something stupid, and have to upload 70 more.
Where's the proposal? It's getting my votes!
|
|
Lex Neva
wears dorky glasses
Join date: 27 Nov 2004
Posts: 1,361
|
09-01-2006 10:14
|
|
Rickard Roentgen
Renaissance Punk
Join date: 4 Apr 2004
Posts: 1,869
|
09-01-2006 10:23
I voted! vote vote vote!
|
|
Supa Shang
Registered User
Join date: 10 Jul 2005
Posts: 26
|
09-01-2006 10:38
I mentioned this to LL quite some time ago. It is a great idea and one that would save us all the extra few L$ when uploading the same sample file at a slightly different pitch each time we need some sound variation. Oh hang on did I say it would save us a few L$? 
|
|
Haravikk Mistral
Registered User
Join date: 8 Oct 2005
Posts: 2,482
|
09-01-2006 11:24
I just use volume instead, it's no match for a proper pitch change. No way am I paying for multiple copies of the same file to be uploaded.
_____________________
Computer (Mac Pro): 2 x Quad Core 3.2ghz Xeon 10gb DDR2 800mhz FB-DIMMS 4 x 750gb, 32mb cache hard-drives (RAID-0/striped) NVidia GeForce 8800GT (512mb)
|
|
Vincent Nacon
Reseacher & Developer
Join date: 1 Mar 2006
Posts: 111
|
09-01-2006 11:49
From: Haravikk Mistral I just use volume instead, it's no match for a proper pitch change. No way am I paying for multiple copies of the same file to be uploaded. ....um, what?
|
|
Haravikk Mistral
Registered User
Join date: 8 Oct 2005
Posts: 2,482
|
09-01-2006 13:39
From: Vincent Nacon ....um, what? Um...read Supa's post immediately before mine (and thus what I'm replying to)? To get the same sound with different pitch variations right now you need to upload multiple copies of essentially the same sound. I'm not going to do that, I just use randomised volume, it's no match for proper pitch change, but it gives some variation which is what I want.
_____________________
Computer (Mac Pro): 2 x Quad Core 3.2ghz Xeon 10gb DDR2 800mhz FB-DIMMS 4 x 750gb, 32mb cache hard-drives (RAID-0/striped) NVidia GeForce 8800GT (512mb)
|