/** * every 2 seconds, one out of 3 different sounds should play */ public SoundEvent Test_MorphingSoundEvent() { SoundEvent soundScript = new SoundEvent("Test_MorphingSoundEvent"); MorphingSoundEvent mEv = new MorphingSoundEvent(); // component 1 SampleSoundEvent evTwoPing = new SampleSoundEvent("synthetic_twoPing.wav"); // component 2 SampleSoundEvent evDing = new SampleSoundEvent("ding.wav"); evDing.Amplitude = 0.5; // comp3 SampleSoundEvent evEmerald = new SampleSoundEvent("tail_emerald2.wav"); evEmerald.Amplitude = 0.2; // add comps to the morphing event mEv.AddEvent(0, evTwoPing); mEv.AddEvent(0, evDing); mEv.AddEvent(0, evEmerald); // repeat this event lots of times to test for(double t= 0; t < 300 ; t+=0.5 ) soundScript.AddEvent(t, new MorphingSoundEvent(mEv )); return soundScript; }
/** copy constructor */ public MorphingSoundEvent(MorphingSoundEvent other) : base(other) { }