Re: ambient_generic output on stopsound?
Posted by EMP_JC on
Wed Apr 23rd 2008 at 2:53am
EMP_JC
member
1 post
0 snarkmarks
Registered:
Jan 18th 2005
Occupation: Network lackey
Location: USA
I have a problem that seems like it should have a simple fix, but that
fix is eluding me.
I'm using a logic_case to shuffle MP3s that are played in my map
through an env_microphone. The end result is supposed to be a shuffled
playlist that will sound naturally like a radio broadcast. That is,
when one ambient_generic is done playing, it should trigger the
logic_case to pick another and activate it. This would be simple enough
except that the ambient_generic class does not define any way to output
when it is done playing the specified sound.
It would be simple enough to have the logic_case, when called to
pickrandom_shuffle, both play an ambient_generic and start a
logic_timer that would re-fire the pickrandom at the end of the song
being played. However, my eventual goal is that this would be slightly
more modular. I want people to be able to drop MP3s into the /sounds
directory and have them played by this shuffler, so fixed timers would
not work, and having a master timer that lasts 3-5 minutes would seem
akward.
What I have tried so far is to monitor the sound level of the
env_microphone and when no sound is detected for 5 seconds, trigger the
logic_case to pickrandom. This would leave a small gap between songs,
but prevents songs with short silences from being cut off. I thought it
would be easy enough to place a second env_microphone and filter it to
monitor only the sound of the first env_microphone. However, every time
I do this it seems to do two things:
1: It overrides the DSP effect of the original env_microphone, so that no DSP effects work.
2: It DOESN'T trigger the logic_case when the sound output falls to zero.
I am
resigned that perhaps two env_microphones cannot be used in this
manner, but I do not know why. If someone has a solution, or a better
suggestion as to how I can trigger an output when an ambient_generic
finishes playing a sound, it would help me immensely.