Classes (extension) | Libraries>Modality

# MIDIExplorer : Object
Extension

Explore a MIDI device
Source: MIDIExplorer.sc
See also: Modality, MKtl, MIDIMKtlDevice, MKtl description files

## Description

The functionality of MKtl 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 How to create a description file.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;

## Class Methods

### MIDIExplorer.postSrcInfo

post info on currently available sources, mainly to access uid number.

### MIDIExplorer.start(srcID)

start exploration, i.e. collecting statistics on all incoming MIDI messages.

#### Arguments:

srcID | an optional source ID - if not nil, only messages from the identified source will be collected.

### MIDIExplorer.postObs(post: false)

post info on the current state of observation

### MIDIExplorer.stop(srcID)

stop exploration.

### MIDIExplorer.deviceName

find the deviceName for the observed srcID

### MIDIExplorer.instructions

return instructions string to put on top of desc file.

MIDIExplorer.instructions

### MIDIExplorer.compile

compile the discovered elements as an evaluable string, which can be saved as a description file, and then read as a description dict.

#### Arguments:

(includeSpecs) |

#### Returns:

a String containing a a dict which works as a description, and contains raw list of elements

### MIDIExplorer.openDoc(name)

opens a new document containing a description string made with MIDIExplorer.compile.

### MIDIExplorer.compileDesc(includeSpecs: false)

compile the elementsDesc from data collected by MIDIExplorer.

### MIDIExplorer.verbose

### MIDIExplorer.verbose = value

get and set flag whether to post info

### MIDIExplorer.trace(flag: true)

set verbose flag, default flag is true

### MIDIExplorer.allMsgTypes

list of midi message types to catch

### Inherited class methods

## Instance Methods

### Inherited instance methods

helpfile source: /Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/Modality-toolkit/Modality/HelpSource/Classes/MIDIExplorer.schelp
link::Classes/MIDIExplorer::