mirror of
https://github.com/onyx-and-iris/duckypad-twitch.git
synced 2025-04-01 19:23:47 +01:00
add fade in/out logic to toggle_workstation_to_onyx()
This commit is contained in:
parent
8fd35408d5
commit
ed890ab9e7
@ -1,4 +1,4 @@
|
|||||||
# SPDX-FileCopyrightText: 2023-present onyx-and-iris <75868496+onyx-and-iris@users.noreply.github.com>
|
# SPDX-FileCopyrightText: 2023-present onyx-and-iris <75868496+onyx-and-iris@users.noreply.github.com>
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: MIT
|
# SPDX-License-Identifier: MIT
|
||||||
__version__ = '1.0.5'
|
__version__ = '1.0.6'
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import logging
|
import logging
|
||||||
from enum import IntEnum
|
from enum import IntEnum
|
||||||
|
|
||||||
|
import time
|
||||||
import vban_cmd
|
import vban_cmd
|
||||||
|
|
||||||
from . import configuration
|
from . import configuration
|
||||||
@ -140,8 +141,22 @@ class Audio(ILayer):
|
|||||||
vban.vban.instream[0].on = True
|
vban.vban.instream[0].on = True
|
||||||
self.vm.strip[5].gain = -6
|
self.vm.strip[5].gain = -6
|
||||||
self.vm.vban.outstream[2].on = True
|
self.vm.vban.outstream[2].on = True
|
||||||
|
|
||||||
|
# Fade out the workstation
|
||||||
|
current_fader = self.mixer.lr.mix.fader
|
||||||
|
while current_fader > -90:
|
||||||
|
current_fader -= 1
|
||||||
|
self.mixer.lr.mix.fader = current_fader
|
||||||
|
time.sleep(0.05)
|
||||||
else:
|
else:
|
||||||
with vban_cmd.api('potato', outbound=True, **onyx_conn) as vban:
|
with vban_cmd.api('potato', outbound=True, **onyx_conn) as vban:
|
||||||
vban.vban.instream[0].on = False
|
vban.vban.instream[0].on = False
|
||||||
self.vm.strip[5].gain = 0
|
self.vm.strip[5].gain = 0
|
||||||
self.vm.vban.outstream[2].on = False
|
self.vm.vban.outstream[2].on = False
|
||||||
|
|
||||||
|
# Fade in the workstation
|
||||||
|
current_fader = self.mixer.lr.mix.fader
|
||||||
|
while current_fader < -36:
|
||||||
|
current_fader += 1
|
||||||
|
self.mixer.lr.mix.fader = current_fader
|
||||||
|
time.sleep(0.05)
|
||||||
|
@ -94,7 +94,6 @@ exclude = [
|
|||||||
"venv",
|
"venv",
|
||||||
]
|
]
|
||||||
|
|
||||||
# Same as Black.
|
|
||||||
line-length = 120
|
line-length = 120
|
||||||
indent-width = 4
|
indent-width = 4
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user