An HOC that gives functionality to a child UI element
play
(Boolean) Play note. Useful when a note is a controlled component.name
(String): Note names from octave 1 to octave 7 Full list of supported notes.instrumentName
(String): Instrument name from the MusyngKite soundfont. Full list of supported instruments. This is optional if the is a child of anonNoteLoaded
(Function) A callback fired when note is loaded ( from network or cache ).onStopPlayingNote
(Function) A callback fired when a note is played.onStartPlayingNote
(Function) A callback fired when note stops being played.interactive
(Boolean) Determines if a component should listen to click/tap events.fadeOutDuration
(Number) Fadeout time in milliseconds of a note after it is released. Default is 600 ms.gain
(Number) Sound gain. Defaults to 1.loader
(ReactElement) A loader to render while note is being loaded.children
(ReactElement) A UI component that represents the DOM or native environment.
ReactDOM.render(
<Instrument name="acoustic_grand_piano">
<Note name="A3">
<MyCustomNoteUI />
</Note>
</Instrument>,
rootEl
)
// OR
ReactDOM.render(
<Note name="A3" instrumentName="acoustic_grand_piano">
<MyCustomNoteUI />
</Note>,
rootEl
)
A wrapper component to control multiple notes.
name
(String): Instrument name from the MusyngKite soundfont. Full list of supported instruments.loader
(ReactElement) A loader to render while instrument is being loaded.
ReactDOM.render(
<Instrument name="acoustic_grand_piano">
<Note name="A3">
<MyCustomNoteUI />
</Note>
</Instrument>,
rootEl
)
A component that renders a midiURL as interactive, playable notes.
play
(Boolean) Play midi track. Useful when Orchestra is a controlled component.midiURL
(String): Note names from octave 1 to octave 7 Full list of supported notes.selectedTracks
([Integer]): tracks of midi file to play.onMidiLoaded
(Function) A callback fired when midi file is loaded ( from network or cache ) and parsed.onInstrumentsReady
(Function) A callback fired when all the notes in the selected midi tracks are loaded ( from network or cache ).onNotePlayed
(Function) A callback fired when a note is played either by the user clicking it or by being controlled by the Orchestra componentrenderNote
(Function(instrumentName, noteName)) A callback fired for each note that is being rendered by the orchestra. Should return a valid ReactElement. released. Default is 600 ms.loader
(ReactElement) A loader to render while Orchestra is being loaded.
Check examples directory.
A component that renders notes based on a given rule (scale for now, chords and midiURL in the roadmap).
type
(String): Generator type.scale
.scaleName
(String): Scale name, full list available herenoteName
(String) First note name to generated the scale based on.instrumentName
(String): Instrument name from the MusyngKite soundfont. Full list of supported instruments. This is optional if the is a child of anstartOctave
(Integer) Starting octave for note generation.octaveCount
(Integer) Number of octaves to render.renderNote
(Function(instrumentName, noteName)) A callback fired for each note that is being rendered by the NoteFactory. Should return a valid ReactElement. released. Default is 600 ms.
Check examples directory.
A micro helper component that listens to keyboard events to help controlling note state with keyboard.
keyName
(String): Keyboard keys and shortcuts to listen to. Wrapper to react-keymasteronKeyDown
(Function(keyName)) A callback fired whenkeyName
is pressed on the keyboardonKeyUp
(Function(keyName)) A callback fired whenkeyName
stops being pressed on the keyboard
Check examples directory.