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