# Controlling one signal with another one (Rocket engine effect - Subtractive synthesis of sound)

I am programming some sound effects in Java and exporting them into .wav files. Currently, I am trying to program a rocket engine sound effect. I want to do it in the following way:

The sound of a rocket engine may be synthesized with a red noise generator controlled by a second red noise generator. The parameter of the first generator modified by the second one is the number of interpolated samples, influencing the spectral content of the generated noise. In order to simulate changes of sound intensity (e.g. during launch) the envelope generator should be used.

I am wondering how can it be done, e.g. what does it mean that one signal controls another one. Probably this part is explaining it, but I am not sure what to do now:

The parameter of the first generator modified by the second one is the number of interpolated samples, influencing the spectral content of the generated noise.

Is it about this parameter describing how many values from white noise are taken and linearly interpolated while creating the red noise? (see my simple drawing explaining this process below) I have a red noise generator, which returns an array of doubles with values between -1 and 1 (it is generated from the white noise as described). What am I supposed to do now? How can I control the second red noise? I guess that it does not mean that I should control the amplitude of the second signal. Does it? Schema of steps required to obtain the rocket engine sound effect is attached below. I have already solved this problem: I have a white noise generated as an array of doubles:

public static double[] whiteNoise(int length) {
double[] out = new double[length];
for (int i = 0; i < length; i++) {
out[i] = (Math.random() * 2 - 1.0)/2.0;
}
return out;
}


I obtain the red noise from the white noise in the following way:

public static double[] redNoise(int length, int m) {
double out[] = whiteNoise(length);

for (int i=0; i<length/m-1; i++) {
int k = i*m;
int l = ((i+1)*m <= length-1) ? (i+1)*m : length-1;
double d = (out[l] - out[k])/((double)(m));
for (int j=0; j<m; j++) {
out[k+j] = out[k] + d*j;
}
}
return out;
}


Where the m parameter is the number of interpolated samples (we take the first sample, and the m+1 sample, and interpolate values of all samples between these two).

## And now the SHOW BEGINS

I generate the red noise with the interpolation number equals to let's say 10000. According to the value of consecutive samples, I alter this red noise with different values obtained from these samples taken as the interpolation number parameter. In this way a rocket sound effect is obtained.

int interpolatedframes = 10000;
double[] rednoise1 = SigGen.redNoise(duration, interpolatedframes);
while(i<rednoise1.length-1)
{
selectedNumber = (int)Math.floor(Math.abs((100*(rednoise1[i]+0.5)+100)));
if(i+selectedNumber < rednoise1.length-1) {
rednoise1 = SigGen.alterRedNoise(rednoise1, i, selectedNumber);
}
else
{
break;
}
i+=selectedNumber;
}


With the following code the array with the noise is altered in a way, that it interpolates "interpolationNumber" of samples beginning from the startingIndex.

public static double[] alterRedNoise(double[] input, int startIndex, int interpolationNumber)
{
int k = startIndex;
int l = ((startIndex + interpolationNumber)<input.length-1?(startIndex+interpolationNumber):input.length-1);
double d = (input[l] - input[k])/((double)(interpolationNumber));
for (int j=0; j<interpolationNumber; j++) {
input[k+j] = input[k] + d*j;
}
return input;
}


Sorry for a bit messy code, but I just wanted to publish it ASAP.

#EDIT 1

The sound which is supposed to be generated is the sound of a rocket being launched. Take a look at this movie (maybe from 1:45): https://www.youtube.com/watch?v=OnoNITE-CLc

To have the effect of the rocket flying over, an envelope generator might be used. It can be implemented as a simple multiplication of the samples obtained from the described method in such way, that it will be gradually suppressed.

• thanks for the information. i don't even know what a "rocket engine effect" is or sounds like. is it supposed to be the sound of a blast off at Cape Kennedy? – robert bristow-johnson May 27 '15 at 19:25
• I have edited my answer to add something (also an explanation what kind of sound it is). I obtained a very similar sound to the one from the video. It might be interesting how to obtain this kind of sound, however, it should be treated as a curiosity or a training advice in making some sound effects involving subtractive analysis of sound (in this case - envelope generator mainly). – Piotr Kopczyński May 28 '15 at 20:58