mirror of
https://github.com/onyx-and-iris/voicemeeter-rb.git
synced 2024-11-22 09:50:49 +00:00
update example in readme
This commit is contained in:
parent
cccc348378
commit
07c1c20aec
29
README.md
29
README.md
@ -1,4 +1,4 @@
|
|||||||
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/onyx-and-iris/voicemeeter-rb/blob/dev/LICENSE)
|
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)][license]
|
||||||
[![Ruby Code Style](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://github.com/standardrb/standard)
|
[![Ruby Code Style](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://github.com/standardrb/standard)
|
||||||
|
|
||||||
# Ruby Wrapper for Voicemeeter API
|
# Ruby Wrapper for Voicemeeter API
|
||||||
@ -42,25 +42,24 @@ Login and logout are handled for you in this scenario.
|
|||||||
```ruby
|
```ruby
|
||||||
require "voicemeeter"
|
require "voicemeeter"
|
||||||
|
|
||||||
vm = Voicemeeter.remote(:banana)
|
Voicemeeter::Remote
|
||||||
|
.new(:banana)
|
||||||
|
.run do |vm|
|
||||||
|
# mute the leftmost strip
|
||||||
|
vm.strip[0].mute = true
|
||||||
|
puts vm.strip[0].mute
|
||||||
|
|
||||||
# vm.run accepts a block
|
# disable eq for second from left bus
|
||||||
vm.run do
|
vm.bus[1].eq.on = false
|
||||||
# mute the leftmost strip
|
puts vm.bus[1].eq.on
|
||||||
vm.strip[0].mute = true
|
end
|
||||||
puts vm.strip[0].mute
|
|
||||||
|
|
||||||
# disable eq for second from left bus
|
|
||||||
vm.bus[1].eq = false
|
|
||||||
puts vm.bus[1].eq
|
|
||||||
end
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Otherwise you must remember to call `vm.login` `vm.logout` at the start/end of your code.
|
Otherwise you must remember to call `vm.login` `vm.logout` at the start/end of your code.
|
||||||
|
|
||||||
## `kind_id`
|
## `KIND_ID`
|
||||||
|
|
||||||
Pass the kind of Voicemeeter as an argument. kind_id may be:
|
Pass the kind of Voicemeeter as an argument. KIND_ID may be:
|
||||||
|
|
||||||
- `:basic`
|
- `:basic`
|
||||||
- `:banana`
|
- `:banana`
|
||||||
@ -557,3 +556,5 @@ Bundle exec rspec --tag 'higher'
|
|||||||
### Official Documentation
|
### Official Documentation
|
||||||
|
|
||||||
- [Voicemeeter Remote C API](https://github.com/onyx-and-iris/Voicemeeter-SDK/blob/main/VoicemeeterRemoteAPI.pdf)
|
- [Voicemeeter Remote C API](https://github.com/onyx-and-iris/Voicemeeter-SDK/blob/main/VoicemeeterRemoteAPI.pdf)
|
||||||
|
|
||||||
|
[license]: https://github.com/onyx-and-iris/voicemeeter-rb/blob/dev/LICENSE
|
||||||
|
Loading…
Reference in New Issue
Block a user