SpHr_SignalAM [ flags ] signalWave
Applies amplitude modulations to the signal specified by SignalWave.
Parameters
signalWave Specifies the single precision wave to which amplitude modulations are applied. signalWave may have one column (mono) or two columns (stereo). Additional columns are currently ignored.
Flags
/Type = {typeStr [, option ] }
typeStr is the type of modulation applied. May be one of:
options option for some type of modulations.
"sine" or "sin" (options is ignored)
"cosine" or "cos" (options is ignored)
"sawtooth" or "saw"
option = 0 for normal sawtooth envelope, option is ignored if typeStr is neither "sawtooth" nor "saw".
option = 1 for inverse (reverse) sawtooth envelope, option is ignored if typeStr is neither "sawtooth" nor "saw".
/F = { AMfreq [, AMfreq2 ] }
AMfreq is modulation frequency (Hz).
AMfreq2 optional modulation frequency (Hz) for column 1 (right channel). If AMfreq2 is omitted, AMfreq2 = AMfreq.
/FWC [ = wholeCycles ]
if wholeCycles is omitted or wholeCycles = 0, AMfreq and AMfreq2 (if specified) are unmodified. This may result in fractional numbers of modulation cycles.
wholeCycles = 1, AMfreq and AMfreq2 (if specified) are set to the nearest frequency that results in a whole number of modulation cycles. Frequencies used are set to variables V_AMFreq and V_AMFreq2 when the operation returns.
/D = { depth [, depth2 ] }
depth is modulation depth (%). Must be a value between 0 and 100.
depth2 optional peak modulation amplitude for column 1 (right channel). If depth2 is omitted, depth2 = depth.
/P = { phase [, phase2 ] }
phase modulation phase in radians (usually 0, pi/2, or pi).
phase2 optional modulation phase in radians for column 1 (right channel). If phase2 is omitted, phase2 = phase.
/A = { amplitude [, amplitude2 ] }
amplitude is peak modulation amplitude. Default is amplitude = 1/(1-((depth/100)/2));
amplitude2 optional peak modulation amplitude for column 1 (right channel). If amplitude2 is omitted, amplitude2 = amplitude.
/BA = { bufferAmplitude [, bufferAmplitude2 ] }
bufferAmplitude amplitude of optional buffer points (see /BUFF flag). Default bufferAmplitude = 1.0.
bufferAmplitude2 optional amplitude of buffer points for column 1 (right channel). If bufferAmplitude2 is omitted, bufferAmplitude2 = bufferAmplitude.
/ITD = { itd [, insertPoints ] }
itd is an interaural time difference imposed between channels 1 and 2 (columns 0 and 1 of signalWave).
By default, insertPoints = 0 and ITDs are imposed using phase shifts. If insertPoints is set to 1, ITDs are imposed by inserting points.
/Ramp = { onRamp [, offRamp ]
onRamp 'on' ramp (ms) during which modulation depth increases.
offRamp optional 'off' ramp (ms) during which modulation depth decreases.
The first 'on' and last 'off' points are set to 1.0 or to values passed using the /BA flag.
/Buff = { frontBuffer [, backBuffer ]
The /Buff flag should not be used together with the /Ramp flag.
frontBuffer buffer (ms) prior to when modulations begin.
backBuffer optional buffer (ms) after modulations end.
Buffer points are set to 1.0 or to values passed using the /BA flag.
/Env = [ AMenvelope ]
AMenvelope is the specification for the wave with which signalWave is multiplied. If the /Env flag is present but AMenvelope is omitted, a wave named SignalEnvelope is created. This wave has the same dimensions as signalWave.
Examples
SpHr_SignalBinaural/sec=0.1/Ramp=0/dB=70/HP=50/Sp=0 48000, NoiseBurst
SpHr_SignalAM/Type={"Cos"}/F={50}/D={50}/Ramp={20}/Env=AMEnvelope NoiseBurst
// or
SpHr_SignalAM/Type={"Saw",1}/F={50}/D={50}/Ramp={20}/Env=AMEnvelope NoiseBurst
// or
SpHr_SignalAM/Type={"Sin"}/F={50}/D={50}/Buff={20}/ITD={1,1}/Env=AMEnvelope NoiseBurst
// or
SpHr_SignalAM/Type={"Sin"}/F={50}/D={50}/Ramp={20}/ITD={1,1}/Env=AMEnvelope NoiseBurst
// Display NoiseBurst and AMEnvelope
Display /K=1/W=(196,271,591,479) NoiseBurst[*][0],NoiseBurst[*][1]
AppendToGraph/R AMEnvelope[*][0],AMEnvelope[*][1]
ModifyGraph rgb(NoiseBurst)=(49151,49152,65535),rgb(NoiseBurst#1)=(65535,49151,49151)
ModifyGraph rgb(AMEnvelope)=(0,0,65535)
Label left "carrier amplitude (\\U)"
Label right "envelope (\\U)"
SetAxis/A/E=2 left
SetAxis right 0,*