The saugns program can also do it. (It is a command-line audio generator supporting a language including more types of audio generation, including centrally FM/PM and AM/RM modulation techniques.)
To generate two stereo-separated 100 Hz waves, one a sine and one a triangle, and one with inverted amplitude, the following script can be pasted into a file and ran through the program (as in ./saugns filename
):
Wsin f100 a0.5 t2 cL
Wtri f100 a(-0.5) t2 cR
This is also short enough that it can instead simply be ran as a one-liner directly:
./saugns -e "Wsin f100 a0.5 t2 cL Wtri f100 a(-0.5) t2 cR"
The t
s specify time, in seconds.
The c
s are for changing the channel mixing (L = hard left, R = hard right) from the default (C = center). Any numbers from "(-1.0)" to "1.0" can also be used for such values.
Old edit: I'm indeed the developer of the program.
Also, an alternative way of flipping the amplitude (for some wave types, e.g. sin
but not saw
), is to set the phase using a lowercase p
. Adding p0.5
sets phase to 50% of the wave cycle (negative half). Further, as there's no named cosine type, p0.25
is the way to turn sine into cosine (or p0.75
for negative cosine).