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
19
README.md
19
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 Wrapper for Voicemeeter API
|
||||
@ -42,25 +42,24 @@ Login and logout are handled for you in this scenario.
|
||||
```ruby
|
||||
require "voicemeeter"
|
||||
|
||||
vm = Voicemeeter.remote(:banana)
|
||||
|
||||
# vm.run accepts a block
|
||||
vm.run do
|
||||
Voicemeeter::Remote
|
||||
.new(:banana)
|
||||
.run do |vm|
|
||||
# mute the leftmost strip
|
||||
vm.strip[0].mute = true
|
||||
puts vm.strip[0].mute
|
||||
|
||||
# disable eq for second from left bus
|
||||
vm.bus[1].eq = false
|
||||
puts vm.bus[1].eq
|
||||
vm.bus[1].eq.on = false
|
||||
puts vm.bus[1].eq.on
|
||||
end
|
||||
```
|
||||
|
||||
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`
|
||||
- `:banana`
|
||||
@ -557,3 +556,5 @@ Bundle exec rspec --tag 'higher'
|
||||
### Official Documentation
|
||||
|
||||
- [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