Preparing search index...
The search index is not available
browser-hooks
browser-hooks
useWebMIDI
Function useWebMIDI
useWebMIDI
()
:
{
addMessageListener
:
(
input
:
MIDIInput
,
callback
:
(
event
:
MIDIMessageEvent
)
=>
void
,
)
=>
()
=>
void
;
getInputById
:
(
id
:
string
)
=>
undefined
|
MIDIInput
;
getInputs
:
()
=>
MIDIInput
[]
;
getOutputById
:
(
id
:
string
)
=>
undefined
|
MIDIOutput
;
getOutputs
:
()
=>
MIDIOutput
[]
;
parseMIDIMessage
:
(
data
:
Uint8Array
,
)
=>
{
channel
?:
number
;
controller
?:
number
;
messageType
:
string
;
note
?:
number
;
program
?:
number
;
value
?:
number
;
velocity
?:
number
;
}
;
requestAccess
:
(
options
?:
MIDIConnectionOptions
)
=>
Promise
<
MIDIAccess
>
;
sendControlChange
:
(
output
:
MIDIOutput
,
controller
:
number
,
value
:
number
,
channel
?:
number
,
timestamp
?:
number
,
)
=>
void
;
sendMessage
:
(
output
:
MIDIOutput
,
message
:
number
[]
,
timestamp
?:
number
,
)
=>
void
;
sendNoteOff
:
(
output
:
MIDIOutput
,
note
:
number
,
velocity
?:
number
,
channel
?:
number
,
timestamp
?:
number
,
)
=>
void
;
sendNoteOn
:
(
output
:
MIDIOutput
,
note
:
number
,
velocity
?:
number
,
channel
?:
number
,
timestamp
?:
number
,
)
=>
void
;
sendProgramChange
:
(
output
:
MIDIOutput
,
program
:
number
,
channel
?:
number
,
timestamp
?:
number
,
)
=>
void
;
get
state
()
:
WebMIDIState
;
subscribe
(
callback
:
(
state
:
WebMIDIState
)
=>
void
)
:
()
=>
boolean
;
}
Returns
{
addMessageListener
:
(
input
:
MIDIInput
,
callback
:
(
event
:
MIDIMessageEvent
)
=>
void
,
)
=>
()
=>
void
;
getInputById
:
(
id
:
string
)
=>
undefined
|
MIDIInput
;
getInputs
:
()
=>
MIDIInput
[]
;
getOutputById
:
(
id
:
string
)
=>
undefined
|
MIDIOutput
;
getOutputs
:
()
=>
MIDIOutput
[]
;
parseMIDIMessage
:
(
data
:
Uint8Array
,
)
=>
{
channel
?:
number
;
controller
?:
number
;
messageType
:
string
;
note
?:
number
;
program
?:
number
;
value
?:
number
;
velocity
?:
number
;
}
;
requestAccess
:
(
options
?:
MIDIConnectionOptions
)
=>
Promise
<
MIDIAccess
>
;
sendControlChange
:
(
output
:
MIDIOutput
,
controller
:
number
,
value
:
number
,
channel
?:
number
,
timestamp
?:
number
,
)
=>
void
;
sendMessage
:
(
output
:
MIDIOutput
,
message
:
number
[]
,
timestamp
?:
number
,
)
=>
void
;
sendNoteOff
:
(
output
:
MIDIOutput
,
note
:
number
,
velocity
?:
number
,
channel
?:
number
,
timestamp
?:
number
,
)
=>
void
;
sendNoteOn
:
(
output
:
MIDIOutput
,
note
:
number
,
velocity
?:
number
,
channel
?:
number
,
timestamp
?:
number
,
)
=>
void
;
sendProgramChange
:
(
output
:
MIDIOutput
,
program
:
number
,
channel
?:
number
,
timestamp
?:
number
,
)
=>
void
;
get
state
()
:
WebMIDIState
;
subscribe
(
callback
:
(
state
:
WebMIDIState
)
=>
void
)
:
()
=>
boolean
;
}
addMessageListener
:
(
input
:
MIDIInput
,
callback
:
(
event
:
MIDIMessageEvent
)
=>
void
)
=>
()
=>
void
getInputById
:
(
id
:
string
)
=>
undefined
|
MIDIInput
getInputs
:
()
=>
MIDIInput
[]
getOutputById
:
(
id
:
string
)
=>
undefined
|
MIDIOutput
getOutputs
:
()
=>
MIDIOutput
[]
parseMIDIMessage
:
(
data
:
Uint8Array
,
)
=>
{
channel
?:
number
;
controller
?:
number
;
messageType
:
string
;
note
?:
number
;
program
?:
number
;
value
?:
number
;
velocity
?:
number
;
}
requestAccess
:
(
options
?:
MIDIConnectionOptions
)
=>
Promise
<
MIDIAccess
>
sendControlChange
:
(
output
:
MIDIOutput
,
controller
:
number
,
value
:
number
,
channel
?:
number
,
timestamp
?:
number
,
)
=>
void
sendMessage
:
(
output
:
MIDIOutput
,
message
:
number
[]
,
timestamp
?:
number
)
=>
void
sendNoteOff
:
(
output
:
MIDIOutput
,
note
:
number
,
velocity
?:
number
,
channel
?:
number
,
timestamp
?:
number
,
)
=>
void
sendNoteOn
:
(
output
:
MIDIOutput
,
note
:
number
,
velocity
?:
number
,
channel
?:
number
,
timestamp
?:
number
,
)
=>
void
sendProgramChange
:
(
output
:
MIDIOutput
,
program
:
number
,
channel
?:
number
,
timestamp
?:
number
,
)
=>
void
get
state
():
WebMIDIState
subscribe
:
function
subscribe
(
callback
:
(
state
:
WebMIDIState
)
=>
void
)
:
()
=>
boolean
Parameters
callback
:
(
state
:
WebMIDIState
)
=>
void
Returns
()
=>
boolean
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
browser-hooks
Loading...