voicemeeter 0.0.1 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +28 -0
- data/README.md +13 -11
- data/lib/voicemeeter/base.rb +2 -2
- data/lib/voicemeeter/bus.rb +24 -29
- data/lib/voicemeeter/command.rb +3 -5
- data/lib/voicemeeter/event.rb +14 -12
- data/lib/voicemeeter/fx.rb +6 -8
- data/lib/voicemeeter/iremote.rb +3 -4
- data/lib/voicemeeter/meta.rb +22 -22
- data/lib/voicemeeter/mixins.rb +20 -29
- data/lib/voicemeeter/option.rb +10 -15
- data/lib/voicemeeter/patch.rb +3 -2
- data/lib/voicemeeter/recorder.rb +7 -8
- data/lib/voicemeeter/remote.rb +3 -3
- data/lib/voicemeeter/strip.rb +29 -38
- data/lib/voicemeeter/vban.rb +6 -14
- data/lib/voicemeeter/version.rb +2 -2
- data/lib/voicemeeter/worker.rb +4 -4
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0f55435d4652f6d91df3f6255a410ab906989c2f996159e9f3dca99af4a5e56d
|
4
|
+
data.tar.gz: 9b65ecc40b287b9d6dc65a9becfb89cb5f210b9c34aa2b18408cf2741045ada0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6beffc9ce32f955be64359cbed4203dcef40ba8eac7a2a04770f1a74debd34123ac309e6688edf859f2a5e4b2b2df13c3a2b0a1ab97bbf9b2f0b4a1397b39d83
|
7
|
+
data.tar.gz: 2d72c6b775c0dcf87bba24e98a189f07b7e3f71a661cd278a860f428a0895436651003f7a76fe6159dad73f338a3ec94a9469b36d6c67dc04eb8ba89fbeb02e7
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
# Changelog
|
2
|
+
|
3
|
+
All notable changes to this project will be documented in this file.
|
4
|
+
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
7
|
+
|
8
|
+
Before any major/minor/patch is released all unit tests will be run to verify they pass.
|
9
|
+
|
10
|
+
## [Unreleased] - These changes have not been added to RubyGems yet
|
11
|
+
|
12
|
+
- [ ]
|
13
|
+
|
14
|
+
## [1.0.0] - 2023-09-01
|
15
|
+
|
16
|
+
### Added
|
17
|
+
|
18
|
+
- Bindings and abstraction classes are implemented
|
19
|
+
- An event system:
|
20
|
+
- `pdirty`: parameter updates on the main Voicemeeter GUI
|
21
|
+
- `mdirty`: macrobutton updates
|
22
|
+
- `midi`: incoming data from a connected midi device
|
23
|
+
- `ldirty`: channel level updates
|
24
|
+
- An entry point for fetching a Remote class for each kind of Voicemeeter (basic, banana, potato)
|
25
|
+
- Logging system for reading messages sent by getters and setters.
|
26
|
+
- Strip class refinement in util.rb. It's scope should be limited to the CBindings module.
|
27
|
+
- rbs type signatures but some of them need updating.
|
28
|
+
- example user profile configs included with repo.
|
data/README.md
CHANGED
@@ -491,7 +491,7 @@ vm.patch.postfxinsert = false
|
|
491
491
|
|
492
492
|
##### asio[i]
|
493
493
|
|
494
|
-
- `get
|
494
|
+
- `get`: int
|
495
495
|
- `set(patch_in)`: int, valid range determined by connected device.
|
496
496
|
|
497
497
|
example:
|
@@ -504,7 +504,7 @@ i, from 0 to 10
|
|
504
504
|
|
505
505
|
##### A2[i] - A5[i]
|
506
506
|
|
507
|
-
- `get
|
507
|
+
- `get`: int
|
508
508
|
- `set(patch_out)`: int, valid range determined by connected device.
|
509
509
|
|
510
510
|
example:
|
@@ -517,7 +517,7 @@ i, from 0 to 8.
|
|
517
517
|
|
518
518
|
##### composite[i]
|
519
519
|
|
520
|
-
- `get
|
520
|
+
- `get`: int
|
521
521
|
- `set(channel)`: int, from 0 up to number of channels depending on version.
|
522
522
|
|
523
523
|
example:
|
@@ -572,7 +572,7 @@ vm.option.buffer.wdm = 512
|
|
572
572
|
|
573
573
|
##### delay[i]
|
574
574
|
|
575
|
-
- `get
|
575
|
+
- `get`: int
|
576
576
|
- `set(delay)`: int, from 0 to 500
|
577
577
|
|
578
578
|
example:
|
@@ -702,9 +702,9 @@ The following methods are available:
|
|
702
702
|
example:
|
703
703
|
|
704
704
|
```ruby
|
705
|
-
vm.event.add(%
|
705
|
+
vm.event.add(%i[pdirty mdirty midi ldirty])
|
706
706
|
|
707
|
-
vm.event.remove(%
|
707
|
+
vm.event.remove(%i[pdirty mdirty midi ldirty])
|
708
708
|
|
709
709
|
# get a list of currently subscribed
|
710
710
|
p vm.event.get
|
@@ -712,8 +712,6 @@ p vm.event.get
|
|
712
712
|
|
713
713
|
## `Voicemeeter Module`
|
714
714
|
|
715
|
-
### Remote class
|
716
|
-
|
717
715
|
#### Voicemeeter::Remote
|
718
716
|
|
719
717
|
You may pass the following optional keyword arguments:
|
@@ -745,9 +743,13 @@ vm.set("Strip[0].Gain", -3.6)
|
|
745
743
|
|
746
744
|
### Errors
|
747
745
|
|
748
|
-
- `Errors::VMError`:
|
749
|
-
- `Errors::
|
750
|
-
|
746
|
+
- `Errors::VMError`: Base Voicemeeter error class.
|
747
|
+
- `Errors::VMInstallError`: Raised when errors occur during installation.
|
748
|
+
- `Errors::VMCAPIError`: Raised when the C-API returns error codes.
|
749
|
+
- The following attributes are available:
|
750
|
+
- `fn_name`: name of the C-API function that failed.
|
751
|
+
- `code`: error code.
|
752
|
+
- For a full list of error codes [check the VoicemeeterRemote header file][voicemeeter remote header].
|
751
753
|
|
752
754
|
### Logging
|
753
755
|
|
data/lib/voicemeeter/base.rb
CHANGED
@@ -207,9 +207,9 @@ module Voicemeeter
|
|
207
207
|
data.each do |key, hash|
|
208
208
|
case key.to_s.split("-")
|
209
209
|
in [/strip|bus|button/ => kls, /^[0-9]+$/ => index]
|
210
|
-
target =
|
210
|
+
target = public_send(kls)
|
211
211
|
in ["vban", /in|instream|out|oustream/ => dir, /^[0-9]+$/ => index]
|
212
|
-
target = vban.
|
212
|
+
target = vban.public_send("#{dir.chomp("stream")}stream")
|
213
213
|
else
|
214
214
|
raise KeyError, "invalid config key '#{key}'"
|
215
215
|
end
|
data/lib/voicemeeter/bus.rb
CHANGED
@@ -5,8 +5,12 @@ module Voicemeeter
|
|
5
5
|
include IRemote
|
6
6
|
include Mixins::Fades
|
7
7
|
include Mixins::Return
|
8
|
+
extend MetaFunctions
|
8
9
|
|
9
10
|
attr_reader :eq, :mode, :levels
|
11
|
+
attr_accessor_bool :mute, :mono, :sel, :monitor
|
12
|
+
attr_accessor_float :gain
|
13
|
+
attr_accessor_string :label
|
10
14
|
|
11
15
|
def self.make(remote, i)
|
12
16
|
(i < remote.kind.phys_out) ? PhysicalBus.new(remote, i) : VirtualBus.new(remote, i)
|
@@ -14,10 +18,6 @@ module Voicemeeter
|
|
14
18
|
|
15
19
|
def initialize(remote, i)
|
16
20
|
super
|
17
|
-
make_accessor_bool :mute, :mono, :sel, :monitor
|
18
|
-
make_accessor_float :gain
|
19
|
-
make_accessor_string :label
|
20
|
-
|
21
21
|
@eq = BusEq.new(remote, i)
|
22
22
|
@mode = BusModes.new(remote, i)
|
23
23
|
@levels = BusLevels.new(remote, i)
|
@@ -36,11 +36,9 @@ module Voicemeeter
|
|
36
36
|
|
37
37
|
class BusEq
|
38
38
|
include IRemote
|
39
|
+
extend MetaFunctions
|
39
40
|
|
40
|
-
|
41
|
-
super
|
42
|
-
make_accessor_bool :on, :ab
|
43
|
-
end
|
41
|
+
attr_accessor_bool :on, :ab
|
44
42
|
|
45
43
|
def identifier
|
46
44
|
"bus[#{@index}].eq"
|
@@ -49,22 +47,20 @@ module Voicemeeter
|
|
49
47
|
|
50
48
|
class BusModes
|
51
49
|
include IRemote
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
:rearonly
|
67
|
-
end
|
50
|
+
extend MetaFunctions
|
51
|
+
|
52
|
+
attr_accessor_bool :normal,
|
53
|
+
:amix,
|
54
|
+
:bmix,
|
55
|
+
:repeat,
|
56
|
+
:composite,
|
57
|
+
:tvmix,
|
58
|
+
:upmix21,
|
59
|
+
:upmix41,
|
60
|
+
:upmix61,
|
61
|
+
:centeronly,
|
62
|
+
:lfeonly,
|
63
|
+
:rearonly
|
68
64
|
|
69
65
|
def identifier
|
70
66
|
"bus[#{@index}].mode"
|
@@ -115,12 +111,11 @@ module Voicemeeter
|
|
115
111
|
|
116
112
|
class BusDevice
|
117
113
|
include IRemote
|
114
|
+
extend MetaFunctions
|
118
115
|
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
make_writer_only :wdm, :ks, :mme, :asio
|
123
|
-
end
|
116
|
+
attr_reader_int :sr
|
117
|
+
attr_reader_string :name
|
118
|
+
attr_writer_string :wdm, :ks, :mme, :asio
|
124
119
|
|
125
120
|
def identifier
|
126
121
|
"bus[#{@index}].device"
|
data/lib/voicemeeter/command.rb
CHANGED
@@ -1,12 +1,10 @@
|
|
1
1
|
module Voicemeeter
|
2
2
|
class Command
|
3
3
|
include IRemote
|
4
|
+
extend MetaFunctions
|
4
5
|
|
5
|
-
|
6
|
-
|
7
|
-
make_action_method :show, :restart, :shutdown
|
8
|
-
make_writer_bool :showvbanchat, :lock
|
9
|
-
end
|
6
|
+
attr_action_method :show, :restart, :shutdown
|
7
|
+
attr_writer_bool :showvbanchat, :lock
|
10
8
|
|
11
9
|
def identifier
|
12
10
|
:command
|
data/lib/voicemeeter/event.rb
CHANGED
@@ -27,11 +27,22 @@ module Voicemeeter
|
|
27
27
|
class Tracker
|
28
28
|
include Logging
|
29
29
|
|
30
|
-
|
30
|
+
class << self
|
31
|
+
private def attr_accessor_events(*params)
|
32
|
+
params.each do |param|
|
33
|
+
attr_reader param
|
31
34
|
|
32
|
-
|
33
|
-
|
35
|
+
define_method("#{param}=") do |value|
|
36
|
+
instance_variable_set("@#{param}", value)
|
37
|
+
info("#{param} #{value ? "added to" : "removed from"}")
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
attr_accessor_events :pdirty, :mdirty, :midi, :ldirty
|
34
44
|
|
45
|
+
def initialize(**kwargs)
|
35
46
|
kwargs.each do |key, value|
|
36
47
|
instance_variable_set("@#{key}", value || false)
|
37
48
|
end
|
@@ -51,15 +62,6 @@ module Voicemeeter
|
|
51
62
|
logger.info info_msg.join(" ")
|
52
63
|
end
|
53
64
|
|
54
|
-
private def make_writer_methods(*params)
|
55
|
-
params.each do |param|
|
56
|
-
define_singleton_method("#{param}=") do |value|
|
57
|
-
instance_variable_set("@#{param}", value)
|
58
|
-
info("#{param} #{value ? "added to" : "removed from"}")
|
59
|
-
end
|
60
|
-
end
|
61
|
-
end
|
62
|
-
|
63
65
|
def get
|
64
66
|
%i[pdirty mdirty midi ldirty].reject { |ev| !send(ev) }
|
65
67
|
end
|
data/lib/voicemeeter/fx.rb
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
module Voicemeeter
|
2
2
|
class Fx
|
3
3
|
include IRemote
|
4
|
+
extend MetaFunctions
|
5
|
+
|
4
6
|
attr_reader :reverb, :delay
|
5
7
|
|
6
8
|
def initialize(remote)
|
@@ -16,11 +18,9 @@ module Voicemeeter
|
|
16
18
|
|
17
19
|
class FxReverb
|
18
20
|
include IRemote
|
21
|
+
extend MetaFunctions
|
19
22
|
|
20
|
-
|
21
|
-
super
|
22
|
-
make_accessor_bool :on, :ab
|
23
|
-
end
|
23
|
+
attr_accessor_bool :on, :ab
|
24
24
|
|
25
25
|
def identifier
|
26
26
|
"fx.reverb"
|
@@ -29,11 +29,9 @@ module Voicemeeter
|
|
29
29
|
|
30
30
|
class FxDelay
|
31
31
|
include IRemote
|
32
|
+
extend MetaFunctions
|
32
33
|
|
33
|
-
|
34
|
-
super
|
35
|
-
make_accessor_bool :on, :ab
|
36
|
-
end
|
34
|
+
attr_accessor_bool :on, :ab
|
37
35
|
|
38
36
|
def identifier
|
39
37
|
"fx.delay"
|
data/lib/voicemeeter/iremote.rb
CHANGED
@@ -2,7 +2,6 @@ module Voicemeeter
|
|
2
2
|
# Common interface with the base Remote class.
|
3
3
|
module IRemote
|
4
4
|
include Logging
|
5
|
-
include MetaFunctions
|
6
5
|
|
7
6
|
def initialize(remote, i = nil)
|
8
7
|
@remote = remote
|
@@ -38,12 +37,12 @@ module Voicemeeter
|
|
38
37
|
def apply(params)
|
39
38
|
params.each do |key, val|
|
40
39
|
if val.is_a? Hash
|
41
|
-
target =
|
40
|
+
target = public_send(key)
|
42
41
|
target.apply(val)
|
43
42
|
elsif key == :mode
|
44
|
-
mode.
|
43
|
+
mode.public_send("#{val}=", true)
|
45
44
|
else
|
46
|
-
|
45
|
+
public_send("#{key}=", val)
|
47
46
|
end
|
48
47
|
end
|
49
48
|
end
|
data/lib/voicemeeter/meta.rb
CHANGED
@@ -3,72 +3,72 @@ module Voicemeeter
|
|
3
3
|
private
|
4
4
|
|
5
5
|
# Accessor methods
|
6
|
-
def
|
6
|
+
def attr_accessor_bool(*params)
|
7
7
|
params.each do |param|
|
8
|
-
|
8
|
+
define_method(param) { getter(param).to_i == 1 }
|
9
9
|
|
10
|
-
|
10
|
+
define_method("#{param}=") do |value|
|
11
11
|
setter(param, value && 1 || 0)
|
12
12
|
end
|
13
13
|
end
|
14
14
|
end
|
15
15
|
|
16
|
-
def
|
16
|
+
def attr_accessor_string(*params)
|
17
17
|
params.each do |param|
|
18
|
-
|
18
|
+
define_method(param) { getter(param, true) }
|
19
19
|
|
20
|
-
|
20
|
+
define_method("#{param}=") { |value| setter(param, value) }
|
21
21
|
end
|
22
22
|
end
|
23
23
|
|
24
|
-
def
|
24
|
+
def attr_accessor_int(*params)
|
25
25
|
params.each do |param|
|
26
|
-
|
26
|
+
define_method(param) { getter(param).to_i }
|
27
27
|
|
28
|
-
|
28
|
+
define_method("#{param}=") { |value| setter(param, value) }
|
29
29
|
end
|
30
30
|
end
|
31
31
|
|
32
|
-
def
|
32
|
+
def attr_accessor_float(*params)
|
33
33
|
params.each do |param|
|
34
|
-
|
34
|
+
define_method(param) { getter(param) }
|
35
35
|
|
36
|
-
|
36
|
+
define_method("#{param}=") { |value| setter(param, value) }
|
37
37
|
end
|
38
38
|
end
|
39
39
|
|
40
40
|
# reader methods
|
41
|
-
def
|
41
|
+
def attr_reader_string(*params)
|
42
42
|
params.each do |param|
|
43
|
-
|
43
|
+
define_method(param) { getter(param, true) }
|
44
44
|
end
|
45
45
|
end
|
46
46
|
|
47
|
-
def
|
47
|
+
def attr_reader_int(*params)
|
48
48
|
params.each do |param|
|
49
|
-
|
49
|
+
define_method(param) { getter(param).to_i }
|
50
50
|
end
|
51
51
|
end
|
52
52
|
|
53
53
|
# writer methods
|
54
|
-
def
|
54
|
+
def attr_writer_bool(*params)
|
55
55
|
params.each do |param|
|
56
|
-
|
56
|
+
define_method("#{param}=") do |value|
|
57
57
|
setter(param, value && 1 || 0)
|
58
58
|
end
|
59
59
|
end
|
60
60
|
end
|
61
61
|
|
62
|
-
def
|
62
|
+
def attr_writer_string(*params)
|
63
63
|
params.each do |param|
|
64
|
-
|
64
|
+
define_method("#{param}=") { |value| setter(param, value) }
|
65
65
|
end
|
66
66
|
end
|
67
67
|
|
68
68
|
# methods for performing certain actions as opposed to setting values
|
69
|
-
def
|
69
|
+
def attr_action_method(*params)
|
70
70
|
params.each do |param|
|
71
|
-
|
71
|
+
define_method(param) { setter(param, 1) }
|
72
72
|
end
|
73
73
|
end
|
74
74
|
end
|
data/lib/voicemeeter/mixins.rb
CHANGED
@@ -13,10 +13,8 @@ module Voicemeeter
|
|
13
13
|
end
|
14
14
|
|
15
15
|
module Return
|
16
|
-
|
17
|
-
|
18
|
-
make_accessor_float :returnreverb, :returndelay, :returnfx1, :returnfx2
|
19
|
-
end
|
16
|
+
extend MetaFunctions
|
17
|
+
attr_accessor_float :returnreverb, :returndelay, :returnfx1, :returnfx2
|
20
18
|
end
|
21
19
|
|
22
20
|
module Apps
|
@@ -30,47 +28,40 @@ module Voicemeeter
|
|
30
28
|
end
|
31
29
|
|
32
30
|
module Outputs
|
33
|
-
def
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
31
|
+
def make_attr_outputs(num_a, num_b)
|
32
|
+
(1..(num_a + num_b)).each do |i|
|
33
|
+
param = (i <= num_a) ? :"A#{i}" : :"B#{i - num_a}"
|
34
|
+
define_singleton_method(param) do
|
35
|
+
getter(param).to_i == 1
|
36
|
+
end
|
37
|
+
define_singleton_method("#{param}=") do |value|
|
38
|
+
setter(param, value && 1 || 0)
|
40
39
|
end
|
41
|
-
|
40
|
+
end
|
42
41
|
end
|
43
42
|
end
|
44
43
|
|
45
44
|
module Xy
|
46
45
|
module Pan
|
47
|
-
|
48
|
-
|
49
|
-
make_accessor_float :pan_x, :pan_y
|
50
|
-
end
|
46
|
+
extend MetaFunctions
|
47
|
+
attr_accessor_float :pan_x, :pan_y
|
51
48
|
end
|
52
49
|
|
53
50
|
module Color
|
54
|
-
|
55
|
-
|
56
|
-
make_accessor_float :color_x, :color_y
|
57
|
-
end
|
51
|
+
extend MetaFunctions
|
52
|
+
attr_accessor_float :color_x, :color_y
|
58
53
|
end
|
59
54
|
|
60
55
|
module Fx
|
61
|
-
|
62
|
-
|
63
|
-
make_accessor_float :fx_x, :fx_y
|
64
|
-
end
|
56
|
+
extend MetaFunctions
|
57
|
+
attr_accessor_float :fx_x, :fx_y
|
65
58
|
end
|
66
59
|
end
|
67
60
|
|
68
61
|
module Fx
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
make_accessor_bool :postreverb, :postdelay, :postfx1, :postfx2
|
73
|
-
end
|
62
|
+
extend MetaFunctions
|
63
|
+
attr_accessor_float :reverb, :delay, :fx1, :fx2
|
64
|
+
attr_accessor_bool :postreverb, :postdelay, :postfx1, :postfx2
|
74
65
|
end
|
75
66
|
|
76
67
|
module LevelEnum
|
data/lib/voicemeeter/option.rb
CHANGED
@@ -2,13 +2,14 @@ module Voicemeeter
|
|
2
2
|
module Option
|
3
3
|
class Base
|
4
4
|
include IRemote
|
5
|
+
extend MetaFunctions
|
6
|
+
|
5
7
|
attr_reader :delay, :buffer, :mode
|
8
|
+
attr_accessor_int :sr
|
9
|
+
attr_accessor_bool :asiosr, :monitoronsel, :slidermode
|
6
10
|
|
7
11
|
def initialize(remote)
|
8
12
|
super
|
9
|
-
make_accessor_int :sr
|
10
|
-
make_accessor_bool :asiosr, :monitoronsel, :slidermode
|
11
|
-
|
12
13
|
@delay = (0...remote.kind.phys_out).map { OptionDelay.new(remote, _1) }
|
13
14
|
@buffer = OptionBuffer.new(remote)
|
14
15
|
@mode = OptionMode.new(remote)
|
@@ -21,11 +22,9 @@ module Voicemeeter
|
|
21
22
|
|
22
23
|
class OptionDelay
|
23
24
|
include IRemote
|
25
|
+
extend MetaFunctions
|
24
26
|
|
25
|
-
|
26
|
-
super
|
27
|
-
make_accessor_bool :on, :ab
|
28
|
-
end
|
27
|
+
attr_accessor_bool :on, :ab
|
29
28
|
|
30
29
|
def identifier
|
31
30
|
"option.delay"
|
@@ -42,11 +41,9 @@ module Voicemeeter
|
|
42
41
|
|
43
42
|
class OptionBuffer
|
44
43
|
include IRemote
|
44
|
+
extend MetaFunctions
|
45
45
|
|
46
|
-
|
47
|
-
super
|
48
|
-
make_accessor_int :mme, :wdm, :ks, :asio
|
49
|
-
end
|
46
|
+
attr_accessor_int :mme, :wdm, :ks, :asio
|
50
47
|
|
51
48
|
def identifier
|
52
49
|
"option.buffer"
|
@@ -55,11 +52,9 @@ module Voicemeeter
|
|
55
52
|
|
56
53
|
class OptionMode
|
57
54
|
include IRemote
|
55
|
+
extend MetaFunctions
|
58
56
|
|
59
|
-
|
60
|
-
super
|
61
|
-
make_accessor_bool :exclusif, :swift
|
62
|
-
end
|
57
|
+
attr_accessor_bool :exclusif, :swift
|
63
58
|
|
64
59
|
def identifier
|
65
60
|
"option.mode"
|
data/lib/voicemeeter/patch.rb
CHANGED
@@ -3,12 +3,13 @@ module Voicemeeter
|
|
3
3
|
# Base class for Patch
|
4
4
|
class Base
|
5
5
|
include IRemote
|
6
|
+
extend MetaFunctions
|
7
|
+
|
6
8
|
attr_reader :asio, :A2, :A3, :A4, :A5, :composite, :insert
|
9
|
+
attr_accessor_bool :postfadercomposite, :postfxinsert
|
7
10
|
|
8
11
|
def initialize(remote)
|
9
12
|
super
|
10
|
-
make_accessor_bool :postfadercomposite, :postfxinsert
|
11
|
-
|
12
13
|
asio_in, asio_out = remote.kind.asio
|
13
14
|
@asio = (0...asio_in).map { PatchAsioIn.new(remote, _1) }
|
14
15
|
%i[A2 A3 A4 A5].each do |param|
|
data/lib/voicemeeter/recorder.rb
CHANGED
@@ -11,15 +11,16 @@ module Voicemeeter
|
|
11
11
|
class Base
|
12
12
|
include IRemote
|
13
13
|
include Mixins::Outputs
|
14
|
+
extend MetaFunctions
|
14
15
|
|
15
16
|
attr_reader :mode, :armstrip, :armbus
|
17
|
+
attr_action_method :play, :stop, :pause, :replay, :record, :ff, :rew
|
18
|
+
attr_accessor_int :bitresolution, :channel, :kbps
|
19
|
+
attr_accessor_float :gain
|
16
20
|
|
17
21
|
def initialize(remote)
|
18
22
|
super
|
19
|
-
|
20
|
-
make_accessor_int :bitresolution, :channel, :kbps
|
21
|
-
make_accessor_float :gain
|
22
|
-
|
23
|
+
make_attr_outputs(*remote.kind.outs)
|
23
24
|
@mode = RecorderMode.new(remote)
|
24
25
|
@armstrip = (0...remote.kind.num_strip).map { RecorderArmStrip.new(remote, _1) }
|
25
26
|
@armbus = (0...remote.kind.num_bus).map { RecorderArmBus.new(remote, _1) }
|
@@ -51,11 +52,9 @@ module Voicemeeter
|
|
51
52
|
|
52
53
|
class RecorderMode
|
53
54
|
include IRemote
|
55
|
+
extend MetaFunctions
|
54
56
|
|
55
|
-
|
56
|
-
super
|
57
|
-
make_accessor_bool :recbus, :playonload, :loop, :multitrack
|
58
|
-
end
|
57
|
+
attr_accessor_bool :recbus, :playonload, :loop, :multitrack
|
59
58
|
|
60
59
|
def identifier
|
61
60
|
"recorder.mode"
|
data/lib/voicemeeter/remote.rb
CHANGED
@@ -54,10 +54,10 @@ module Voicemeeter
|
|
54
54
|
end
|
55
55
|
end
|
56
56
|
|
57
|
-
# Represents a
|
57
|
+
# Represents a Basic Remote
|
58
58
|
class RemoteBasic < Remote; end
|
59
59
|
|
60
|
-
# Represents a
|
60
|
+
# Represents a Banana Remote
|
61
61
|
class RemoteBanana < Remote
|
62
62
|
public attr_reader :recorder, :patch
|
63
63
|
|
@@ -66,7 +66,7 @@ module Voicemeeter
|
|
66
66
|
end
|
67
67
|
end
|
68
68
|
|
69
|
-
# Represents a
|
69
|
+
# Represents a Potato Remote
|
70
70
|
class RemotePotato < Remote
|
71
71
|
public attr_reader :recorder, :patch, :fx
|
72
72
|
|
data/lib/voicemeeter/strip.rb
CHANGED
@@ -5,8 +5,13 @@ module Voicemeeter
|
|
5
5
|
include IRemote
|
6
6
|
include Mixins::Outputs
|
7
7
|
include Mixins::Fades
|
8
|
+
extend MetaFunctions
|
8
9
|
|
9
10
|
attr_reader :gainlayer, :levels
|
11
|
+
attr_accessor_bool :solo, :mute, :mono
|
12
|
+
attr_accessor_float :gain
|
13
|
+
attr_accessor_int :limit
|
14
|
+
attr_accessor_string :label
|
10
15
|
|
11
16
|
def self.make(remote, i)
|
12
17
|
(i < remote.kind.phys_in) ? PhysicalStrip.new(remote, i) : VirtualStrip.new(remote, i)
|
@@ -14,11 +19,7 @@ module Voicemeeter
|
|
14
19
|
|
15
20
|
def initialize(remote, i)
|
16
21
|
super
|
17
|
-
|
18
|
-
make_accessor_float :gain
|
19
|
-
make_accessor_int :limit
|
20
|
-
make_accessor_string :label
|
21
|
-
|
22
|
+
make_attr_outputs(*remote.kind.outs)
|
22
23
|
@gainlayer = (0...8).map { GainLayer.new(remote, i, _1) }
|
23
24
|
@levels = StripLevels.new(remote, i)
|
24
25
|
end
|
@@ -34,13 +35,13 @@ module Voicemeeter
|
|
34
35
|
include Mixins::Xy::Color
|
35
36
|
include Mixins::Xy::Fx
|
36
37
|
include Mixins::Fx
|
38
|
+
extend MetaFunctions
|
37
39
|
|
38
40
|
attr_reader :comp, :gate, :denoiser, :eq, :device
|
41
|
+
attr_accessor_float :audibility
|
39
42
|
|
40
43
|
def initialize(remote, i)
|
41
44
|
super
|
42
|
-
make_accessor_float :audibility
|
43
|
-
|
44
45
|
@comp = StripComp.new(remote, i)
|
45
46
|
@gate = StripGate.new(remote, i)
|
46
47
|
@denoiser = StripDenoiser.new(remote, i)
|
@@ -51,18 +52,16 @@ module Voicemeeter
|
|
51
52
|
|
52
53
|
class StripComp
|
53
54
|
include IRemote
|
55
|
+
extend MetaFunctions
|
54
56
|
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
:gainout
|
64
|
-
make_accessor_bool :makeup
|
65
|
-
end
|
57
|
+
attr_accessor_float :gainin,
|
58
|
+
:ratio,
|
59
|
+
:threshold,
|
60
|
+
:attack,
|
61
|
+
:release,
|
62
|
+
:knee,
|
63
|
+
:gainout
|
64
|
+
attr_accessor_bool :makeup
|
66
65
|
|
67
66
|
def identifier
|
68
67
|
"strip[#{@index}].comp"
|
@@ -79,12 +78,10 @@ module Voicemeeter
|
|
79
78
|
|
80
79
|
class StripGate
|
81
80
|
include IRemote
|
81
|
+
extend MetaFunctions
|
82
82
|
|
83
|
-
|
84
|
-
|
85
|
-
make_accessor_float :threshold, :damping, :attack, :hold, :release
|
86
|
-
make_accessor_int :bpsidechain
|
87
|
-
end
|
83
|
+
attr_accessor_float :threshold, :damping, :attack, :hold, :release
|
84
|
+
attr_accessor_int :bpsidechain
|
88
85
|
|
89
86
|
def identifier
|
90
87
|
"strip[#{@index}].gate"
|
@@ -117,11 +114,9 @@ module Voicemeeter
|
|
117
114
|
|
118
115
|
class StripEq
|
119
116
|
include IRemote
|
117
|
+
extend MetaFunctions
|
120
118
|
|
121
|
-
|
122
|
-
super
|
123
|
-
make_accessor_bool :on, :ab
|
124
|
-
end
|
119
|
+
attr_accessor_bool :on, :ab
|
125
120
|
|
126
121
|
def identifier
|
127
122
|
"strip[#{@index}].eq"
|
@@ -130,13 +125,11 @@ module Voicemeeter
|
|
130
125
|
|
131
126
|
class StripDevice
|
132
127
|
include IRemote
|
128
|
+
extend MetaFunctions
|
133
129
|
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
make_reader_string :name
|
138
|
-
make_writer_string :wdm, :ks, :mme, :asio
|
139
|
-
end
|
130
|
+
attr_reader_int :sr
|
131
|
+
attr_reader_string :name
|
132
|
+
attr_writer_string :wdm, :ks, :mme, :asio
|
140
133
|
|
141
134
|
def identifier
|
142
135
|
"strip[#{@index}].device"
|
@@ -147,12 +140,10 @@ module Voicemeeter
|
|
147
140
|
class VirtualStrip < Base
|
148
141
|
include Mixins::Xy::Pan
|
149
142
|
include Mixins::Apps
|
143
|
+
extend MetaFunctions
|
150
144
|
|
151
|
-
|
152
|
-
|
153
|
-
make_accessor_bool :mc
|
154
|
-
make_accessor_int :karaoke
|
155
|
-
end
|
145
|
+
attr_accessor_bool :mc
|
146
|
+
attr_accessor_int :karaoke
|
156
147
|
|
157
148
|
def bass
|
158
149
|
round(getter("EQGain1"), 1)
|
data/lib/voicemeeter/vban.rb
CHANGED
@@ -3,13 +3,11 @@ module Voicemeeter
|
|
3
3
|
# Base class for Vban In/Out Streams
|
4
4
|
class VbanStream
|
5
5
|
include IRemote
|
6
|
+
extend MetaFunctions
|
6
7
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
make_accessor_string :name, :ip
|
11
|
-
make_accessor_int :quality, :route
|
12
|
-
end
|
8
|
+
attr_accessor_bool :on
|
9
|
+
attr_accessor_string :name, :ip
|
10
|
+
attr_accessor_int :quality, :route
|
13
11
|
|
14
12
|
def identifier
|
15
13
|
"vban.#{direction}stream[#{@index}]"
|
@@ -22,10 +20,7 @@ module Voicemeeter
|
|
22
20
|
|
23
21
|
# Represents a Vban InStream
|
24
22
|
class VbanInstream < VbanStream
|
25
|
-
|
26
|
-
super
|
27
|
-
make_reader_int :sr, :channel, :bit
|
28
|
-
end
|
23
|
+
attr_reader_int :sr, :channel, :bit
|
29
24
|
|
30
25
|
def direction
|
31
26
|
:in
|
@@ -43,10 +38,7 @@ module Voicemeeter
|
|
43
38
|
|
44
39
|
# Represents a Vban OutStream
|
45
40
|
class VbanOutstream < VbanStream
|
46
|
-
|
47
|
-
super
|
48
|
-
make_accessor_int :sr, :channel, :bit
|
49
|
-
end
|
41
|
+
attr_accessor_int :sr, :channel, :bit
|
50
42
|
|
51
43
|
def direction
|
52
44
|
:out
|
data/lib/voicemeeter/version.rb
CHANGED
data/lib/voicemeeter/worker.rb
CHANGED
@@ -7,8 +7,7 @@ module Voicemeeter
|
|
7
7
|
def init_producer(que)
|
8
8
|
@producer = Thread.new do
|
9
9
|
Thread.current.name = "producer"
|
10
|
-
|
11
|
-
while Thread.current[:running]
|
10
|
+
while @running
|
12
11
|
que << :pdirty if event.pdirty
|
13
12
|
que << :mdirty if event.mdirty
|
14
13
|
que << :midi if event.midi
|
@@ -16,7 +15,7 @@ module Voicemeeter
|
|
16
15
|
sleep(@ratelimit)
|
17
16
|
end
|
18
17
|
logger.debug "closing #{Thread.current.name} thread"
|
19
|
-
que <<
|
18
|
+
que << @running
|
20
19
|
end
|
21
20
|
end
|
22
21
|
|
@@ -51,12 +50,13 @@ module Voicemeeter
|
|
51
50
|
|
52
51
|
def init_event_threads
|
53
52
|
que = Queue.new
|
53
|
+
@running = true
|
54
54
|
init_worker(que) and init_producer(que)
|
55
55
|
end
|
56
56
|
|
57
57
|
def end_event_threads
|
58
58
|
if running?
|
59
|
-
@
|
59
|
+
@running = false
|
60
60
|
@producer.join
|
61
61
|
end
|
62
62
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: voicemeeter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- onyx_online
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-08-
|
11
|
+
date: 2023-08-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ffi
|
@@ -92,8 +92,10 @@ executables: []
|
|
92
92
|
extensions: []
|
93
93
|
extra_rdoc_files:
|
94
94
|
- README.md
|
95
|
+
- CHANGELOG.md
|
95
96
|
- LICENSE
|
96
97
|
files:
|
98
|
+
- CHANGELOG.md
|
97
99
|
- LICENSE
|
98
100
|
- README.md
|
99
101
|
- lib/voicemeeter.rb
|