(oscillator).getType

(別名: (oscillator).get_type)

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.js] (p5.Oscillator).getType

概要

信号の波形を取得します。

書式

r = obj.getType

引数

なし

戻値

r : 波形 ('sine' | 'triangle' | 'sawtooth' | 'square')

備考

関連

Oscillator.new
(oscillator).start
(oscillator).stop
(oscillator).freq
(oscillator).amp
(oscillator).setType
(oscillator).getFreq
(oscillator).getAmp