Sine wave: Difference between revisions
Content added Content deleted
Thundergnat (talk | contribs) m (syntax highlighting fixup automation) |
m (→{{header|Wren}}: Minor tidy) |
||
Line 674: | Line 674: | ||
{{libheader|Wren-sound}} |
{{libheader|Wren-sound}} |
||
As Wren-cli doesn't have any built-in audio support, we instead build a .wav file which can then be played using a utility such as rhythmbox or SoX, |
As Wren-cli doesn't have any built-in audio support, we instead build a .wav file which can then be played using a utility such as rhythmbox or SoX, |
||
<syntaxhighlight lang=" |
<syntaxhighlight lang="wren">import "./sound" for Wav |
||
var sineWave = Fn.new { |frequency, seconds, sampleRate| |
var sineWave = Fn.new { |frequency, seconds, sampleRate| |