rsc3/doc-schelp/Help-3.12.2/Classes/Schmidt.html

79 lines
4.9 KiB
HTML
Raw Permalink Normal View History

2022-08-24 13:53:18 +00:00
<!doctype html><html lang='en'><head><title>Schmidt | SuperCollider 3.9.3 Help</title>
<link rel='stylesheet' href='./../scdoc.css' type='text/css' />
<link rel='stylesheet' href='./../frontend.css' type='text/css' />
<link rel='stylesheet' href='./../custom.css' type='text/css' />
<meta http-equiv='Content-Type' content='text/html; charset=UTF-8' />
<script>
var helpRoot = './..';
var scdoc_title = 'Schmidt';
var scdoc_sc_version = '3.9.3';
</script>
<script src='./../scdoc.js' type='text/javascript'></script>
<script src='./../docmap.js' type='text/javascript'></script>
<script src='./../prettify.js' type='text/javascript'></script>
<script src='./../lang-sc.js' type='text/javascript'></script>
</head>
<body onload='fixTOC();prettyPrint()'>
<div id='toc'>
<div id='toctitle'>Schmidt:</div>
<span class='toc_search'>Filter: <input id='toc_search'></span><ul class='toc'><li class='toc1'><a href='#description'>Description</a></li>
<ul class='toc'></ul><li class='toc1'><a href='#classmethods'>Class methods</a></li>
<ul class='toc'><li class='toc3'><a href='#*ar'>ar</a> <a href='#*kr'>kr</a> </li>
<li class='toc2'><a href='#Inherited%20class%20methods'>Inherited class methods</a></li>
</ul><li class='toc1'><a href='#instancemethods'>Instance methods</a></li>
<ul class='toc'><li class='toc2'><a href='#Inherited%20instance%20methods'>Inherited instance methods</a></li>
</ul><li class='toc1'><a href='#examples'>Examples</a></li>
<ul class='toc'></ul></ul></div><div class='contents'>
<div id='menubar'></div>
<div class='header'>
<div id='label'>
<span id='folder'>Classes</span>
| <span id='categories'><a href='./../Browse.html#UGens'>UGens</a>&#8201;&gt;&#8201;<a href='./../Browse.html#UGens>Maths'>Maths</a></span>
</div><h1>Schmidt<span id='superclasses'> : <a href="../Classes/InRange.html">InRange</a> : <a href="../Classes/UGen.html">UGen</a> : <a href="../Classes/AbstractFunction.html">AbstractFunction</a> : <a href="../Classes/Object.html">Object</a></span>
</h1>
<div id='summary'>Schmidt trigger.</div>
</div>
<div class='subheader'>
<div id='filename'>Source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Audio/Trig.sc' title='/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Audio/Trig.sc'>Trig.sc</a></div><div id='related'>See also: <a href="./../Classes/InRange.html">InRange</a>, <a href="./../Classes/InRect.html">InRect</a></div>
</div>
<h2><a class='anchor' name='description'>Description</a></h2>
<p>If <code class='code prettyprint lang-sc'>in &gt; hi</code>, output 1. If <code class='code prettyprint lang-sc'>in &lt; lo</code>, output 0. Otherwise, repeat the last sample of output, assumed to be 0 at initialization. In sclang-flavored pseudocode:<pre class='code prettyprint lang-sc'>out[i] = if(in[i] &lt; lo[i]) {
0
} {
if(in[i] &gt; hi[i]) {
1
} {
out[i-1]
}
};</pre>
<h2><a class='anchor' name='classmethods'>Class Methods</a></h2>
<h3 class='method-code'><span class='method-prefix'>Schmidt.</span><a class='method-name' name='*ar' href='./../Overviews/Methods.html#ar'>ar</a>(<span class='argstr'>in: 0</span>, <span class='argstr'>lo: 0</span>, <span class='argstr'>hi: 1</span>)</h3>
<div class='supmethod'>From superclass: <a href='./../Classes/InRange.html'>InRange</a></div>
<h3 class='method-code'><span class='method-prefix'>Schmidt.</span><a class='method-name' name='*kr' href='./../Overviews/Methods.html#kr'>kr</a>(<span class='argstr'>in: 0</span>, <span class='argstr'>lo: 0</span>, <span class='argstr'>hi: 1</span>)</h3>
<div class='supmethod'>From superclass: <a href='./../Classes/InRange.html'>InRange</a></div>
<div class='method'>
<p><h4>Arguments:</h4>
<table class='arguments'>
<tr><td class='argumentname'>in<td class='argumentdesc'>
<p>Signal to be tested.<tr><td class='argumentname'>lo<td class='argumentdesc'>
<p>Low threshold.<tr><td class='argumentname'>hi<td class='argumentdesc'>
<p>High threshold.</table></div><h3><a class='anchor' name='Inherited%20class%20methods'>Inherited class methods</a></h3>
<div id='inheritedclassmets'></div><h2><a class='anchor' name='instancemethods'>Instance Methods</a></h2>
<h3><a class='anchor' name='Inherited%20instance%20methods'>Inherited instance methods</a></h3>
<div id='inheritedinstmets'></div><h2><a class='anchor' name='examples'>Examples</a></h2>
<pre class='code prettyprint lang-sc'>s.boot;
{ Schmidt.kr(SinOsc.kr(1, 0, 0.2), -0.15, 0.15)}.scope; // see the trigger
{ Schmidt.kr(MouseX.kr(0, 1), 0.2, 0.8)}.scope; // try it with the cursor
// threshold octave jumps
(
{
var in = LFNoise1.kr(3);
var octave = Schmidt.kr(in, -0.15, 0.15) + 1;
SinOsc.ar(in * 200 + 500 * octave, 0, 0.1)
}.scope;
)</pre>
<div class='doclink'>helpfile source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/Schmidt.schelp'>/Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/Schmidt.schelp</a><br>link::Classes/Schmidt::<br></div></div></body></html>