<blocksapp="Snap! 5.0, http://snap.berkeley.edu"version="1"><block-definitions="turbo %'action'"type="command"category="other"><header></header><code></code><translations>pt:executa no modo turbo _
</translations><inputs><inputtype="%cs"></input></inputs><script><blocks="doDeclareVariables"><list><l>begin</l></list></block><blocks="doSetVar"><l>begin</l><blocks="reportGlobalFlag"><l><option>turbo mode</option></l></block></block><blocks="doSetGlobalFlag"><l><option>turbo mode</option></l><l><bool>true</bool></l></block><blocks="doRun"><blockvar="action"/><list></list></block><blocks="doSetGlobalFlag"><l><option>turbo mode</option></l><blockvar="begin"/></block></script></block-definition><block-definitions="%'frequency' Hz for %'duration' secs at %'sample rate' Hz sample rate"type="reporter"category="sound"><commentx="0"y="0"w="205"collapsed="false">generate a list of samples representing a sine wave at the given frequency, duration and sample rate</comment><header></header><code></code><translations>pt:as amostras de som com _ Hz de _ s amostrado a _ Hz
</translations><inputs><inputtype="%n">440<options>a 55=55
a 110=110
a 220=220
a 440=440
a 880=880
a 1760=1760
a 3520=3520</options></input><inputtype="%n">1</input><inputtype="%n">44100<options>22.05 kHz=22050
44.1 kHz=44100
88.2 kHz=88200
96 kHz=96000</options></input></inputs><script><blocks="doDeclareVariables"><list><l>output</l><l>sample period</l><l>duration in samples</l><l>time</l></list></block><blocks="doSetVar"><l>sample period</l><blocks="reportQuotient"><l>1</l><blockvar="sample rate"/></block></block><blocks="doSetVar"><l>duration in samples</l><blocks="reportMonadic"><l><option>ceiling</option></l><blocks="reportProduct"><blockvar="duration"/><blockvar="sample rate"/></block></block></block><blocks="doSetVar"><l>time</l><l>0</l></block><blocks="doSetVar"><l>output</l><blocks="reportNewList"><list></list></block></block><blocks="doWarp"><script><blocks="doRepeat"><blockvar="duration in samples"/><script><blocks="doAddToList"><blocks="reportMonadic"><l><option>sin</option></l><custom-blocks="degrees %n"><blocks="reportProduct"><l>2</l><blocks="reportProduct"><custom-blocks="PI"></custom-block><blocks="reportProduct"><blockvar="frequency"/><blockvar="time"/></block></block></block></custom-block></block><blockvar="output"/></block><blocks="doChangeVar"><l>time</l><blockvar="sample period"/></block></script></block></script></block><blocks="doReport"><blockvar="output"/></block></script></block-definition><block-definitions="PI"type="reporter"category="operators"><header></header><code></code><translations>pt:π
</translations><inputs></inputs><script><blocks="doReport"><l>3.141592653589793</l></block></script></block-definition><block-definitions="degrees %'radians'"type="reporter"category="operators"><header></header><code></code><translations>pt:_ radianos em graus
</translations><inputs><inputtype="%n">0.5</input></inputs><script><blocks="doReport"><blocks="reportQuotient"><blocks="reportProduct"><blockvar="radians"/><l>180</l></block><custom-blocks="PI"></custom-block></block></block></script></block-definition><block-definitions="sound named %'name'"type="reporter"category="sensing"><header></header><code></code><translations>pt:o som _
</translations><inputs><inputtype="%s"><options>§_soundsMenu</options></input></inputs><script><blocks="doReport"><blocks="reportFindFirst"><blocks="reifyPredicate"><autolambda><blocks="reportEquals"><blocks="reportGetSoundAttribute"><l><option>name</option></l><l></l></block><blockvar="name"/></block></autolambda><list></list></block><blocks="reportGet"><l><option>sounds</option></l></block></block></block></script></block-definition><block-definitions="plot sound %'name'"type="command"category="pen"><commentw="164"collapsed="false">quickly plot the samples of a sound, a list of samples (single channel), or a list