turtlestitch/libraries/audioComp_module.xml

1 wiersz
12 KiB
XML
Czysty Zwykły widok Historia

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