NanoKontrol2

class supriya.tools.miditools.NanoKontrol2[source]

A Korg NanoKontrol2 midi device.

>>> nano_kontrol_2 = miditools.NanoKontrol2()
>>> nano_kontrol_2
NanoKontrol2()
>>> len(nano_kontrol_2)
51
>>> for control_name in nano_kontrol_2:
...     control_name
...
'fader_1'
'fader_2'
'fader_3'
'fader_4'
'fader_5'
'fader_6'
'fader_7'
'fader_8'
'knob_1'
'knob_2'
'knob_3'
'knob_4'
'knob_5'
'knob_6'
'knob_7'
'knob_8'
'm_button_1'
'm_button_2'
'm_button_3'
'm_button_4'
'm_button_5'
'm_button_6'
'm_button_7'
'm_button_8'
'r_button_1'
'r_button_2'
'r_button_3'
'r_button_4'
'r_button_5'
'r_button_6'
'r_button_7'
'r_button_8'
's_button_1'
's_button_2'
's_button_3'
's_button_4'
's_button_5'
's_button_6'
's_button_7'
's_button_8'
'transport_cycle_button'
'transport_fastforward_button'
'transport_next_marker_button'
'transport_next_track_button'
'transport_play_button'
'transport_previous_marker_button'
'transport_previous_track_button'
'transport_record_button'
'transport_rewind_button'
'transport_set_marker_button'
'transport_stop_button'
>>> nano_kontrol_2.fader_1
MidiFader(
    controller_number=0
    )
>>> nano_kontrol_2['fader_1']
MidiFader(
    controller_number=0
    )

Lineage

digraph InheritanceGraph { graph [background=transparent, bgcolor=transparent, color=lightslategrey, fontname=Arial, outputorder=edgesfirst, overlap=prism, penwidth=2, rankdir=LR, root="__builtin__.object", splines=spline, style="dotted, rounded", truecolor=true]; node [colorscheme=pastel19, fontname=Arial, fontsize=12, penwidth=2, style="filled, rounded"]; edge [color=lightsteelblue2, penwidth=2]; subgraph cluster_builtins { graph [label=builtins]; "builtins.object" [color=1, group=0, label=object, shape=box]; } subgraph cluster_miditools { graph [label=miditools]; "supriya.tools.miditools.MidiDevice.MidiDevice" [color=2, group=1, label=MidiDevice, shape=box]; "supriya.tools.miditools.NanoKontrol2.NanoKontrol2" [color=black, fontcolor=white, group=1, label=<<B>NanoKontrol2</B>>, shape=box, style="filled, rounded"]; "supriya.tools.miditools.MidiDevice.MidiDevice" -> "supriya.tools.miditools.NanoKontrol2.NanoKontrol2"; } subgraph cluster_systemtools { graph [label=systemtools]; "supriya.tools.systemtools.SupriyaObject.AbstractBase" [color=3, group=2, label=AbstractBase, shape=box]; "supriya.tools.systemtools.SupriyaObject.SupriyaObject" [color=3, group=2, label=SupriyaObject, shape=box]; "supriya.tools.systemtools.SupriyaObject.AbstractBase" -> "supriya.tools.systemtools.SupriyaObject.SupriyaObject"; } "builtins.object" -> "supriya.tools.systemtools.SupriyaObject.AbstractBase"; "supriya.tools.systemtools.SupriyaObject.SupriyaObject" -> "supriya.tools.miditools.MidiDevice.MidiDevice"; }

Bases

Attribute summary

autobind(synth)
close_port()
list_ports()
midi_controllers
open_port([port])
__eq__(expr) Is true when ID of expr equals ID of Supriya object.
__format__([format_specification]) Formats Supriya object.
__getattr__(name)
__getitem__(item)
__hash__() Hashes Supriya object.
__iter__()
__len__()
__repr__() Gets interpreter representation of Supriya object.

Read-only properties

(MidiDevice).midi_controllers

Methods

(MidiDevice).autobind(synth)
(MidiDevice).close_port()
(MidiDevice).list_ports()
(MidiDevice).open_port(port=None)

Special methods

(SupriyaObject).__eq__(expr)

Is true when ID of expr equals ID of Supriya object. Otherwise false.

Returns boolean.

(SupriyaObject).__format__(format_specification='')

Formats Supriya object.

Set format_specification to ‘’ or ‘storage’. Interprets ‘’ equal to ‘storage’.

Returns string.

(MidiDevice).__getattr__(name)
(MidiDevice).__getitem__(item)
(SupriyaObject).__hash__()

Hashes Supriya object.

Required to be explicitely re-defined on Python 3 if __eq__ changes.

Returns integer.

(MidiDevice).__iter__()
(MidiDevice).__len__()
(SupriyaObject).__repr__()

Gets interpreter representation of Supriya object.

Returns string.