diff --git a/README.md b/README.md index 4785989..14b2bf3 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ [![publish status](https://github.com/yvesgurcan/web-midi-player/workflows/Publish/badge.svg)](https://github.com/yvesgurcan/web-midi-player/actions?query=workflow%3APublish) [![](https://data.jsdelivr.com/v1/package/npm/web-midi-player/badge?style=rounded)](https://www.jsdelivr.com/package/npm/web-midi-player) -Event-driven JavaScript library to enable MIDI playback in the browser. +Event-driven JavaScript library that enables MIDI playback in the browser. - Check out examples [with React](https://midi.yvesgurcan.com/example/react/) and [with vanilla JavaScript](https://midi.yvesgurcan.com/example/javascript/). - See the [NPM package](https://npmjs.com/package/web-midi-player) and the [GPR package](https://github.com/yvesgurcan/web-midi-player/packages/92236). diff --git a/doc/index.html b/doc/index.html index d7dcebc..5abce4d 100644 --- a/doc/index.html +++ b/doc/index.html @@ -8,7 +8,7 @@ Documentation - + @@ -64,6 +64,14 @@
#stop
+
+ #getVolume
+
+
+
+ #setVolume
+
+
#emitEvent
@@ -354,6 +362,20 @@ 80
)
+
+
+ getVolume()
+
+
+ Gets the current volume of the playback.
+ + + + + + + + + + + + + + + + +number
+ :
+ The current volume.
+
+
+
+
+
+
+
+
+ const volume = midiPlayer.getVolume();
+
+
+
+
+
+
+
+
+
+
+
+ setVolume(input)
+
+
+ Sets the current volume of the playback.
+ + + + + + + + + + + +parameter | +type | +description | + + +
---|---|---|
input |
+ + object + + | ++ |
input.volume | ++ number + + | +The new value for the volume (also known as gain). Typically, a whole number between 0 and 100 but can actually be negative, greater, or even a decimal number. + | +
midiPlayer.setVolume({ volume: 80 });
+
+
+
+
+
+
+
+
+
+