Compare commits
3 Commits
4a5fe74a9f
...
543379db54
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
543379db54 | ||
|
|
9bd7c26e55 | ||
|
|
fb4a5f3795 |
@ -79,6 +79,8 @@ class Config(object):
|
|||||||
OBS_PASSWORD = "auster"
|
OBS_PASSWORD = "auster"
|
||||||
OBS_PORT = 4455
|
OBS_PORT = 4455
|
||||||
PLAY_SETTLE = 500000
|
PLAY_SETTLE = 500000
|
||||||
|
PREVIEW_ADVANCE_MS = 5000
|
||||||
|
PREVIEW_BACK_MS = 5000
|
||||||
REPLACE_FILES_DEFAULT_SOURCE = "/home/kae/music/Singles/tmp"
|
REPLACE_FILES_DEFAULT_SOURCE = "/home/kae/music/Singles/tmp"
|
||||||
RETURN_KEY_DEBOUNCE_MS = 500
|
RETURN_KEY_DEBOUNCE_MS = 500
|
||||||
ROOT = os.environ.get("ROOT") or "/home/kae/music"
|
ROOT = os.environ.get("ROOT") or "/home/kae/music"
|
||||||
@ -88,8 +90,10 @@ class Config(object):
|
|||||||
TEXT_NO_TRACK_NO_NOTE = "[Section header]"
|
TEXT_NO_TRACK_NO_NOTE = "[Section header]"
|
||||||
TOD_TIME_FORMAT = "%H:%M:%S"
|
TOD_TIME_FORMAT = "%H:%M:%S"
|
||||||
TRACK_TIME_FORMAT = "%H:%M:%S"
|
TRACK_TIME_FORMAT = "%H:%M:%S"
|
||||||
VOLUME_VLC_DEFAULT = 75
|
VLC_MAIN_PLAYER_NAME = "MusicMuster Main Player"
|
||||||
VOLUME_VLC_DROP3db = 65
|
VLC_PREVIEW_PLAYER_NAME = "MusicMuster Preview Player"
|
||||||
|
VLC_VOLUME_DEFAULT = 75
|
||||||
|
VLC_VOLUME_DROP3db = 65
|
||||||
WARNING_MS_BEFORE_FADE = 5500
|
WARNING_MS_BEFORE_FADE = 5500
|
||||||
WARNING_MS_BEFORE_SILENCE = 5500
|
WARNING_MS_BEFORE_SILENCE = 5500
|
||||||
WEB_ZOOM_FACTOR = 1.2
|
WEB_ZOOM_FACTOR = 1.2
|
||||||
|
|||||||
119
app/music.py
119
app/music.py
@ -1,18 +1,24 @@
|
|||||||
|
# Standard library imports
|
||||||
|
import datetime as dt
|
||||||
import threading
|
import threading
|
||||||
import vlc # type: ignore
|
|
||||||
|
|
||||||
from config import Config
|
|
||||||
from helpers import file_is_unreadable
|
|
||||||
from typing import Optional
|
|
||||||
from time import sleep
|
from time import sleep
|
||||||
|
from typing import Optional
|
||||||
|
|
||||||
from log import log
|
# PyQt imports
|
||||||
|
|
||||||
from PyQt6.QtCore import (
|
from PyQt6.QtCore import (
|
||||||
QRunnable,
|
QRunnable,
|
||||||
QThreadPool,
|
QThreadPool,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Third party imports
|
||||||
|
import vlc # type: ignore
|
||||||
|
|
||||||
|
# App imports
|
||||||
|
from config import Config
|
||||||
|
from helpers import file_is_unreadable
|
||||||
|
from log import log
|
||||||
|
|
||||||
|
|
||||||
lock = threading.Lock()
|
lock = threading.Lock()
|
||||||
|
|
||||||
|
|
||||||
@ -53,10 +59,31 @@ class Music:
|
|||||||
Manage the playing of music tracks
|
Manage the playing of music tracks
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self) -> None:
|
def __init__(self, name) -> None:
|
||||||
self.VLC = vlc.Instance()
|
self.VLC = vlc.Instance()
|
||||||
|
self.VLC.set_user_agent(name, name)
|
||||||
self.player = None
|
self.player = None
|
||||||
self.max_volume = Config.VOLUME_VLC_DEFAULT
|
self.name = name
|
||||||
|
self.max_volume = Config.VLC_VOLUME_DEFAULT
|
||||||
|
self.start_dt: Optional[dt.datetime] = None
|
||||||
|
|
||||||
|
def _adjust_by_ms(self, ms: int) -> None:
|
||||||
|
"""Move player position by ms milliseconds"""
|
||||||
|
|
||||||
|
if not self.player:
|
||||||
|
return
|
||||||
|
|
||||||
|
elapsed_ms = self.get_playtime()
|
||||||
|
position = self.get_position()
|
||||||
|
if not position:
|
||||||
|
position = 0
|
||||||
|
new_position = max(0, position + ((position * ms) / elapsed_ms))
|
||||||
|
self.player.set_position(new_position)
|
||||||
|
# Adjus start time so elapsed time calculations are correct
|
||||||
|
if new_position == 0:
|
||||||
|
self.start_dt = dt.datetime.now()
|
||||||
|
else:
|
||||||
|
self.start_dt -= dt.timedelta(milliseconds=ms)
|
||||||
|
|
||||||
def fade(self, fade_seconds: int = Config.FADEOUT_SECONDS) -> None:
|
def fade(self, fade_seconds: int = Config.FADEOUT_SECONDS) -> None:
|
||||||
"""
|
"""
|
||||||
@ -66,7 +93,7 @@ class Music:
|
|||||||
to hold up the UI during the fade.
|
to hold up the UI during the fade.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
log.info("Music.stop()")
|
log.info(f"Music[{self.name}].stop()")
|
||||||
|
|
||||||
if not self.player:
|
if not self.player:
|
||||||
return
|
return
|
||||||
@ -84,6 +111,21 @@ class Music:
|
|||||||
fader = FadeTrack(p, fade_seconds=fade_seconds)
|
fader = FadeTrack(p, fade_seconds=fade_seconds)
|
||||||
pool.start(fader)
|
pool.start(fader)
|
||||||
|
|
||||||
|
def get_playtime(self) -> int:
|
||||||
|
"""
|
||||||
|
Return number of milliseconds current track has been playing or
|
||||||
|
zero if not playing. The vlc function get_time() only updates 3-4
|
||||||
|
times a second; this function has much better resolution.
|
||||||
|
"""
|
||||||
|
|
||||||
|
if self.player is None or self.start_dt is None:
|
||||||
|
return 0
|
||||||
|
|
||||||
|
now = dt.datetime.now()
|
||||||
|
elapsed_time = now - self.start_dt
|
||||||
|
elapsed_seconds = elapsed_time.seconds + (elapsed_time.microseconds / 1000000)
|
||||||
|
return int(elapsed_seconds * 1000)
|
||||||
|
|
||||||
def get_position(self) -> Optional[float]:
|
def get_position(self) -> Optional[float]:
|
||||||
"""Return current position"""
|
"""Return current position"""
|
||||||
|
|
||||||
@ -91,6 +133,41 @@ class Music:
|
|||||||
return None
|
return None
|
||||||
return self.player.get_position()
|
return self.player.get_position()
|
||||||
|
|
||||||
|
def is_playing(self) -> bool:
|
||||||
|
"""
|
||||||
|
Return True if we're playing
|
||||||
|
"""
|
||||||
|
|
||||||
|
if not self.player:
|
||||||
|
return False
|
||||||
|
|
||||||
|
# There is a discrete time between starting playing a track and
|
||||||
|
# player.is_playing() returning True, so assume playing if less
|
||||||
|
# than Config.PLAY_SETTLE microseconds have passed since
|
||||||
|
# starting play.
|
||||||
|
if self.start_dt and (
|
||||||
|
self.player.is_playing()
|
||||||
|
or (dt.datetime.now() - self.start_dt)
|
||||||
|
< dt.timedelta(microseconds=Config.PLAY_SETTLE)
|
||||||
|
):
|
||||||
|
return True
|
||||||
|
|
||||||
|
return False
|
||||||
|
|
||||||
|
def move_back(self, ms: int) -> None:
|
||||||
|
"""
|
||||||
|
Rewind player by ms milliseconds
|
||||||
|
"""
|
||||||
|
|
||||||
|
self._adjust_by_ms(ms * -1)
|
||||||
|
|
||||||
|
def move_forward(self, ms: int) -> None:
|
||||||
|
"""
|
||||||
|
Rewind player by ms milliseconds
|
||||||
|
"""
|
||||||
|
|
||||||
|
self._adjust_by_ms(ms)
|
||||||
|
|
||||||
def play(self, path: str, position: Optional[float] = None) -> None:
|
def play(self, path: str, position: Optional[float] = None) -> None:
|
||||||
"""
|
"""
|
||||||
Start playing the track at path.
|
Start playing the track at path.
|
||||||
@ -98,7 +175,7 @@ class Music:
|
|||||||
Log and return if path not found.
|
Log and return if path not found.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
log.info(f"Music.play({path=}, {position=}")
|
log.info(f"Music[{self.name}].play({path=}, {position=}")
|
||||||
|
|
||||||
if file_is_unreadable(path):
|
if file_is_unreadable(path):
|
||||||
log.error(f"play({path}): path not readable")
|
log.error(f"play({path}): path not readable")
|
||||||
@ -108,9 +185,21 @@ class Music:
|
|||||||
self.player = media.player_new_from_media()
|
self.player = media.player_new_from_media()
|
||||||
if self.player:
|
if self.player:
|
||||||
_ = self.player.play()
|
_ = self.player.play()
|
||||||
self.set_volume(self.max_volume)
|
self.start_dt = dt.datetime.now()
|
||||||
if position:
|
if position:
|
||||||
self.player.set_position(position)
|
self.player.set_position(position)
|
||||||
|
# For as-yet unknown reasons. sometimes the volume gets
|
||||||
|
# reset to zero within 200mS or so of starting play. This
|
||||||
|
# only happened since moving to Debian 12, which uses
|
||||||
|
# Pipewire for sound (which may be irrelevant).
|
||||||
|
for _ in range(3):
|
||||||
|
if self.player:
|
||||||
|
volume = self.player.audio_get_volume()
|
||||||
|
if volume < Config.VLC_VOLUME_DEFAULT:
|
||||||
|
self.set_volume(Config.VLC_VOLUME_DEFAULT)
|
||||||
|
log.debug(f"Reset from {volume=}")
|
||||||
|
break
|
||||||
|
sleep(0.1)
|
||||||
|
|
||||||
def set_volume(self, volume=None, set_default=True) -> None:
|
def set_volume(self, volume=None, set_default=True) -> None:
|
||||||
"""Set maximum volume used for player"""
|
"""Set maximum volume used for player"""
|
||||||
@ -122,14 +211,16 @@ class Music:
|
|||||||
self.max_volume = volume
|
self.max_volume = volume
|
||||||
|
|
||||||
if volume is None:
|
if volume is None:
|
||||||
volume = Config.VOLUME_VLC_DEFAULT
|
volume = Config.VLC_VOLUME_DEFAULT
|
||||||
|
|
||||||
self.player.audio_set_volume(volume)
|
self.player.audio_set_volume(volume)
|
||||||
|
|
||||||
def stop(self) -> float:
|
def stop(self) -> float:
|
||||||
"""Immediately stop playing"""
|
"""Immediately stop playing"""
|
||||||
|
|
||||||
log.info("Music.stop()")
|
log.info(f"Music[{self.name}].stop()")
|
||||||
|
|
||||||
|
self.start_dt = None
|
||||||
|
|
||||||
if not self.player:
|
if not self.player:
|
||||||
return 0.0
|
return 0.0
|
||||||
|
|||||||
@ -47,7 +47,7 @@ from PyQt6.QtWidgets import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
# Third party imports
|
# Third party imports
|
||||||
from pygame import mixer
|
# from pygame import mixer
|
||||||
import pipeclient
|
import pipeclient
|
||||||
from sqlalchemy.exc import IntegrityError
|
from sqlalchemy.exc import IntegrityError
|
||||||
from sqlalchemy.orm.session import Session
|
from sqlalchemy.orm.session import Session
|
||||||
@ -226,10 +226,12 @@ class Window(QMainWindow, Ui_MainWindow):
|
|||||||
self.setupUi(self)
|
self.setupUi(self)
|
||||||
|
|
||||||
self.timer10: QTimer = QTimer()
|
self.timer10: QTimer = QTimer()
|
||||||
|
self.timer100: QTimer = QTimer()
|
||||||
self.timer500: QTimer = QTimer()
|
self.timer500: QTimer = QTimer()
|
||||||
self.timer1000: QTimer = QTimer()
|
self.timer1000: QTimer = QTimer()
|
||||||
|
|
||||||
self.music: music.Music = music.Music()
|
self.music: music.Music = music.Music(name=Config.VLC_MAIN_PLAYER_NAME)
|
||||||
|
self.preview_player: music.Music = music.Music(name=Config.VLC_PREVIEW_PLAYER_NAME)
|
||||||
self.playing: bool = False
|
self.playing: bool = False
|
||||||
|
|
||||||
self.set_main_window_size()
|
self.set_main_window_size()
|
||||||
@ -239,11 +241,6 @@ class Window(QMainWindow, Ui_MainWindow):
|
|||||||
self.txtSearch.setHidden(True)
|
self.txtSearch.setHidden(True)
|
||||||
self.statusbar.addWidget(self.txtSearch)
|
self.statusbar.addWidget(self.txtSearch)
|
||||||
self.hide_played_tracks = False
|
self.hide_played_tracks = False
|
||||||
try:
|
|
||||||
mixer.init()
|
|
||||||
except Exception:
|
|
||||||
helpers.show_warning(self, "Fatal error", "Cannot initialise sound device")
|
|
||||||
sys.exit(1)
|
|
||||||
|
|
||||||
self.widgetFadeVolume.hideAxis("bottom")
|
self.widgetFadeVolume.hideAxis("bottom")
|
||||||
self.widgetFadeVolume.hideAxis("left")
|
self.widgetFadeVolume.hideAxis("left")
|
||||||
@ -267,6 +264,7 @@ class Window(QMainWindow, Ui_MainWindow):
|
|||||||
self.disable_selection_timing = False
|
self.disable_selection_timing = False
|
||||||
self.clock_counter = 0
|
self.clock_counter = 0
|
||||||
self.timer10.start(10)
|
self.timer10.start(10)
|
||||||
|
self.timer100.start(100)
|
||||||
self.timer500.start(500)
|
self.timer500.start(500)
|
||||||
self.timer1000.start(1000)
|
self.timer1000.start(1000)
|
||||||
self.signals = MusicMusterSignals()
|
self.signals = MusicMusterSignals()
|
||||||
@ -306,7 +304,7 @@ class Window(QMainWindow, Ui_MainWindow):
|
|||||||
btn.path = cart.path
|
btn.path = cart.path
|
||||||
btn.player = self.music.VLC.media_player_new(cart.path)
|
btn.player = self.music.VLC.media_player_new(cart.path)
|
||||||
if btn.player:
|
if btn.player:
|
||||||
btn.player.audio_set_volume(Config.VOLUME_VLC_DEFAULT)
|
btn.player.audio_set_volume(Config.VLC_VOLUME_DEFAULT)
|
||||||
if cart.enabled:
|
if cart.enabled:
|
||||||
btn.setEnabled(True)
|
btn.setEnabled(True)
|
||||||
btn.pgb.setVisible(True)
|
btn.pgb.setVisible(True)
|
||||||
@ -420,7 +418,7 @@ class Window(QMainWindow, Ui_MainWindow):
|
|||||||
btn.setEnabled(True)
|
btn.setEnabled(True)
|
||||||
# Setting to position 0 doesn't seem to work
|
# Setting to position 0 doesn't seem to work
|
||||||
btn.player = self.music.VLC.media_player_new(btn.path)
|
btn.player = self.music.VLC.media_player_new(btn.path)
|
||||||
btn.player.audio_set_volume(Config.VOLUME_VLC_DEFAULT)
|
btn.player.audio_set_volume(Config.VLC_VOLUME_DEFAULT)
|
||||||
colour = Config.COLOUR_CART_READY
|
colour = Config.COLOUR_CART_READY
|
||||||
btn.setStyleSheet("background-color: " + colour + ";\n")
|
btn.setStyleSheet("background-color: " + colour + ";\n")
|
||||||
btn.pgb.setValue(0)
|
btn.pgb.setValue(0)
|
||||||
@ -583,7 +581,9 @@ class Window(QMainWindow, Ui_MainWindow):
|
|||||||
self.btnDrop3db.clicked.connect(self.drop3db)
|
self.btnDrop3db.clicked.connect(self.drop3db)
|
||||||
self.btnFade.clicked.connect(self.fade)
|
self.btnFade.clicked.connect(self.fade)
|
||||||
self.btnHidePlayed.clicked.connect(self.hide_played)
|
self.btnHidePlayed.clicked.connect(self.hide_played)
|
||||||
|
self.btnPreviewBack.clicked.connect(self.preview_back)
|
||||||
self.btnPreview.clicked.connect(self.preview)
|
self.btnPreview.clicked.connect(self.preview)
|
||||||
|
self.btnPreviewFwd.clicked.connect(self.preview_fwd)
|
||||||
self.btnStop.clicked.connect(self.stop)
|
self.btnStop.clicked.connect(self.stop)
|
||||||
self.hdrCurrentTrack.clicked.connect(self.show_current)
|
self.hdrCurrentTrack.clicked.connect(self.show_current)
|
||||||
self.hdrNextTrack.clicked.connect(self.show_next)
|
self.hdrNextTrack.clicked.connect(self.show_next)
|
||||||
@ -599,6 +599,7 @@ class Window(QMainWindow, Ui_MainWindow):
|
|||||||
|
|
||||||
self.timer10.timeout.connect(self.tick_10ms)
|
self.timer10.timeout.connect(self.tick_10ms)
|
||||||
self.timer500.timeout.connect(self.tick_500ms)
|
self.timer500.timeout.connect(self.tick_500ms)
|
||||||
|
self.timer100.timeout.connect(self.tick_100ms)
|
||||||
self.timer1000.timeout.connect(self.tick_1000ms)
|
self.timer1000.timeout.connect(self.tick_1000ms)
|
||||||
|
|
||||||
def create_playlist(
|
def create_playlist(
|
||||||
@ -716,9 +717,9 @@ class Window(QMainWindow, Ui_MainWindow):
|
|||||||
"""Drop music level by 3db if button checked"""
|
"""Drop music level by 3db if button checked"""
|
||||||
|
|
||||||
if self.btnDrop3db.isChecked():
|
if self.btnDrop3db.isChecked():
|
||||||
self.music.set_volume(Config.VOLUME_VLC_DROP3db, set_default=False)
|
self.music.set_volume(Config.VLC_VOLUME_DROP3db, set_default=False)
|
||||||
else:
|
else:
|
||||||
self.music.set_volume(Config.VOLUME_VLC_DEFAULT, set_default=False)
|
self.music.set_volume(Config.VLC_VOLUME_DEFAULT, set_default=False)
|
||||||
|
|
||||||
def enable_escape(self, enabled: bool) -> None:
|
def enable_escape(self, enabled: bool) -> None:
|
||||||
"""
|
"""
|
||||||
@ -781,21 +782,6 @@ class Window(QMainWindow, Ui_MainWindow):
|
|||||||
|
|
||||||
self.stop_playing(fade=True)
|
self.stop_playing(fade=True)
|
||||||
|
|
||||||
def get_playtime(self) -> int:
|
|
||||||
"""
|
|
||||||
Return number of milliseconds current track has been playing or
|
|
||||||
zero if not playing. The vlc function get_time() only updates 3-4
|
|
||||||
times a second; this function has much better resolution.
|
|
||||||
"""
|
|
||||||
|
|
||||||
if track_sequence.now.track_id is None or track_sequence.now.start_time is None:
|
|
||||||
return 0
|
|
||||||
|
|
||||||
now = dt.datetime.now()
|
|
||||||
track_start = track_sequence.now.start_time
|
|
||||||
elapsed_seconds = (now - track_start).total_seconds()
|
|
||||||
return int(elapsed_seconds * 1000)
|
|
||||||
|
|
||||||
def hide_played(self):
|
def hide_played(self):
|
||||||
"""Toggle hide played tracks"""
|
"""Toggle hide played tracks"""
|
||||||
|
|
||||||
@ -1146,7 +1132,6 @@ class Window(QMainWindow, Ui_MainWindow):
|
|||||||
- Clear next track
|
- Clear next track
|
||||||
- Restore volume if -3dB active
|
- Restore volume if -3dB active
|
||||||
- Play (new) current track.
|
- Play (new) current track.
|
||||||
- Ensure 100% volume
|
|
||||||
- Show closing volume graph
|
- Show closing volume graph
|
||||||
- Notify model
|
- Notify model
|
||||||
- Note that track is now playing
|
- Note that track is now playing
|
||||||
@ -1204,20 +1189,6 @@ class Window(QMainWindow, Ui_MainWindow):
|
|||||||
return
|
return
|
||||||
self.music.play(track_sequence.now.path, position)
|
self.music.play(track_sequence.now.path, position)
|
||||||
|
|
||||||
# Ensure 100% volume
|
|
||||||
# For as-yet unknown reasons. sometimes the volume gets
|
|
||||||
# reset to zero within 200mS or so of starting play. This
|
|
||||||
# only happened since moving to Debian 12, which uses
|
|
||||||
# Pipewire for sound (which may be irrelevant).
|
|
||||||
for _ in range(3):
|
|
||||||
if self.music.player:
|
|
||||||
volume = self.music.player.audio_get_volume()
|
|
||||||
if volume < Config.VOLUME_VLC_DEFAULT:
|
|
||||||
self.music.set_volume()
|
|
||||||
log.debug(f"Reset from {volume=}")
|
|
||||||
break
|
|
||||||
sleep(0.1)
|
|
||||||
|
|
||||||
# Show closing volume graph
|
# Show closing volume graph
|
||||||
if track_sequence.now.fade_graph:
|
if track_sequence.now.fade_graph:
|
||||||
track_sequence.now.fade_graph.plot()
|
track_sequence.now.fade_graph.plot()
|
||||||
@ -1251,9 +1222,7 @@ class Window(QMainWindow, Ui_MainWindow):
|
|||||||
|
|
||||||
def preview(self) -> None:
|
def preview(self) -> None:
|
||||||
"""
|
"""
|
||||||
Preview selected or next track. We use a different mechanism to
|
Preview selected or next track.
|
||||||
normal track playing so that the user can route the output audio
|
|
||||||
differently (eg, to headphones).
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
if self.btnPreview.isChecked():
|
if self.btnPreview.isChecked():
|
||||||
@ -1265,11 +1234,21 @@ class Window(QMainWindow, Ui_MainWindow):
|
|||||||
if not track_path:
|
if not track_path:
|
||||||
self.btnPreview.setChecked(False)
|
self.btnPreview.setChecked(False)
|
||||||
return
|
return
|
||||||
mixer.music.load(track_path)
|
self.preview_player.play(path=track_path)
|
||||||
mixer.music.play()
|
|
||||||
|
|
||||||
else:
|
else:
|
||||||
mixer.music.stop()
|
self.preview_player.stop()
|
||||||
|
self.label_intro_timer.setText("0.0")
|
||||||
|
|
||||||
|
def preview_back(self) -> None:
|
||||||
|
"""Wind back preview file"""
|
||||||
|
|
||||||
|
self.preview_player.move_back(Config.PREVIEW_BACK_MS)
|
||||||
|
|
||||||
|
def preview_fwd(self) -> None:
|
||||||
|
"""Advance preview file"""
|
||||||
|
|
||||||
|
self.preview_player.move_forward(Config.PREVIEW_ADVANCE_MS)
|
||||||
|
|
||||||
def rename_playlist(self) -> None:
|
def rename_playlist(self) -> None:
|
||||||
"""
|
"""
|
||||||
@ -1678,14 +1657,24 @@ class Window(QMainWindow, Ui_MainWindow):
|
|||||||
# Update carts
|
# Update carts
|
||||||
# self.cart_tick()
|
# self.cart_tick()
|
||||||
|
|
||||||
|
def tick_100ms(self) -> None:
|
||||||
|
"""
|
||||||
|
Called every 100ms
|
||||||
|
"""
|
||||||
|
|
||||||
|
# Ensure preview button is reset if preview finishes playing
|
||||||
|
self.btnPreview.setChecked(self.preview_player.is_playing())
|
||||||
|
|
||||||
|
# Update preview timer
|
||||||
|
if self.preview_player.is_playing():
|
||||||
|
playtime = self.preview_player.get_playtime()
|
||||||
|
self.label_intro_timer.setText(f"{playtime / 1000:.1f}")
|
||||||
|
|
||||||
def tick_1000ms(self) -> None:
|
def tick_1000ms(self) -> None:
|
||||||
"""
|
"""
|
||||||
Called every 1000ms
|
Called every 1000ms
|
||||||
"""
|
"""
|
||||||
|
|
||||||
# Ensure preview button is reset if preview finishes playing
|
|
||||||
self.btnPreview.setChecked(mixer.music.get_busy())
|
|
||||||
|
|
||||||
# Only update play clocks once a second so that their updates
|
# Only update play clocks once a second so that their updates
|
||||||
# are synchronised (otherwise it looks odd)
|
# are synchronised (otherwise it looks odd)
|
||||||
|
|
||||||
@ -1693,20 +1682,8 @@ class Window(QMainWindow, Ui_MainWindow):
|
|||||||
return
|
return
|
||||||
|
|
||||||
# If track is playing, update track clocks time and colours
|
# If track is playing, update track clocks time and colours
|
||||||
# There is a discrete time between starting playing a track and
|
if self.music.player and self.music.player.is_playing():
|
||||||
# player.is_playing() returning True, so assume playing if less
|
playtime = self.player.get_playtime()
|
||||||
# than Config.PLAY_SETTLE microseconds have passed since
|
|
||||||
# starting play.
|
|
||||||
if (
|
|
||||||
self.music.player
|
|
||||||
and track_sequence.now.start_time
|
|
||||||
and (
|
|
||||||
self.music.player.is_playing()
|
|
||||||
or (dt.datetime.now() - track_sequence.now.start_time)
|
|
||||||
< dt.timedelta(microseconds=Config.PLAY_SETTLE)
|
|
||||||
)
|
|
||||||
):
|
|
||||||
playtime = self.get_playtime()
|
|
||||||
time_to_fade = track_sequence.now.fade_at - playtime
|
time_to_fade = track_sequence.now.fade_at - playtime
|
||||||
time_to_silence = track_sequence.now.silence_at - playtime
|
time_to_silence = track_sequence.now.silence_at - playtime
|
||||||
|
|
||||||
|
|||||||
@ -229,10 +229,16 @@ padding-left: 8px;</string>
|
|||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QFrame" name="frame_2">
|
<widget class="QFrame" name="frame_2">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>131</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>230</width>
|
<width>230</width>
|
||||||
<height>16777215</height>
|
<height>131</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="frameShape">
|
<property name="frameShape">
|
||||||
@ -241,13 +247,13 @@ padding-left: 8px;</string>
|
|||||||
<property name="frameShadow">
|
<property name="frameShadow">
|
||||||
<enum>QFrame::Raised</enum>
|
<enum>QFrame::Raised</enum>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout_2">
|
<layout class="QVBoxLayout" name="verticalLayout_10">
|
||||||
<item row="0" column="0">
|
<item>
|
||||||
<widget class="QLabel" name="lblTOD">
|
<widget class="QLabel" name="lblTOD">
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>208</width>
|
<width>208</width>
|
||||||
<height>109</height>
|
<height>0</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="font">
|
<property name="font">
|
||||||
@ -263,6 +269,27 @@ padding-left: 8px;</string>
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_elapsed_timer">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>FreeSans</family>
|
||||||
|
<pointsize>18</pointsize>
|
||||||
|
<weight>50</weight>
|
||||||
|
<bold>false</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">color: black;</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>00:00 / 00:00</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@ -435,20 +462,220 @@ padding-left: 8px;</string>
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_elapsed_timer">
|
<widget class="QGroupBox" name="groupBoxIntroControls">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>132</width>
|
||||||
|
<height>46</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>132</width>
|
||||||
|
<height>46</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="title">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<widget class="QPushButton" name="btnPreviewStart">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>44</width>
|
||||||
|
<height>23</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>44</width>
|
||||||
|
<height>23</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>44</width>
|
||||||
|
<height>23</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string><<</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QPushButton" name="btnIntroArm">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>44</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>44</width>
|
||||||
|
<height>23</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>44</width>
|
||||||
|
<height>23</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>44</width>
|
||||||
|
<height>23</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>o</string>
|
||||||
|
</property>
|
||||||
|
<property name="checkable">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QPushButton" name="btnPreviewEnd">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>88</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>44</width>
|
||||||
|
<height>23</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>44</width>
|
||||||
|
<height>23</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>44</width>
|
||||||
|
<height>23</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>>></string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QPushButton" name="btnPreviewBack">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>23</y>
|
||||||
|
<width>44</width>
|
||||||
|
<height>23</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>44</width>
|
||||||
|
<height>23</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>44</width>
|
||||||
|
<height>23</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string><</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QPushButton" name="btnPreviewMark">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>44</x>
|
||||||
|
<y>23</y>
|
||||||
|
<width>44</width>
|
||||||
|
<height>23</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>44</width>
|
||||||
|
<height>23</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>44</width>
|
||||||
|
<height>23</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>*</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QPushButton" name="btnPreviewFwd">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>88</x>
|
||||||
|
<y>23</y>
|
||||||
|
<width>44</width>
|
||||||
|
<height>23</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>44</width>
|
||||||
|
<height>23</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>44</width>
|
||||||
|
<height>23</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>></string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QFrame" name="frame_intro">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>152</width>
|
||||||
|
<height>112</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true"/>
|
||||||
|
</property>
|
||||||
|
<property name="frameShape">
|
||||||
|
<enum>QFrame::StyledPanel</enum>
|
||||||
|
</property>
|
||||||
|
<property name="frameShadow">
|
||||||
|
<enum>QFrame::Raised</enum>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_9">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_7">
|
||||||
|
<property name="text">
|
||||||
|
<string>Intro</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_intro_timer">
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
<family>FreeSans</family>
|
<family>FreeSans</family>
|
||||||
<pointsize>18</pointsize>
|
<pointsize>40</pointsize>
|
||||||
<weight>50</weight>
|
<weight>50</weight>
|
||||||
<bold>false</bold>
|
<bold>false</bold>
|
||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="styleSheet">
|
|
||||||
<string notr="true">color: black;</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>00:00 / 00:00</string>
|
<string>0:0</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="alignment">
|
<property name="alignment">
|
||||||
<set>Qt::AlignCenter</set>
|
<set>Qt::AlignCenter</set>
|
||||||
@ -592,46 +819,36 @@ padding-left: 8px;</string>
|
|||||||
<property name="frameShadow">
|
<property name="frameShadow">
|
||||||
<enum>QFrame::Raised</enum>
|
<enum>QFrame::Raised</enum>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QLabel" name="label_5">
|
<layout class="QVBoxLayout" name="verticalLayout_7">
|
||||||
<property name="geometry">
|
<item>
|
||||||
<rect>
|
<widget class="QLabel" name="label_5">
|
||||||
<x>10</x>
|
<property name="text">
|
||||||
<y>10</y>
|
<string>Silent</string>
|
||||||
<width>45</width>
|
</property>
|
||||||
<height>24</height>
|
<property name="alignment">
|
||||||
</rect>
|
<set>Qt::AlignCenter</set>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
</widget>
|
||||||
<string>Silent</string>
|
</item>
|
||||||
</property>
|
<item>
|
||||||
<property name="alignment">
|
<widget class="QLabel" name="label_silent_timer">
|
||||||
<set>Qt::AlignCenter</set>
|
<property name="font">
|
||||||
</property>
|
<font>
|
||||||
</widget>
|
<family>FreeSans</family>
|
||||||
<widget class="QLabel" name="label_silent_timer">
|
<pointsize>40</pointsize>
|
||||||
<property name="geometry">
|
<weight>50</weight>
|
||||||
<rect>
|
<bold>false</bold>
|
||||||
<x>10</x>
|
</font>
|
||||||
<y>48</y>
|
</property>
|
||||||
<width>132</width>
|
<property name="text">
|
||||||
<height>54</height>
|
<string>00:00</string>
|
||||||
</rect>
|
</property>
|
||||||
</property>
|
<property name="alignment">
|
||||||
<property name="font">
|
<set>Qt::AlignCenter</set>
|
||||||
<font>
|
</property>
|
||||||
<family>FreeSans</family>
|
</widget>
|
||||||
<pointsize>40</pointsize>
|
</item>
|
||||||
<weight>50</weight>
|
</layout>
|
||||||
<bold>false</bold>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>00:00</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
@ -661,7 +878,7 @@ padding-left: 8px;</string>
|
|||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>151</width>
|
<width>151</width>
|
||||||
<height>16777215</height>
|
<height>112</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="frameShape">
|
<property name="frameShape">
|
||||||
@ -812,7 +1029,7 @@ padding-left: 8px;</string>
|
|||||||
<action name="actionPlay_next">
|
<action name="actionPlay_next">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset>
|
<iconset>
|
||||||
<normaloff>../../../../.designer/backup/icon-play.png</normaloff>../../../../.designer/backup/icon-play.png</iconset>
|
<normaloff>../../../../../../.designer/backup/icon-play.png</normaloff>../../../../../../.designer/backup/icon-play.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>&Play next</string>
|
<string>&Play next</string>
|
||||||
@ -836,7 +1053,7 @@ padding-left: 8px;</string>
|
|||||||
<action name="actionInsertTrack">
|
<action name="actionInsertTrack">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset>
|
<iconset>
|
||||||
<normaloff>../../../../.designer/backup/icon_search_database.png</normaloff>../../../../.designer/backup/icon_search_database.png</iconset>
|
<normaloff>../../../../../../.designer/backup/icon_search_database.png</normaloff>../../../../../../.designer/backup/icon_search_database.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Insert &track...</string>
|
<string>Insert &track...</string>
|
||||||
@ -848,7 +1065,7 @@ padding-left: 8px;</string>
|
|||||||
<action name="actionAdd_file">
|
<action name="actionAdd_file">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset>
|
<iconset>
|
||||||
<normaloff>../../../../.designer/backup/icon_open_file.png</normaloff>../../../../.designer/backup/icon_open_file.png</iconset>
|
<normaloff>../../../../../../.designer/backup/icon_open_file.png</normaloff>../../../../../../.designer/backup/icon_open_file.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Add &file</string>
|
<string>Add &file</string>
|
||||||
@ -860,7 +1077,7 @@ padding-left: 8px;</string>
|
|||||||
<action name="actionFade">
|
<action name="actionFade">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset>
|
<iconset>
|
||||||
<normaloff>../../../../.designer/backup/icon-fade.png</normaloff>../../../../.designer/backup/icon-fade.png</iconset>
|
<normaloff>../../../../../../.designer/backup/icon-fade.png</normaloff>../../../../../../.designer/backup/icon-fade.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>F&ade</string>
|
<string>F&ade</string>
|
||||||
|
|||||||
@ -132,20 +132,32 @@ class Ui_MainWindow(object):
|
|||||||
self.verticalLayout.addWidget(self.hdrNextTrack)
|
self.verticalLayout.addWidget(self.hdrNextTrack)
|
||||||
self.horizontalLayout_3.addLayout(self.verticalLayout)
|
self.horizontalLayout_3.addLayout(self.verticalLayout)
|
||||||
self.frame_2 = QtWidgets.QFrame(parent=self.centralwidget)
|
self.frame_2 = QtWidgets.QFrame(parent=self.centralwidget)
|
||||||
self.frame_2.setMaximumSize(QtCore.QSize(230, 16777215))
|
self.frame_2.setMinimumSize(QtCore.QSize(0, 131))
|
||||||
|
self.frame_2.setMaximumSize(QtCore.QSize(230, 131))
|
||||||
self.frame_2.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel)
|
self.frame_2.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel)
|
||||||
self.frame_2.setFrameShadow(QtWidgets.QFrame.Shadow.Raised)
|
self.frame_2.setFrameShadow(QtWidgets.QFrame.Shadow.Raised)
|
||||||
self.frame_2.setObjectName("frame_2")
|
self.frame_2.setObjectName("frame_2")
|
||||||
self.gridLayout_2 = QtWidgets.QGridLayout(self.frame_2)
|
self.verticalLayout_10 = QtWidgets.QVBoxLayout(self.frame_2)
|
||||||
self.gridLayout_2.setObjectName("gridLayout_2")
|
self.verticalLayout_10.setObjectName("verticalLayout_10")
|
||||||
self.lblTOD = QtWidgets.QLabel(parent=self.frame_2)
|
self.lblTOD = QtWidgets.QLabel(parent=self.frame_2)
|
||||||
self.lblTOD.setMinimumSize(QtCore.QSize(208, 109))
|
self.lblTOD.setMinimumSize(QtCore.QSize(208, 0))
|
||||||
font = QtGui.QFont()
|
font = QtGui.QFont()
|
||||||
font.setPointSize(35)
|
font.setPointSize(35)
|
||||||
self.lblTOD.setFont(font)
|
self.lblTOD.setFont(font)
|
||||||
self.lblTOD.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter)
|
self.lblTOD.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter)
|
||||||
self.lblTOD.setObjectName("lblTOD")
|
self.lblTOD.setObjectName("lblTOD")
|
||||||
self.gridLayout_2.addWidget(self.lblTOD, 0, 0, 1, 1)
|
self.verticalLayout_10.addWidget(self.lblTOD)
|
||||||
|
self.label_elapsed_timer = QtWidgets.QLabel(parent=self.frame_2)
|
||||||
|
font = QtGui.QFont()
|
||||||
|
font.setFamily("FreeSans")
|
||||||
|
font.setPointSize(18)
|
||||||
|
font.setBold(False)
|
||||||
|
font.setWeight(50)
|
||||||
|
self.label_elapsed_timer.setFont(font)
|
||||||
|
self.label_elapsed_timer.setStyleSheet("color: black;")
|
||||||
|
self.label_elapsed_timer.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter)
|
||||||
|
self.label_elapsed_timer.setObjectName("label_elapsed_timer")
|
||||||
|
self.verticalLayout_10.addWidget(self.label_elapsed_timer)
|
||||||
self.horizontalLayout_3.addWidget(self.frame_2)
|
self.horizontalLayout_3.addWidget(self.frame_2)
|
||||||
self.gridLayout_4.addLayout(self.horizontalLayout_3, 0, 0, 1, 1)
|
self.gridLayout_4.addLayout(self.horizontalLayout_3, 0, 0, 1, 1)
|
||||||
self.frame_4 = QtWidgets.QFrame(parent=self.centralwidget)
|
self.frame_4 = QtWidgets.QFrame(parent=self.centralwidget)
|
||||||
@ -211,18 +223,67 @@ class Ui_MainWindow(object):
|
|||||||
self.btnPreview.setCheckable(True)
|
self.btnPreview.setCheckable(True)
|
||||||
self.btnPreview.setObjectName("btnPreview")
|
self.btnPreview.setObjectName("btnPreview")
|
||||||
self.verticalLayout_4.addWidget(self.btnPreview)
|
self.verticalLayout_4.addWidget(self.btnPreview)
|
||||||
self.label_elapsed_timer = QtWidgets.QLabel(parent=self.FadeStopInfoFrame)
|
self.groupBoxIntroControls = QtWidgets.QGroupBox(parent=self.FadeStopInfoFrame)
|
||||||
|
self.groupBoxIntroControls.setMinimumSize(QtCore.QSize(132, 46))
|
||||||
|
self.groupBoxIntroControls.setMaximumSize(QtCore.QSize(132, 46))
|
||||||
|
self.groupBoxIntroControls.setTitle("")
|
||||||
|
self.groupBoxIntroControls.setObjectName("groupBoxIntroControls")
|
||||||
|
self.btnPreviewStart = QtWidgets.QPushButton(parent=self.groupBoxIntroControls)
|
||||||
|
self.btnPreviewStart.setGeometry(QtCore.QRect(0, 0, 44, 23))
|
||||||
|
self.btnPreviewStart.setMinimumSize(QtCore.QSize(44, 23))
|
||||||
|
self.btnPreviewStart.setMaximumSize(QtCore.QSize(44, 23))
|
||||||
|
self.btnPreviewStart.setObjectName("btnPreviewStart")
|
||||||
|
self.btnIntroArm = QtWidgets.QPushButton(parent=self.groupBoxIntroControls)
|
||||||
|
self.btnIntroArm.setGeometry(QtCore.QRect(44, 0, 44, 23))
|
||||||
|
self.btnIntroArm.setMinimumSize(QtCore.QSize(44, 23))
|
||||||
|
self.btnIntroArm.setMaximumSize(QtCore.QSize(44, 23))
|
||||||
|
self.btnIntroArm.setCheckable(True)
|
||||||
|
self.btnIntroArm.setObjectName("btnIntroArm")
|
||||||
|
self.btnPreviewEnd = QtWidgets.QPushButton(parent=self.groupBoxIntroControls)
|
||||||
|
self.btnPreviewEnd.setGeometry(QtCore.QRect(88, 0, 44, 23))
|
||||||
|
self.btnPreviewEnd.setMinimumSize(QtCore.QSize(44, 23))
|
||||||
|
self.btnPreviewEnd.setMaximumSize(QtCore.QSize(44, 23))
|
||||||
|
self.btnPreviewEnd.setObjectName("btnPreviewEnd")
|
||||||
|
self.btnPreviewBack = QtWidgets.QPushButton(parent=self.groupBoxIntroControls)
|
||||||
|
self.btnPreviewBack.setGeometry(QtCore.QRect(0, 23, 44, 23))
|
||||||
|
self.btnPreviewBack.setMinimumSize(QtCore.QSize(44, 23))
|
||||||
|
self.btnPreviewBack.setMaximumSize(QtCore.QSize(44, 23))
|
||||||
|
self.btnPreviewBack.setObjectName("btnPreviewBack")
|
||||||
|
self.btnPreviewMark = QtWidgets.QPushButton(parent=self.groupBoxIntroControls)
|
||||||
|
self.btnPreviewMark.setGeometry(QtCore.QRect(44, 23, 44, 23))
|
||||||
|
self.btnPreviewMark.setMinimumSize(QtCore.QSize(44, 23))
|
||||||
|
self.btnPreviewMark.setMaximumSize(QtCore.QSize(44, 23))
|
||||||
|
self.btnPreviewMark.setObjectName("btnPreviewMark")
|
||||||
|
self.btnPreviewFwd = QtWidgets.QPushButton(parent=self.groupBoxIntroControls)
|
||||||
|
self.btnPreviewFwd.setGeometry(QtCore.QRect(88, 23, 44, 23))
|
||||||
|
self.btnPreviewFwd.setMinimumSize(QtCore.QSize(44, 23))
|
||||||
|
self.btnPreviewFwd.setMaximumSize(QtCore.QSize(44, 23))
|
||||||
|
self.btnPreviewFwd.setObjectName("btnPreviewFwd")
|
||||||
|
self.verticalLayout_4.addWidget(self.groupBoxIntroControls)
|
||||||
|
self.horizontalLayout.addWidget(self.FadeStopInfoFrame)
|
||||||
|
self.frame_intro = QtWidgets.QFrame(parent=self.InfoFooterFrame)
|
||||||
|
self.frame_intro.setMinimumSize(QtCore.QSize(152, 112))
|
||||||
|
self.frame_intro.setStyleSheet("")
|
||||||
|
self.frame_intro.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel)
|
||||||
|
self.frame_intro.setFrameShadow(QtWidgets.QFrame.Shadow.Raised)
|
||||||
|
self.frame_intro.setObjectName("frame_intro")
|
||||||
|
self.verticalLayout_9 = QtWidgets.QVBoxLayout(self.frame_intro)
|
||||||
|
self.verticalLayout_9.setObjectName("verticalLayout_9")
|
||||||
|
self.label_7 = QtWidgets.QLabel(parent=self.frame_intro)
|
||||||
|
self.label_7.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter)
|
||||||
|
self.label_7.setObjectName("label_7")
|
||||||
|
self.verticalLayout_9.addWidget(self.label_7)
|
||||||
|
self.label_intro_timer = QtWidgets.QLabel(parent=self.frame_intro)
|
||||||
font = QtGui.QFont()
|
font = QtGui.QFont()
|
||||||
font.setFamily("FreeSans")
|
font.setFamily("FreeSans")
|
||||||
font.setPointSize(18)
|
font.setPointSize(40)
|
||||||
font.setBold(False)
|
font.setBold(False)
|
||||||
font.setWeight(50)
|
font.setWeight(50)
|
||||||
self.label_elapsed_timer.setFont(font)
|
self.label_intro_timer.setFont(font)
|
||||||
self.label_elapsed_timer.setStyleSheet("color: black;")
|
self.label_intro_timer.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter)
|
||||||
self.label_elapsed_timer.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter)
|
self.label_intro_timer.setObjectName("label_intro_timer")
|
||||||
self.label_elapsed_timer.setObjectName("label_elapsed_timer")
|
self.verticalLayout_9.addWidget(self.label_intro_timer)
|
||||||
self.verticalLayout_4.addWidget(self.label_elapsed_timer)
|
self.horizontalLayout.addWidget(self.frame_intro)
|
||||||
self.horizontalLayout.addWidget(self.FadeStopInfoFrame)
|
|
||||||
self.frame_toggleplayed_3db = QtWidgets.QFrame(parent=self.InfoFooterFrame)
|
self.frame_toggleplayed_3db = QtWidgets.QFrame(parent=self.InfoFooterFrame)
|
||||||
self.frame_toggleplayed_3db.setMinimumSize(QtCore.QSize(152, 112))
|
self.frame_toggleplayed_3db.setMinimumSize(QtCore.QSize(152, 112))
|
||||||
self.frame_toggleplayed_3db.setMaximumSize(QtCore.QSize(184, 16777215))
|
self.frame_toggleplayed_3db.setMaximumSize(QtCore.QSize(184, 16777215))
|
||||||
@ -273,12 +334,13 @@ class Ui_MainWindow(object):
|
|||||||
self.frame_silent.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel)
|
self.frame_silent.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel)
|
||||||
self.frame_silent.setFrameShadow(QtWidgets.QFrame.Shadow.Raised)
|
self.frame_silent.setFrameShadow(QtWidgets.QFrame.Shadow.Raised)
|
||||||
self.frame_silent.setObjectName("frame_silent")
|
self.frame_silent.setObjectName("frame_silent")
|
||||||
|
self.verticalLayout_7 = QtWidgets.QVBoxLayout(self.frame_silent)
|
||||||
|
self.verticalLayout_7.setObjectName("verticalLayout_7")
|
||||||
self.label_5 = QtWidgets.QLabel(parent=self.frame_silent)
|
self.label_5 = QtWidgets.QLabel(parent=self.frame_silent)
|
||||||
self.label_5.setGeometry(QtCore.QRect(10, 10, 45, 24))
|
|
||||||
self.label_5.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter)
|
self.label_5.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter)
|
||||||
self.label_5.setObjectName("label_5")
|
self.label_5.setObjectName("label_5")
|
||||||
|
self.verticalLayout_7.addWidget(self.label_5)
|
||||||
self.label_silent_timer = QtWidgets.QLabel(parent=self.frame_silent)
|
self.label_silent_timer = QtWidgets.QLabel(parent=self.frame_silent)
|
||||||
self.label_silent_timer.setGeometry(QtCore.QRect(10, 48, 132, 54))
|
|
||||||
font = QtGui.QFont()
|
font = QtGui.QFont()
|
||||||
font.setFamily("FreeSans")
|
font.setFamily("FreeSans")
|
||||||
font.setPointSize(40)
|
font.setPointSize(40)
|
||||||
@ -287,6 +349,7 @@ class Ui_MainWindow(object):
|
|||||||
self.label_silent_timer.setFont(font)
|
self.label_silent_timer.setFont(font)
|
||||||
self.label_silent_timer.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter)
|
self.label_silent_timer.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter)
|
||||||
self.label_silent_timer.setObjectName("label_silent_timer")
|
self.label_silent_timer.setObjectName("label_silent_timer")
|
||||||
|
self.verticalLayout_7.addWidget(self.label_silent_timer)
|
||||||
self.horizontalLayout.addWidget(self.frame_silent)
|
self.horizontalLayout.addWidget(self.frame_silent)
|
||||||
self.widgetFadeVolume = PlotWidget(parent=self.InfoFooterFrame)
|
self.widgetFadeVolume = PlotWidget(parent=self.InfoFooterFrame)
|
||||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Preferred, QtWidgets.QSizePolicy.Policy.Preferred)
|
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Preferred, QtWidgets.QSizePolicy.Policy.Preferred)
|
||||||
@ -299,7 +362,7 @@ class Ui_MainWindow(object):
|
|||||||
self.horizontalLayout.addWidget(self.widgetFadeVolume)
|
self.horizontalLayout.addWidget(self.widgetFadeVolume)
|
||||||
self.frame = QtWidgets.QFrame(parent=self.InfoFooterFrame)
|
self.frame = QtWidgets.QFrame(parent=self.InfoFooterFrame)
|
||||||
self.frame.setMinimumSize(QtCore.QSize(151, 0))
|
self.frame.setMinimumSize(QtCore.QSize(151, 0))
|
||||||
self.frame.setMaximumSize(QtCore.QSize(151, 16777215))
|
self.frame.setMaximumSize(QtCore.QSize(151, 112))
|
||||||
self.frame.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel)
|
self.frame.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel)
|
||||||
self.frame.setFrameShadow(QtWidgets.QFrame.Shadow.Raised)
|
self.frame.setFrameShadow(QtWidgets.QFrame.Shadow.Raised)
|
||||||
self.frame.setObjectName("frame")
|
self.frame.setObjectName("frame")
|
||||||
@ -343,7 +406,7 @@ class Ui_MainWindow(object):
|
|||||||
MainWindow.setStatusBar(self.statusbar)
|
MainWindow.setStatusBar(self.statusbar)
|
||||||
self.actionPlay_next = QtGui.QAction(parent=MainWindow)
|
self.actionPlay_next = QtGui.QAction(parent=MainWindow)
|
||||||
icon4 = QtGui.QIcon()
|
icon4 = QtGui.QIcon()
|
||||||
icon4.addPixmap(QtGui.QPixmap("app/ui/../../../../.designer/backup/icon-play.png"), QtGui.QIcon.Mode.Normal, QtGui.QIcon.State.Off)
|
icon4.addPixmap(QtGui.QPixmap("app/ui/../../../../../../.designer/backup/icon-play.png"), QtGui.QIcon.Mode.Normal, QtGui.QIcon.State.Off)
|
||||||
self.actionPlay_next.setIcon(icon4)
|
self.actionPlay_next.setIcon(icon4)
|
||||||
self.actionPlay_next.setObjectName("actionPlay_next")
|
self.actionPlay_next.setObjectName("actionPlay_next")
|
||||||
self.actionSkipToNext = QtGui.QAction(parent=MainWindow)
|
self.actionSkipToNext = QtGui.QAction(parent=MainWindow)
|
||||||
@ -353,17 +416,17 @@ class Ui_MainWindow(object):
|
|||||||
self.actionSkipToNext.setObjectName("actionSkipToNext")
|
self.actionSkipToNext.setObjectName("actionSkipToNext")
|
||||||
self.actionInsertTrack = QtGui.QAction(parent=MainWindow)
|
self.actionInsertTrack = QtGui.QAction(parent=MainWindow)
|
||||||
icon6 = QtGui.QIcon()
|
icon6 = QtGui.QIcon()
|
||||||
icon6.addPixmap(QtGui.QPixmap("app/ui/../../../../.designer/backup/icon_search_database.png"), QtGui.QIcon.Mode.Normal, QtGui.QIcon.State.Off)
|
icon6.addPixmap(QtGui.QPixmap("app/ui/../../../../../../.designer/backup/icon_search_database.png"), QtGui.QIcon.Mode.Normal, QtGui.QIcon.State.Off)
|
||||||
self.actionInsertTrack.setIcon(icon6)
|
self.actionInsertTrack.setIcon(icon6)
|
||||||
self.actionInsertTrack.setObjectName("actionInsertTrack")
|
self.actionInsertTrack.setObjectName("actionInsertTrack")
|
||||||
self.actionAdd_file = QtGui.QAction(parent=MainWindow)
|
self.actionAdd_file = QtGui.QAction(parent=MainWindow)
|
||||||
icon7 = QtGui.QIcon()
|
icon7 = QtGui.QIcon()
|
||||||
icon7.addPixmap(QtGui.QPixmap("app/ui/../../../../.designer/backup/icon_open_file.png"), QtGui.QIcon.Mode.Normal, QtGui.QIcon.State.Off)
|
icon7.addPixmap(QtGui.QPixmap("app/ui/../../../../../../.designer/backup/icon_open_file.png"), QtGui.QIcon.Mode.Normal, QtGui.QIcon.State.Off)
|
||||||
self.actionAdd_file.setIcon(icon7)
|
self.actionAdd_file.setIcon(icon7)
|
||||||
self.actionAdd_file.setObjectName("actionAdd_file")
|
self.actionAdd_file.setObjectName("actionAdd_file")
|
||||||
self.actionFade = QtGui.QAction(parent=MainWindow)
|
self.actionFade = QtGui.QAction(parent=MainWindow)
|
||||||
icon8 = QtGui.QIcon()
|
icon8 = QtGui.QIcon()
|
||||||
icon8.addPixmap(QtGui.QPixmap("app/ui/../../../../.designer/backup/icon-fade.png"), QtGui.QIcon.Mode.Normal, QtGui.QIcon.State.Off)
|
icon8.addPixmap(QtGui.QPixmap("app/ui/../../../../../../.designer/backup/icon-fade.png"), QtGui.QIcon.Mode.Normal, QtGui.QIcon.State.Off)
|
||||||
self.actionFade.setIcon(icon8)
|
self.actionFade.setIcon(icon8)
|
||||||
self.actionFade.setObjectName("actionFade")
|
self.actionFade.setObjectName("actionFade")
|
||||||
self.actionStop = QtGui.QAction(parent=MainWindow)
|
self.actionStop = QtGui.QAction(parent=MainWindow)
|
||||||
@ -517,8 +580,16 @@ class Ui_MainWindow(object):
|
|||||||
self.current_track_2.setText(_translate("MainWindow", "Current track:"))
|
self.current_track_2.setText(_translate("MainWindow", "Current track:"))
|
||||||
self.next_track_2.setText(_translate("MainWindow", "Next track:"))
|
self.next_track_2.setText(_translate("MainWindow", "Next track:"))
|
||||||
self.lblTOD.setText(_translate("MainWindow", "00:00:00"))
|
self.lblTOD.setText(_translate("MainWindow", "00:00:00"))
|
||||||
self.btnPreview.setText(_translate("MainWindow", " Preview"))
|
|
||||||
self.label_elapsed_timer.setText(_translate("MainWindow", "00:00 / 00:00"))
|
self.label_elapsed_timer.setText(_translate("MainWindow", "00:00 / 00:00"))
|
||||||
|
self.btnPreview.setText(_translate("MainWindow", " Preview"))
|
||||||
|
self.btnPreviewStart.setText(_translate("MainWindow", "<<"))
|
||||||
|
self.btnIntroArm.setText(_translate("MainWindow", "o"))
|
||||||
|
self.btnPreviewEnd.setText(_translate("MainWindow", ">>"))
|
||||||
|
self.btnPreviewBack.setText(_translate("MainWindow", "<"))
|
||||||
|
self.btnPreviewMark.setText(_translate("MainWindow", "*"))
|
||||||
|
self.btnPreviewFwd.setText(_translate("MainWindow", ">"))
|
||||||
|
self.label_7.setText(_translate("MainWindow", "Intro"))
|
||||||
|
self.label_intro_timer.setText(_translate("MainWindow", "0:0"))
|
||||||
self.btnDrop3db.setText(_translate("MainWindow", "-3dB to talk"))
|
self.btnDrop3db.setText(_translate("MainWindow", "-3dB to talk"))
|
||||||
self.btnHidePlayed.setText(_translate("MainWindow", "Hide played"))
|
self.btnHidePlayed.setText(_translate("MainWindow", "Hide played"))
|
||||||
self.label_4.setText(_translate("MainWindow", "Fade"))
|
self.label_4.setText(_translate("MainWindow", "Fade"))
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user