File: MIDIClient.schelp

package info (click to toggle)
supercollider 1%3A3.10.0%2Brepack-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 45,496 kB
  • sloc: cpp: 283,513; lisp: 74,040; ansic: 72,252; sh: 23,016; python: 7,175; makefile: 1,087; perl: 766; java: 677; yacc: 314; lex: 175; ruby: 136; objc: 65; xml: 15
file content (87 lines) | stat: -rw-r--r-- 2,817 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
TITLE:: MIDIClient
summary:: Basic access to MIDI on your computer
categories:: External Control>MIDI
related:: Classes/MIDIIn, Classes/MIDIOut, Classes/MIDIFunc, Classes/MIDIdef, Guides/MIDI, Guides/UsingMIDI

DESCRIPTION::
MIDIClient is the core class that provides access to the MIDI subsystem on your computer.

See the link::Guides/UsingMIDI:: helpfile for practical considerations and techniques for using MIDI in SC.

CLASSMETHODS::

private:: prInit, prDisposeClient, prInitClient, prList


METHOD:: init
Initializes the MIDIClient, checks which available MIDI sources and destinations there are, and opens as many connections as desired.

ARGUMENT:: inports
the number of MIDI input connections to open; if code::nil:: then opens as many inports as there are MIDI sources.

ARGUMENT:: outports
the number of MIDI output connections to open; if code::nil:: then opens as many outports as there are MIDI destinations.

ARGUMENT:: verbose
A flag whether or not to post the MIDI sources and destinations that were found. Default is true.


METHOD:: initialized
A flag that tells whether of not the MIDIClient has been initialized.



METHOD:: disposeClient
Cleans up the MIDIClient. After using this method, you will have to reinitialize the MIDIClient before you can use MIDI again.



METHOD:: list
Created the list of available sources and destinations.


METHOD:: sources
The list of available MIDI sources, including SuperCollider's own sources.

returns:: A code::List:: of code::MIDIEndPoints::

METHOD:: externalSources
The list of available MIDI sources, excluding SuperCollider's own sources. Only on Linux the list of code::sources:: and code::externalSources:: differs.

returns:: A code::List:: of code::MIDIEndPoints::

METHOD:: destinations
The list of available MIDI destinations, including SuperCollider's own destinations.

returns:: A code::List:: of code::MIDIEndPoints::

METHOD:: externalDestinations
The list of available MIDI destinations, excluding SuperCollider's own destinations. Only on Linux the list of code::destinations:: and code::externalDestinations:: differs.

returns:: A code::List:: of code::MIDIEndPoints::

METHOD:: restart
Restart the MIDIClient.


METHOD:: myinports
The number of input ports that SuperCollider created. This is mainly useful to know on the Linux platform.


METHOD:: myoutports
The number of output ports that SuperCollider created. This is mainly useful to know on the Linux platform.

METHOD:: getClientID
Linux only. This gets the client ID by which the MIDIClient is defined in the ALSA subsystem. It can be used to identify whether a port is belonging to this client or another one.

On non-linux systems, it posts a warning and returns nil.

EXAMPLES::

code::
MIDIClient.init;

MIDIClient.disposeClient;

MIDIClient.init( verbose: false );
::