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

128 lines
9.8 KiB
HTML
Raw Permalink Normal View History

2022-08-24 13:53:18 +00:00
<!doctype html><html lang='en'><head><title>MIDIExplorer | SuperCollider 3.11.1 Help</title>
<link rel='stylesheet' href='./../scdoc.css' type='text/css' />
<link rel='stylesheet' href='./../codemirror.css' type='text/css' />
<link rel='stylesheet' href='./../editor.css' type='text/css' />
<link rel='stylesheet' href='./../frontend.css' type='text/css' />
<link rel='stylesheet' href='./../custom.css' type='text/css' />
<meta name='viewport' content='width=device-width, initial-scale=1'>
<meta http-equiv='Content-Type' content='text/html; charset=UTF-8' />
<script src='./../lib/jquery.min.js'></script>
<script src='./../lib/codemirror-5.39.2.min.js' type='text/javascript'></script>
<script src='./../lib/codemirror-addon-simple-5.39.2.min.js' type='text/javascript'></script>
<script>
var helpRoot = './..';
var scdoc_title = 'MIDIExplorer';
var scdoc_sc_version = '3.11.1';
</script>
<script src='./../scdoc.js' type='text/javascript'></script>
<script src='./../docmap.js' type='text/javascript'></script>
<script src='qrc:///qtwebchannel/qwebchannel.js' type='text/javascript'></script>
</head>
<body onload='fixTOC()'>
<div id='toc'>
<div id='toctitle'>MIDIExplorer:</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='#*postSrcInfo'>postSrcInfo</a> </li>
<li class='toc3'><a href='#*start'>start</a> </li>
<li class='toc3'><a href='#*postObs'>postObs</a> </li>
<li class='toc3'><a href='#*stop'>stop</a> </li>
<li class='toc3'><a href='#*deviceName'>deviceName</a> </li>
<li class='toc3'><a href='#*instructions'>instructions</a> </li>
<li class='toc3'><a href='#*compile'>compile</a> </li>
<li class='toc3'><a href='#*openDoc'>openDoc</a> </li>
<li class='toc3'><a href='#*compileDesc'>compileDesc</a> </li>
<li class='toc3'><a href='#*verbose'>verbose</a> </li>
<li class='toc3'><a href='#*trace'>trace</a> </li>
<li class='toc3'><a href='#*allMsgTypes'>allMsgTypes</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></ul></div><div id='menubar'></div>
<div class='contents'>
<div class='header'>
<div id='label'>
<span id='folder'>Classes (extension)</span>
| <span id='categories'><a href='./../Browse.html#Libraries'>Libraries</a>&#8201;&gt;&#8201;<a href='./../Browse.html#Libraries>Modality'>Modality</a></span>
</div><h1>MIDIExplorer<span id='superclasses'> : <a href="../Classes/Object.html">Object</a></span>
<div class='extension-indicator-ctr' title='This help file originates from a third-party quark or plugin for SuperCollider.'><img class='extension-indicator-icon' alt='Extension' src='./../images/plugin.png'><span class='extension-indicator-text'>Extension</span></div></h1>
<div id='summary'>Explore a MIDI device</div>
</div>
<div class='subheader'>
<div id='filename'>Source: <a href='file:///Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/Modality-toolkit/Modality/Classes/MIDI/MIDIExplorer.sc' title='/Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/Modality-toolkit/Modality/Classes/MIDI/MIDIExplorer.sc'>MIDIExplorer.sc</a></div><div id='related'>See also: <a href="./../Overviews/Modality.html">Modality</a>, <a href="./../Classes/MKtl.html">MKtl</a>, <a href="./../Classes/MIDIMKtlDevice.html">MIDIMKtlDevice</a>, <a href="./../Reference/MKtl_description_files.html">MKtl description files</a></div>
</div>
<h2><a class='anchor' name='description'>Description</a></h2>
<p>The functionality of <a href="./../Classes/MKtl.html">MKtl</a> relies on descriptions of the used devices. For some Controllers, and while many descriptions are already available, your device may not yet be among them. With MIDIExplorer, it is easy to create such a file for a MIDI device. For more info on how to use it, see <a href="./../Tutorials/How_to_create_a_description_file.html">How to create a description file</a>.<textarea class='editor'>MKtl.find(\midi);
// to pick a specific device you want to explore:
MIDIExplorer.postSrcInfo;
// and enter its uid here
MIDIExplorer.start( -476939297 );
// or to get the uid of e.g. the first connected MIDI device:
MIDIClient.sources[0].uid.postln;
MIDIExplorer.start(MIDIClient.sources[0].uid);
// if only a single device is connected, you can also just do
MIDIExplorer.start;
// check we are listening to the intended device only:
MIDIExplorer.observedSrcID;
MIDIExplorer.deviceName;
// now play with all elements to generate info for the device.
// To get info for every incoming control, do:
MIDIExplorer.verbose = true;
// to post only an overview/count when a new one comes in:
MIDIExplorer.verbose = false;
// if no more new controllers are found, do:
MIDIExplorer.openDoc;
MIDIExplorer.compile;
// and save here:
MKtlDesc.openFolder;</textarea>
<h2><a class='anchor' name='classmethods'>Class Methods</a></h2>
<h3 class='method-code'><span class='method-prefix'>MIDIExplorer.</span><a class='method-name' name='*postSrcInfo' href='./../Overviews/Methods.html#postSrcInfo'>postSrcInfo</a></h3>
<div class='method'>
<p>post info on currently available sources, mainly to access uid number.</div><h3 class='method-code'><span class='method-prefix'>MIDIExplorer.</span><a class='method-name' name='*start' href='./../Overviews/Methods.html#start'>start</a>(<span class='argstr'>srcID</span>)</h3>
<div class='method'>
<p>start exploration, i.e. collecting statistics on all incoming MIDI messages.<h4>Arguments:</h4>
<table class='arguments'>
<tr><td class='argumentname'>srcID<td class='argumentdesc'>
<p>an optional source ID - if not nil, only messages from the identified source will be collected.</table></div><h3 class='method-code'><span class='method-prefix'>MIDIExplorer.</span><a class='method-name' name='*postObs' href='./../Overviews/Methods.html#postObs'>postObs</a>(<span class='argstr'>post: false</span>)</h3>
<div class='method'>
<p>post info on the current state of observation</div><h3 class='method-code'><span class='method-prefix'>MIDIExplorer.</span><a class='method-name' name='*stop' href='./../Overviews/Methods.html#stop'>stop</a>(<span class='argstr'>srcID</span>)</h3>
<div class='method'>
<p>stop exploration.</div><h3 class='method-code'><span class='method-prefix'>MIDIExplorer.</span><a class='method-name' name='*deviceName' href='./../Overviews/Methods.html#deviceName'>deviceName</a></h3>
<div class='method'>
<p>find the deviceName for the observed srcID</div><h3 class='method-code'><span class='method-prefix'>MIDIExplorer.</span><a class='method-name' name='*instructions' href='./../Overviews/Methods.html#instructions'>instructions</a></h3>
<div class='method'>
<p>return instructions string to put on top of desc file.
<p>MIDIExplorer.instructions</div><h3 class='method-code'><span class='method-prefix'>MIDIExplorer.</span><a class='method-name' name='*compile' href='./../Overviews/Methods.html#compile'>compile</a></h3>
<div class='method'>
<p>compile the discovered elements as an evaluable string, which can be saved as a description file, and then read as a description dict.<h4>Arguments:</h4>
<table class='arguments'>
<tr><td class='argumentname'>(includeSpecs)<td class='argumentdesc'></table><h4>Returns:</h4>
<div class='returnvalue'>
<p>a String containing a a dict which works as a description, and contains raw list of elements</div></div><h3 class='method-code'><span class='method-prefix'>MIDIExplorer.</span><a class='method-name' name='*openDoc' href='./../Overviews/Methods.html#openDoc'>openDoc</a>(<span class='argstr'>name</span>)</h3>
<div class='method'>
<p>opens a new document containing a description string made with MIDIExplorer.compile.</div><h3 class='method-code'><span class='method-prefix'>MIDIExplorer.</span><a class='method-name' name='*compileDesc' href='./../Overviews/Methods.html#compileDesc'>compileDesc</a>(<span class='argstr'>includeSpecs: false</span>)</h3>
<div class='method'>
<p>compile the elementsDesc from data collected by MIDIExplorer.</div><h3 class='method-code'><span class='method-prefix'>MIDIExplorer.</span><a class='method-name' name='*verbose' href='./../Overviews/Methods.html#verbose'>verbose</a></h3>
<h3 class='method-code'><span class='method-prefix'>MIDIExplorer.</span><a class='method-name' name='*verbose' href='./../Overviews/Methods.html#verbose'>verbose</a> = value</h3>
<div class='method'>
<p>get and set flag whether to post info</div><h3 class='method-code'><span class='method-prefix'>MIDIExplorer.</span><a class='method-name' name='*trace' href='./../Overviews/Methods.html#trace'>trace</a>(<span class='argstr'>flag: true</span>)</h3>
<div class='method'>
<p>set verbose flag, default flag is true</div><h3 class='method-code'><span class='method-prefix'>MIDIExplorer.</span><a class='method-name' name='*allMsgTypes' href='./../Overviews/Methods.html#allMsgTypes'>allMsgTypes</a></h3>
<div class='method'>
<p>list of midi message types to catch</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><div class='doclink'>helpfile source: <a href='file:///Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/Modality-toolkit/Modality/HelpSource/Classes/MIDIExplorer.schelp'>/Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/Modality-toolkit/Modality/HelpSource/Classes/MIDIExplorer.schelp</a><br>link::Classes/MIDIExplorer::<br></div></div><script src='./../editor.js' type='text/javascript'></script>
</body></html>