def setup
background(220)
osc = Oscillator.new
text("Type : #{osc.getType}", 20, 30)
text("Freq : #{osc.getFreq}", 20, 50)
text("Amp : #{osc.getAmp}", 20, 70)
end
[p5.js] (p5.Oscillator).getType
信号の波形を取得します。
なし
r : 波形 ('sine' | 'triangle' | 'sawtooth' | 'square')