/usr/share/SuperCollider/HelpSource/Classes/PhidSlot.schelp is in supercollider-common 1:3.6.3~repack-5.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 | class:: PhidSlot
summary:: pattern that polls values from a human device interface, based on an indexed slot
related:: Classes/Phid, Classes/PhidKey, Classes/GeneralHID
categories:: Streams-Patterns-Events>Patterns>User Input
ClassMethods::
method::new
argument::slot
index pointing to a slot like a button or an axis.
argument::type
index pointing to the type of slot (see link::Classes/GeneralHID:: for a description of this).
argument::device
a link::Classes/GeneralHIDDevice::, or an element from the code::GeneralHID.deviceList::, which will then be opened by the pattern.
argument::repeats
number of values to return.
Examples::
code::
// build the device list and start the event loop:
GeneralHID.buildDeviceList;
GeneralHID.startEventLoop;
// find an Impact game device and open it:
a = GeneralHID.open( GeneralHID.findBy( 1973 ) );
// inspect the capabilities of this device:
a.caps;
// boot the server
s.boot;
// simple example:
(
p = Pbind(
\degree, ( PhidSlot( 0, 3, a, inf )*12 ).round(1),
\dur, 0.25
).play;
)
p.stop;
// more complex example, showing multichannel expansion and sequences of slots:
(
p = Pbind(
\degree, ( PhidSlot( Pseq([[0,1],2,5],inf), 3, a, inf )*12 ).round(1),
\dur, 0.25
).play;
)
// the type argument can also be replaced by an Array or pattern.
p.stop;
// clean up: close the device and stop the eventloop
a.close;
GeneralHID.stopEventLoop;
::
|