reformat main, apply examples

This commit is contained in:
onyx-and-iris 2023-08-09 17:43:29 +01:00
parent c9c2b906c5
commit 2a191dccb8
2 changed files with 17 additions and 35 deletions

View File

@ -40,21 +40,19 @@ require "voicemeeter"
class Main class Main
def run def run
Voicemeeter::Remote Voicemeeter::Remote.new(:banana).run do |vm|
.new(:banana) vm.strip[0].label = "podmic"
.run do |vm| vm.strip[0].mute = true
vm.strip[0].label = "podmic" puts "strip 0 #{vm.strip[0].label} mute was set to #{vm.strip[0].mute}"
vm.strip[0].mute = true
puts "strip 0 #{vm.strip[0].label} mute was set to #{vm.strip[0].mute}"
vm.bus[3].gain = -6.3 vm.bus[3].gain = -6.3
vm.bus[4].eq.on = true vm.bus[4].eq.on = true
info = [ info = [
"bus 3 gain has been set to #{vm.bus[3].gain}", "bus 3 gain has been set to #{vm.bus[3].gain}",
"bus 4 eq has been set to #{vm.bus[4].eq.on}" "bus 4 eq has been set to #{vm.bus[4].eq.on}"
] ]
puts info puts info
end end
end end
end end
@ -612,24 +610,10 @@ get may return nil if no value for requested key in midi cache
```ruby ```ruby
vm.apply( vm.apply(
{ {
"strip-0" => { "strip-0" => {mute: true, gain: 3.2, A1: true},
mute: true, "bus-3" => {gain: -3.2, eq: {on: true}},
gain: 3.2, "button-39" => {stateonly: true},
A1: true "vban-outstream-3" => {on: true, bit: 24}
},
"bus-3" => {
gain: -3.2,
eq: {
on: true
}
},
"button-39" => {
stateonly: true
},
"vban-outstream-3" => {
on: true,
bit: 24
}
} }
) )
``` ```

View File

@ -2,9 +2,7 @@ require "voicemeeter"
class Main class Main
def run def run
Voicemeeter::Remote Voicemeeter::Remote.new(:banana).run do |vm|
.new(:banana)
.run do |vm|
vm.strip[0].label = "podmic" vm.strip[0].label = "podmic"
vm.strip[0].mute = true vm.strip[0].mute = true
puts "strip 0 #{vm.strip[0].label} mute was set to #{vm.strip[0].mute}" puts "strip 0 #{vm.strip[0].label} mute was set to #{vm.strip[0].mute}"