Wav file as osc waveform

Are you using the IDE? If so, you could go to the Server menu and find Scope and Frequency Scope commands.

If you are using a different editor, you can use s.scope and s.freqscope to look at the server’s main output.

You should then not have to insert anything into the code that I posted.

The place where you tried to insert plot is an instruction, in JITLib, to connect ~a to the main outputs – so this is not the place to try to plot. If you want to look at a static plot, take one of the synthesis functions (alone – remove ~a =) and add .plot, e.g.

{ |freq = 200|
	var modIndex = 1,
	mod = SinOsc.ar(freq) * modIndex,
	phase = LFSaw.ar(freq) * pi;
	cos(phase + mod).dup
}.plot;

hjh