beta
cables is under heavy development.
There might be one or another bug, please let us know about it!
Ops.WebAudio.KeyPiano

KeyPiano
op id:9f7d2411-ed87-45be-95a7-e6759d51582d
Generates notes based on key presses

summary (oneliner)

Can be used to generate notes based on keyboard presses together with the KeyLearn-op. For every note the keyboard key can be defined in the corresponding KeyLearn-op, so e.g. you would add a KeyLearn-op, press its learn-button to store e.g. the key code for the key c and then you need to connect its on press-port with the c note on-port of KeyPiano. Please note that key-presses are only detected in the preview window by default (click inside to set the focus).
Currently only one key can be played simultaneously.

The Note On / Note Off can be connected to a Ops.Devices.Keyboard.KeyPressLearn op.

doc

issues

youtube id

collections

related ops

Inputs

c note on (Function)

c note off (Function)

cis note on (Function)

cis note off (Function)

d note on (Function)

d note off (Function)

dis note on (Function)

dis note off (Function)

e note on (Function)

e note off (Function)

f note on (Function)

f note off (Function)

fis note on (Function)

fis note off (Function)

g note on (Function)

g note off (Function)

gis note ons (Function)

gis note off (Function)

a note on (Function)

a note off (Function)

ais note on (Function)

ais note off (Function)

b note on (Function)

b note off (Function)

octave (Number)

The currently active octave – 1 is the lowest, 7 the highest. [1-7]


Outputs

frequency (Number)

The note frequency of the last pressed / released key in Hz, e.g. 440 for A4 (middle A). This port can be connected to the frequency-port of an oscillator-op e.g..


is pressed (Number)

If one of the keys is currently pressed: 1.0, if no key is pressed: 0.0. Can e.g. be connected to a Gain node, to control the volume of a Web Audio op.


Credits

Caught a mistake or want to contribute to the documentation?


Edit this documentcancel save

Examples using KeyPiano

Public Patches using KeyPiano