Eddycrack864 commited on
Commit
2809163
1 Parent(s): dfc1efe

Upload 152 files

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. gui_data/app_size_values.py +121 -0
  2. gui_data/change_log.txt +93 -0
  3. gui_data/complete_chime.wav +0 -0
  4. gui_data/constants.py +1147 -0
  5. gui_data/error_handling.py +106 -0
  6. gui_data/fail_chime.wav +0 -0
  7. gui_data/fonts/centurygothic/GOTHIC.TTF +0 -0
  8. gui_data/fonts/centurygothic/GOTHICB.TTF +0 -0
  9. gui_data/fonts/centurygothic/GOTHICBI.TTF +0 -0
  10. gui_data/fonts/centurygothic/GOTHICI.TTF +0 -0
  11. gui_data/img/File.png +0 -0
  12. gui_data/img/GUI-Icon.ico +0 -0
  13. gui_data/img/GUI-Icon.png +0 -0
  14. gui_data/img/UVR-banner.png +0 -0
  15. gui_data/img/UVR_5_5_0.png +0 -0
  16. gui_data/img/UVR_5_5_1.png +0 -0
  17. gui_data/img/UVR_v5_5_MacOS.png +0 -0
  18. gui_data/img/credits.png +0 -0
  19. gui_data/img/donate.png +0 -0
  20. gui_data/img/download.png +0 -0
  21. gui_data/img/help.png +0 -0
  22. gui_data/img/key.png +0 -0
  23. gui_data/img/pause.png +0 -0
  24. gui_data/img/play.png +0 -0
  25. gui_data/img/splash.bmp +0 -0
  26. gui_data/img/stop.png +0 -0
  27. gui_data/img/stop_player.png +0 -0
  28. gui_data/old_data_check.py +27 -0
  29. gui_data/saved_ensembles/saved_ensembles_go_here.txt +1 -0
  30. gui_data/saved_settings/saved_settings_go_here.txt +1 -0
  31. gui_data/sv_ttk/__init__.py +67 -0
  32. gui_data/sv_ttk/sun-valley.tcl +49 -0
  33. gui_data/sv_ttk/sun-valley_darwin.tcl +49 -0
  34. gui_data/sv_ttk/theme/dark.tcl +540 -0
  35. gui_data/sv_ttk/theme/dark/arrow-down.png +0 -0
  36. gui_data/sv_ttk/theme/dark/arrow-right.png +0 -0
  37. gui_data/sv_ttk/theme/dark/arrow-up.png +0 -0
  38. gui_data/sv_ttk/theme/dark/button-accent-disabled.png +0 -0
  39. gui_data/sv_ttk/theme/dark/button-accent-hover.png +0 -0
  40. gui_data/sv_ttk/theme/dark/button-accent-pressed.png +0 -0
  41. gui_data/sv_ttk/theme/dark/button-accent-rest.png +0 -0
  42. gui_data/sv_ttk/theme/dark/button-close-hover.png +0 -0
  43. gui_data/sv_ttk/theme/dark/button-close-pressed.png +0 -0
  44. gui_data/sv_ttk/theme/dark/button-disabled.png +0 -0
  45. gui_data/sv_ttk/theme/dark/button-hover.png +0 -0
  46. gui_data/sv_ttk/theme/dark/button-pressed.png +0 -0
  47. gui_data/sv_ttk/theme/dark/button-rest.png +0 -0
  48. gui_data/sv_ttk/theme/dark/button-titlebar-hover.png +0 -0
  49. gui_data/sv_ttk/theme/dark/button-titlebar-pressed.png +0 -0
  50. gui_data/sv_ttk/theme/dark/card.png +0 -0
gui_data/app_size_values.py ADDED
@@ -0,0 +1,121 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ from screeninfo import get_monitors
3
+ from PIL import Image
4
+ from PIL import ImageTk
5
+
6
+ def get_screen_height():
7
+ monitors = get_monitors()
8
+ if len(monitors) == 0:
9
+ raise Exception("Failed to get screen height")
10
+ return monitors[0].height
11
+
12
+ SCREEN_SIZE_VALUES = {
13
+ "normal": {
14
+ "credits_img":(100, 100),
15
+ ## App Size
16
+ 'IMAGE_HEIGHT': 140,
17
+ 'FILEPATHS_HEIGHT': 75,
18
+ 'OPTIONS_HEIGHT': 262,
19
+ 'CONVERSIONBUTTON_HEIGHT': 30,
20
+ 'COMMAND_HEIGHT': 141,
21
+ 'PROGRESS_HEIGHT': 25,
22
+ 'PADDING': 7,
23
+ },
24
+ "small": {
25
+ "credits_img":(50, 50),
26
+ ## App Size
27
+ 'IMAGE_HEIGHT': 135,
28
+ 'FILEPATHS_HEIGHT': 85,
29
+ 'OPTIONS_HEIGHT': 274,
30
+ 'CONVERSIONBUTTON_HEIGHT': 35,
31
+ 'COMMAND_HEIGHT': 80,
32
+ 'PROGRESS_HEIGHT': 6,
33
+ 'PADDING': 5,
34
+ },
35
+ "medium": {
36
+ "credits_img":(50, 50),
37
+ ## App Size
38
+ 'IMAGE_HEIGHT': 135,
39
+ 'FILEPATHS_HEIGHT': 85,
40
+ 'OPTIONS_HEIGHT': 274,
41
+ 'CONVERSIONBUTTON_HEIGHT': 20,
42
+ 'COMMAND_HEIGHT': 115,
43
+ 'PROGRESS_HEIGHT': 9,
44
+ 'PADDING': 7,
45
+ },
46
+ }
47
+
48
+
49
+ try:
50
+ if get_screen_height() >= 900:
51
+ determined_size = SCREEN_SIZE_VALUES["normal"]
52
+ elif get_screen_height() <= 720:
53
+ determined_size = SCREEN_SIZE_VALUES["small"]
54
+ else:
55
+ determined_size = SCREEN_SIZE_VALUES["medium"]
56
+ except:
57
+ determined_size = SCREEN_SIZE_VALUES["normal"]
58
+
59
+ class ImagePath():
60
+ def __init__(self, base_path):
61
+
62
+ img_path = os.path.join(base_path, 'gui_data', 'img')
63
+ credits_path = os.path.join(img_path, 'credits.png')
64
+ donate_path = os.path.join(img_path, 'donate.png')
65
+ download_path = os.path.join(img_path, 'download.png')
66
+ efile_path = os.path.join(img_path, 'File.png')
67
+ help_path = os.path.join(img_path, 'help.png')
68
+ key_path = os.path.join(img_path, 'key.png')
69
+ stop_path = os.path.join(img_path, 'stop.png')
70
+ play_path = os.path.join(img_path, 'play.png')
71
+ pause_path = os.path.join(img_path, 'pause.png')
72
+ self.banner_path = os.path.join(img_path, 'UVR-banner.png')
73
+
74
+ self.efile_img = self.open_image(path=efile_path,size=(20, 20))
75
+ self.stop_img = self.open_image(path=stop_path, size=(20, 20))
76
+ self.play_img = self.open_image(path=play_path, size=(20, 20))
77
+ self.pause_img = self.open_image(path=pause_path, size=(20, 20))
78
+ self.help_img = self.open_image(path=help_path, size=(20, 20))
79
+ self.download_img = self.open_image(path=download_path, size=(30, 30))
80
+ self.donate_img = self.open_image(path=donate_path, size=(30, 30))
81
+ self.key_img = self.open_image(path=key_path, size=(30, 30))
82
+ self.credits_img = self.open_image(path=credits_path, size=determined_size["credits_img"])
83
+
84
+ def open_image(self, path: str, size: tuple = None, keep_aspect: bool = True, rotate: int = 0) -> ImageTk.PhotoImage:
85
+ """
86
+ Open the image on the path and apply given settings\n
87
+ Paramaters:
88
+ path(str):
89
+ Absolute path of the image
90
+ size(tuple):
91
+ first value - width
92
+ second value - height
93
+ keep_aspect(bool):
94
+ keep aspect ratio of image and resize
95
+ to maximum possible width and height
96
+ (maxima are given by size)
97
+ rotate(int):
98
+ clockwise rotation of image
99
+ Returns(ImageTk.PhotoImage):
100
+ Image of path
101
+ """
102
+ img = Image.open(path).convert(mode='RGBA')
103
+ ratio = img.height/img.width
104
+ img = img.rotate(angle=-rotate)
105
+ if size is not None:
106
+ size = (int(size[0]), int(size[1]))
107
+ if keep_aspect:
108
+ img = img.resize((size[0], int(size[0] * ratio)), Image.ANTIALIAS)
109
+ else:
110
+ img = img.resize(size, Image.ANTIALIAS)
111
+
112
+ return ImageTk.PhotoImage(img)
113
+
114
+ class AdjustedValues():
115
+ IMAGE_HEIGHT = determined_size["IMAGE_HEIGHT"]
116
+ FILEPATHS_HEIGHT = determined_size["FILEPATHS_HEIGHT"]
117
+ OPTIONS_HEIGHT = determined_size["OPTIONS_HEIGHT"]
118
+ CONVERSIONBUTTON_HEIGHT = determined_size["CONVERSIONBUTTON_HEIGHT"]
119
+ COMMAND_HEIGHT = determined_size["COMMAND_HEIGHT"]
120
+ PROGRESS_HEIGHT = determined_size["PROGRESS_HEIGHT"]
121
+ PADDING = determined_size["PADDING"]
gui_data/change_log.txt ADDED
@@ -0,0 +1,93 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Most Recent Changes:
2
+
3
+ ~ Fixed Download Center model list issue.
4
+ ~ Fixed audio clip in ensemble mode.
5
+ ~ Fixed output model name issue in ensemble mode.
6
+ ~ Added "Batch Mode" for MDX-Net to increase performance.
7
+ ~ Batch Mode is more memory efficient.
8
+ ~ Batch Mode produces the best output, regardless of batch size.
9
+ ~ Added Batch Mode for VR Architecture.
10
+ ~ Added Mixer Mode for Demucs.
11
+ ~ This option may improve separation for some 4-stem models.
12
+
13
+ Fixes & Changes going from UVR v5.4 to v5.5:
14
+
15
+ ~ The progress bar is now fully synced up with every process in the application.
16
+ ~ Fixed low-resolution icon.
17
+ ~ Added the ability to download models manually if the application can't connect
18
+ to the internet.
19
+ ~ Drag-n-drop is functional across all os platforms.
20
+ ~ Resolved mp3 tag issue in MacOS version.
21
+
22
+ Performance:
23
+
24
+ ~ Model load times are faster.
25
+ ~ Importing/exporting audio files is faster.
26
+
27
+ MacOS M1 Notes:
28
+
29
+ ~ The GPU Conversion checkbox will enable MPS for GPU acceleration. However,
30
+ only the VR Architecture models are currently compatible with it.
31
+
32
+ New Options:
33
+
34
+ ~ Select Saved Settings option - Allows the user to save the current settings
35
+ of the whole application. You can also load a saved setting or reset them to
36
+ the default.
37
+ ~ Right-click menu - Allows for quick access to important options.
38
+ ~ Help Hints option - When enabled, users can hover over options to see a pop-up
39
+ text that describes that option. The right-clicking option also allows copying
40
+ the "Help Hint" text.
41
+ ~ Secondary Model Mode - This option is an expanded version of the "Demucs Model"
42
+ option that was only available to MDX-Net. Except now, this option is available
43
+ in all three AI Networks and for any stem. Any model can now be Secondary, and
44
+ the user can choose the amount of influence it has on the final result.
45
+ ~ Robust caching for ensemble mode, allowing for much faster processing times.
46
+ ~ Clicking the "Input" field will pop up a window allowing the user to review the selected audio inputs. Within this menu, users can:
47
+ ~ Remove inputs.
48
+ ~ Verify inputs.
49
+ ~ Create samples of chosen inputs.
50
+ ~ "Sample Mode" option - Allows the user to process only part of a track to sample
51
+ settings or a model without running a full conversion.
52
+ ~ The number in the parentheses is the current number of seconds the generated
53
+ sample will be.
54
+ ~ You can choose the number of seconds to extract from the track in the "Additional
55
+ Settings" menu.
56
+
57
+ VR Architecture:
58
+
59
+ ~ Ability to toggle "High-End Processing."
60
+ ~ Ability to change the post-processing threshold.
61
+ ~ Support for the latest VR architecture
62
+ ~ Crop Size and Batch Size are specifically for models using the latest
63
+ architecture only.
64
+
65
+ MDX-NET:
66
+
67
+ ~ Denoise Output option results in cleaner results,
68
+ but the processing time will be longer. This option has replaced Noise Reduction.
69
+ ~ Spectral Inversion option uses spectral inversion techniques for a
70
+ cleaner secondary stem result. This option may slow down the audio export process.
71
+ ~ Secondary stem now has the same frequency cut-off as the main stem.
72
+
73
+ Demucs:
74
+
75
+ ~ Demucs v4 models are now supported, including the 6-stem model.
76
+ ~ Ability to combine remaining stems instead of inverting selected stem with the
77
+ mixture only when a user does not select "All Stems".
78
+ ~ A Pre-process model that allows the user to run an inference through a robust
79
+ vocal or instrumental model and separate the remaining stems from its generated
80
+ instrumental mix. This option can significantly reduce vocal bleed in other
81
+ Demucs-generated non-vocal stems.
82
+ ~ The Pre-process model is intended for Demucs separations for all stems except
83
+ vocals and instrumentals.
84
+
85
+ Ensemble Mode:
86
+
87
+ ~ Ensemble Mode has been extended to include the following:
88
+ ~ Averaging is a new algorithm that averages the final results.
89
+ ~ Unlimited models in the ensemble.
90
+ ~ Ability to save different ensembles.
91
+ ~ Ability to ensemble outputs for all individual stem types.
92
+ ~ Ability to choose unique ensemble algorithms.
93
+ ~ Ability to ensemble all 4 Demucs stems at once.
gui_data/complete_chime.wav ADDED
Binary file (357 kB). View file
 
gui_data/constants.py ADDED
@@ -0,0 +1,1147 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import platform
2
+
3
+ #Platform Details
4
+ OPERATING_SYSTEM = platform.system()
5
+ SYSTEM_ARCH = platform.platform()
6
+ SYSTEM_PROC = platform.processor()
7
+ ARM = 'arm'
8
+
9
+ #Main Font
10
+ MAIN_FONT_NAME = "Century Gothic"
11
+
12
+ #Model Types
13
+ VR_ARCH_TYPE = 'VR Arc'
14
+ MDX_ARCH_TYPE = 'MDX-Net'
15
+ DEMUCS_ARCH_TYPE = 'Demucs'
16
+ VR_ARCH_PM = 'VR Architecture'
17
+ ENSEMBLE_MODE = 'Ensemble Mode'
18
+ ENSEMBLE_STEM_CHECK = 'Ensemble Stem'
19
+ SECONDARY_MODEL = 'Secondary Model'
20
+ DEMUCS_6_STEM_MODEL = 'htdemucs_6s'
21
+
22
+ DEMUCS_V3_ARCH_TYPE = 'Demucs v3'
23
+ DEMUCS_V4_ARCH_TYPE = 'Demucs v4'
24
+ DEMUCS_NEWER_ARCH_TYPES = [DEMUCS_V3_ARCH_TYPE, DEMUCS_V4_ARCH_TYPE]
25
+
26
+ DEMUCS_V1 = 'v1'
27
+ DEMUCS_V2 = 'v2'
28
+ DEMUCS_V3 = 'v3'
29
+ DEMUCS_V4 = 'v4'
30
+
31
+ DEMUCS_V1_TAG = 'v1 | '
32
+ DEMUCS_V2_TAG = 'v2 | '
33
+ DEMUCS_V3_TAG = 'v3 | '
34
+ DEMUCS_V4_TAG = 'v4 | '
35
+ DEMUCS_NEWER_TAGS = [DEMUCS_V3_TAG, DEMUCS_V4_TAG]
36
+
37
+ DEMUCS_VERSION_MAPPER = {
38
+ DEMUCS_V1:DEMUCS_V1_TAG,
39
+ DEMUCS_V2:DEMUCS_V2_TAG,
40
+ DEMUCS_V3:DEMUCS_V3_TAG,
41
+ DEMUCS_V4:DEMUCS_V4_TAG}
42
+
43
+ #Download Center
44
+ DOWNLOAD_FAILED = 'Download Failed'
45
+ DOWNLOAD_STOPPED = 'Download Stopped'
46
+ DOWNLOAD_COMPLETE = 'Download Complete'
47
+ DOWNLOAD_UPDATE_COMPLETE = 'Update Download Complete'
48
+ SETTINGS_MENU_EXIT = 'exit'
49
+ NO_CONNECTION = 'No Internet Connection'
50
+ VIP_SELECTION = 'VIP:'
51
+ DEVELOPER_SELECTION = 'VIP:'
52
+ NO_NEW_MODELS = 'All Available Models Downloaded'
53
+ ENSEMBLE_PARTITION = ': '
54
+ NO_MODEL = 'No Model Selected'
55
+ CHOOSE_MODEL = 'Choose Model'
56
+ SINGLE_DOWNLOAD = 'Downloading Item 1/1...'
57
+ DOWNLOADING_ITEM = 'Downloading Item'
58
+ FILE_EXISTS = 'File already exists!'
59
+ DOWNLOADING_UPDATE = 'Downloading Update...'
60
+ DOWNLOAD_MORE = 'Download More Models'
61
+
62
+ #Menu Options
63
+
64
+ AUTO_SELECT = 'Auto'
65
+
66
+ #LINKS
67
+ DOWNLOAD_CHECKS = "https://raw.githubusercontent.com/TRvlvr/application_data/main/filelists/download_checks.json"
68
+ MDX_MODEL_DATA_LINK = "https://raw.githubusercontent.com/TRvlvr/application_data/main/mdx_model_data/model_data.json"
69
+ VR_MODEL_DATA_LINK = "https://raw.githubusercontent.com/TRvlvr/application_data/main/vr_model_data/model_data.json"
70
+
71
+ DEMUCS_MODEL_NAME_DATA_LINK = "https://raw.githubusercontent.com/TRvlvr/application_data/main/demucs_model_data/model_name_mapper.json"
72
+ MDX_MODEL_NAME_DATA_LINK = "https://raw.githubusercontent.com/TRvlvr/application_data/main/mdx_model_data/model_name_mapper.json"
73
+
74
+ DONATE_LINK_BMAC = "https://www.buymeacoffee.com/uvr5"
75
+ DONATE_LINK_PATREON = "https://www.patreon.com/uvr"
76
+
77
+ #DOWNLOAD REPOS
78
+ NORMAL_REPO = "https://github.com/TRvlvr/model_repo/releases/download/all_public_uvr_models/"
79
+ UPDATE_REPO = "https://github.com/TRvlvr/model_repo/releases/download/uvr_update_patches/"
80
+
81
+ UPDATE_MAC_ARM_REPO = "https://github.com/Anjok07/ultimatevocalremovergui/releases/download/v5.5.0/Ultimate_Vocal_Remover_v5_5_MacOS_arm64.dmg"
82
+ UPDATE_MAC_X86_64_REPO = "https://github.com/Anjok07/ultimatevocalremovergui/releases/download/v5.5.0/Ultimate_Vocal_Remover_v5_5_MacOS_x86_64.dmg"
83
+ UPDATE_LINUX_REPO = "https://github.com/Anjok07/ultimatevocalremovergui#linux-installation"
84
+ UPDATE_REPO = "https://github.com/TRvlvr/model_repo/releases/download/uvr_update_patches/"
85
+
86
+ ISSUE_LINK = 'https://github.com/Anjok07/ultimatevocalremovergui/issues/new'
87
+ VIP_REPO = b'\xf3\xc2W\x19\x1foI)\xc2\xa9\xcc\xb67(Z\xf5',\
88
+ b'gAAAAABjQAIQ-NpNMMxMedpKHHb7ze_nqB05hw0YhbOy3pFzuzDrfqumn8_qvraxEoUpZC5ZXC0gGvfDxFMqyq9VWbYKlA67SUFI_wZB6QoVyGI581vs7kaGfUqlXHIdDS6tQ_U-BfjbEAK9EU_74-R2zXjz8Xzekw=='
89
+ NO_CODE = 'incorrect_code'
90
+
91
+ #Extensions
92
+
93
+ ONNX = '.onnx'
94
+ CKPT = '.ckpt'
95
+ YAML = '.yaml'
96
+ PTH = '.pth'
97
+ TH_EXT = '.th'
98
+ JSON = '.json'
99
+
100
+ #GUI Buttons
101
+
102
+ START_PROCESSING = 'Start Processing'
103
+ WAIT_PROCESSING = 'Please wait...'
104
+ STOP_PROCESSING = 'Halting process, please wait...'
105
+ LOADING_MODELS = 'Loading models...'
106
+
107
+ #---Messages and Logs----
108
+
109
+ MISSING_MODEL = 'missing'
110
+ MODEL_PRESENT = 'present'
111
+
112
+ UNRECOGNIZED_MODEL = 'Unrecognized Model Detected', ' is an unrecognized model.\n\n' + \
113
+ 'Would you like to select the correct parameters before continuing?'
114
+
115
+ STOP_PROCESS_CONFIRM = 'Confirmation', 'You are about to stop all active processes.\n\nAre you sure you wish to continue?'
116
+ NO_ENSEMBLE_SELECTED = 'No Models Selected', 'Please select ensemble and try again.'
117
+ PICKLE_CORRU = 'File Corrupted', 'Unable to load this ensemble.\n\n' + \
118
+ 'Would you like to remove this ensemble from your list?'
119
+ DELETE_ENS_ENTRY = 'Confirm Removal', 'Are you sure you want to remove this entry?'
120
+
121
+ ALL_STEMS = 'All Stems'
122
+ VOCAL_STEM = 'Vocals'
123
+ INST_STEM = 'Instrumental'
124
+ OTHER_STEM = 'Other'
125
+ BASS_STEM = 'Bass'
126
+ DRUM_STEM = 'Drums'
127
+ GUITAR_STEM = 'Guitar'
128
+ PIANO_STEM = 'Piano'
129
+ SYNTH_STEM = 'Synthesizer'
130
+ STRINGS_STEM = 'Strings'
131
+ WOODWINDS_STEM = 'Woodwinds'
132
+ BRASS_STEM = 'Brass'
133
+ WIND_INST_STEM = 'Wind Inst'
134
+ NO_OTHER_STEM = 'No Other'
135
+ NO_BASS_STEM = 'No Bass'
136
+ NO_DRUM_STEM = 'No Drums'
137
+ NO_GUITAR_STEM = 'No Guitar'
138
+ NO_PIANO_STEM = 'No Piano'
139
+ NO_SYNTH_STEM = 'No Synthesizer'
140
+ NO_STRINGS_STEM = 'No Strings'
141
+ NO_WOODWINDS_STEM = 'No Woodwinds'
142
+ NO_WIND_INST_STEM = 'No Wind Inst'
143
+ NO_BRASS_STEM = 'No Brass'
144
+ PRIMARY_STEM = 'Primary Stem'
145
+ SECONDARY_STEM = 'Secondary Stem'
146
+
147
+ #Other Constants
148
+ DEMUCS_2_SOURCE = ["instrumental", "vocals"]
149
+ DEMUCS_4_SOURCE = ["drums", "bass", "other", "vocals"]
150
+
151
+ DEMUCS_2_SOURCE_MAPPER = {
152
+ INST_STEM: 0,
153
+ VOCAL_STEM: 1}
154
+
155
+ DEMUCS_4_SOURCE_MAPPER = {
156
+ BASS_STEM: 0,
157
+ DRUM_STEM: 1,
158
+ OTHER_STEM: 2,
159
+ VOCAL_STEM: 3}
160
+
161
+ DEMUCS_6_SOURCE_MAPPER = {
162
+ BASS_STEM: 0,
163
+ DRUM_STEM: 1,
164
+ OTHER_STEM: 2,
165
+ VOCAL_STEM: 3,
166
+ GUITAR_STEM:4,
167
+ PIANO_STEM:5}
168
+
169
+ DEMUCS_4_SOURCE_LIST = [BASS_STEM, DRUM_STEM, OTHER_STEM, VOCAL_STEM]
170
+ DEMUCS_6_SOURCE_LIST = [BASS_STEM, DRUM_STEM, OTHER_STEM, VOCAL_STEM, GUITAR_STEM, PIANO_STEM]
171
+
172
+ DEMUCS_UVR_MODEL = 'UVR_Model'
173
+
174
+ CHOOSE_STEM_PAIR = 'Choose Stem Pair'
175
+
176
+ STEM_SET_MENU = (VOCAL_STEM,
177
+ INST_STEM,
178
+ OTHER_STEM,
179
+ BASS_STEM,
180
+ DRUM_STEM,
181
+ GUITAR_STEM,
182
+ PIANO_STEM,
183
+ SYNTH_STEM,
184
+ STRINGS_STEM,
185
+ WOODWINDS_STEM,
186
+ BRASS_STEM,
187
+ WIND_INST_STEM,
188
+ NO_OTHER_STEM,
189
+ NO_BASS_STEM,
190
+ NO_DRUM_STEM,
191
+ NO_GUITAR_STEM,
192
+ NO_PIANO_STEM,
193
+ NO_SYNTH_STEM,
194
+ NO_STRINGS_STEM,
195
+ NO_WOODWINDS_STEM,
196
+ NO_BRASS_STEM,
197
+ NO_WIND_INST_STEM)
198
+
199
+ STEM_PAIR_MAPPER = {
200
+ VOCAL_STEM: INST_STEM,
201
+ INST_STEM: VOCAL_STEM,
202
+ OTHER_STEM: NO_OTHER_STEM,
203
+ BASS_STEM: NO_BASS_STEM,
204
+ DRUM_STEM: NO_DRUM_STEM,
205
+ GUITAR_STEM: NO_GUITAR_STEM,
206
+ PIANO_STEM: NO_PIANO_STEM,
207
+ SYNTH_STEM: NO_SYNTH_STEM,
208
+ STRINGS_STEM: NO_STRINGS_STEM,
209
+ WOODWINDS_STEM: NO_WOODWINDS_STEM,
210
+ BRASS_STEM: NO_BRASS_STEM,
211
+ WIND_INST_STEM: NO_WIND_INST_STEM,
212
+ NO_OTHER_STEM: OTHER_STEM,
213
+ NO_BASS_STEM: BASS_STEM,
214
+ NO_DRUM_STEM: DRUM_STEM,
215
+ NO_GUITAR_STEM: GUITAR_STEM,
216
+ NO_PIANO_STEM: PIANO_STEM,
217
+ NO_SYNTH_STEM: SYNTH_STEM,
218
+ NO_STRINGS_STEM: STRINGS_STEM,
219
+ NO_WOODWINDS_STEM: WOODWINDS_STEM,
220
+ NO_BRASS_STEM: BRASS_STEM,
221
+ NO_WIND_INST_STEM: WIND_INST_STEM,
222
+ PRIMARY_STEM: SECONDARY_STEM}
223
+
224
+ NON_ACCOM_STEMS = (
225
+ VOCAL_STEM,
226
+ OTHER_STEM,
227
+ BASS_STEM,
228
+ DRUM_STEM,
229
+ GUITAR_STEM,
230
+ PIANO_STEM,
231
+ SYNTH_STEM,
232
+ STRINGS_STEM,
233
+ WOODWINDS_STEM,
234
+ BRASS_STEM,
235
+ WIND_INST_STEM)
236
+
237
+ MDX_NET_FREQ_CUT = [VOCAL_STEM, INST_STEM]
238
+
239
+ DEMUCS_4_STEM_OPTIONS = (ALL_STEMS, VOCAL_STEM, OTHER_STEM, BASS_STEM, DRUM_STEM)
240
+ DEMUCS_6_STEM_OPTIONS = (ALL_STEMS, VOCAL_STEM, OTHER_STEM, BASS_STEM, DRUM_STEM, GUITAR_STEM, PIANO_STEM)
241
+ DEMUCS_2_STEM_OPTIONS = (VOCAL_STEM, INST_STEM)
242
+ DEMUCS_4_STEM_CHECK = (OTHER_STEM, BASS_STEM, DRUM_STEM)
243
+
244
+ #Menu Dropdowns
245
+
246
+ VOCAL_PAIR = f'{VOCAL_STEM}/{INST_STEM}'
247
+ INST_PAIR = f'{INST_STEM}/{VOCAL_STEM}'
248
+ OTHER_PAIR = f'{OTHER_STEM}/{NO_OTHER_STEM}'
249
+ DRUM_PAIR = f'{DRUM_STEM}/{NO_DRUM_STEM}'
250
+ BASS_PAIR = f'{BASS_STEM}/{NO_BASS_STEM}'
251
+ FOUR_STEM_ENSEMBLE = '4 Stem Ensemble'
252
+
253
+ ENSEMBLE_MAIN_STEM = (CHOOSE_STEM_PAIR, VOCAL_PAIR, OTHER_PAIR, DRUM_PAIR, BASS_PAIR, FOUR_STEM_ENSEMBLE)
254
+
255
+ MIN_SPEC = 'Min Spec'
256
+ MAX_SPEC = 'Max Spec'
257
+ AUDIO_AVERAGE = 'Average'
258
+
259
+ MAX_MIN = f'{MAX_SPEC}/{MIN_SPEC}'
260
+ MAX_MAX = f'{MAX_SPEC}/{MAX_SPEC}'
261
+ MAX_AVE = f'{MAX_SPEC}/{AUDIO_AVERAGE}'
262
+ MIN_MAX = f'{MIN_SPEC}/{MAX_SPEC}'
263
+ MIN_MIX = f'{MIN_SPEC}/{MIN_SPEC}'
264
+ MIN_AVE = f'{MIN_SPEC}/{AUDIO_AVERAGE}'
265
+ AVE_MAX = f'{AUDIO_AVERAGE}/{MAX_SPEC}'
266
+ AVE_MIN = f'{AUDIO_AVERAGE}/{MIN_SPEC}'
267
+ AVE_AVE = f'{AUDIO_AVERAGE}/{AUDIO_AVERAGE}'
268
+
269
+ ENSEMBLE_TYPE = (MAX_MIN, MAX_MAX, MAX_AVE, MIN_MAX, MIN_MIX, MIN_AVE, AVE_MAX, AVE_MIN, AVE_AVE)
270
+ ENSEMBLE_TYPE_4_STEM = (MAX_SPEC, MIN_SPEC, AUDIO_AVERAGE)
271
+
272
+ BATCH_MODE = 'Batch Mode'
273
+ BETA_VERSION = 'BETA'
274
+ DEF_OPT = 'Default'
275
+
276
+ CHUNKS = (AUTO_SELECT, '1', '5', '10', '15', '20',
277
+ '25', '30', '35', '40', '45', '50',
278
+ '55', '60', '65', '70', '75', '80',
279
+ '85', '90', '95', 'Full')
280
+
281
+ BATCH_SIZE = (DEF_OPT, '2', '3', '4', '5',
282
+ '6', '7', '8', '9', '10')
283
+
284
+ VOL_COMPENSATION = (AUTO_SELECT, '1.035', '1.08')
285
+
286
+ MARGIN_SIZE = ('44100', '22050', '11025')
287
+
288
+ AUDIO_TOOLS = 'Audio Tools'
289
+
290
+ MANUAL_ENSEMBLE = 'Manual Ensemble'
291
+ TIME_STRETCH = 'Time Stretch'
292
+ CHANGE_PITCH = 'Change Pitch'
293
+ ALIGN_INPUTS = 'Align Inputs'
294
+
295
+ if OPERATING_SYSTEM == 'Windows' or OPERATING_SYSTEM == 'Darwin':
296
+ AUDIO_TOOL_OPTIONS = (MANUAL_ENSEMBLE, TIME_STRETCH, CHANGE_PITCH, ALIGN_INPUTS)
297
+ else:
298
+ AUDIO_TOOL_OPTIONS = (MANUAL_ENSEMBLE, ALIGN_INPUTS)
299
+
300
+ MANUAL_ENSEMBLE_OPTIONS = (MIN_SPEC, MAX_SPEC, AUDIO_AVERAGE)
301
+
302
+ PROCESS_METHODS = (VR_ARCH_PM, MDX_ARCH_TYPE, DEMUCS_ARCH_TYPE, ENSEMBLE_MODE, AUDIO_TOOLS)
303
+
304
+ DEMUCS_SEGMENTS = ('Default', '1', '5', '10', '15', '20',
305
+ '25', '30', '35', '40', '45', '50',
306
+ '55', '60', '65', '70', '75', '80',
307
+ '85', '90', '95', '100')
308
+
309
+ DEMUCS_SHIFTS = (0, 1, 2, 3, 4, 5,
310
+ 6, 7, 8, 9, 10, 11,
311
+ 12, 13, 14, 15, 16, 17,
312
+ 18, 19, 20)
313
+
314
+ DEMUCS_OVERLAP = (0.25, 0.50, 0.75, 0.99)
315
+
316
+ VR_AGGRESSION = (1, 2, 3, 4, 5,
317
+ 6, 7, 8, 9, 10, 11,
318
+ 12, 13, 14, 15, 16, 17,
319
+ 18, 19, 20)
320
+
321
+ VR_WINDOW = ('320', '512','1024')
322
+ VR_CROP = ('256', '512', '1024')
323
+ POST_PROCESSES_THREASHOLD_VALUES = ('0.1', '0.2', '0.3')
324
+
325
+ MDX_POP_PRO = ('MDX-NET_Noise_Profile_14_kHz', 'MDX-NET_Noise_Profile_17_kHz', 'MDX-NET_Noise_Profile_Full_Band')
326
+ MDX_POP_STEMS = ('Vocals', 'Instrumental', 'Other', 'Drums', 'Bass')
327
+ MDX_POP_NFFT = ('4096', '5120', '6144', '7680', '8192', '16384')
328
+ MDX_POP_DIMF = ('2048', '3072', '4096')
329
+
330
+ SAVE_ENSEMBLE = 'Save Ensemble'
331
+ CLEAR_ENSEMBLE = 'Clear Selection(s)'
332
+ MENU_SEPARATOR = 35*'•'
333
+ CHOOSE_ENSEMBLE_OPTION = 'Choose Option'
334
+
335
+ INVALID_ENTRY = 'Invalid Input, Please Try Again'
336
+ ENSEMBLE_INPUT_RULE = '1. Only letters, numbers, spaces, and dashes allowed.\n2. No dashes or spaces at the start or end of input.'
337
+
338
+ ENSEMBLE_OPTIONS = (SAVE_ENSEMBLE, CLEAR_ENSEMBLE)
339
+ ENSEMBLE_CHECK = 'ensemble check'
340
+
341
+ SELECT_SAVED_ENSEMBLE = 'Select Saved Ensemble'
342
+ SELECT_SAVED_SETTING = 'Select Saved Setting'
343
+ ENSEMBLE_OPTION = "Ensemble Customization Options"
344
+ MDX_OPTION = "Advanced MDX-Net Options"
345
+ DEMUCS_OPTION = "Advanced Demucs Options"
346
+ VR_OPTION = "Advanced VR Options"
347
+ HELP_OPTION = "Open Information Guide"
348
+ ERROR_OPTION = "Open Error Log"
349
+ VERIFY_BEGIN = 'Verifying file '
350
+ SAMPLE_BEGIN = 'Creating Sample '
351
+ MODEL_MISSING_CHECK = 'Model Missing:'
352
+
353
+ # Audio Player
354
+
355
+ PLAYING_SONG = ": Playing"
356
+ PAUSE_SONG = ": Paused"
357
+ STOP_SONG = ": Stopped"
358
+
359
+ SELECTED_VER = 'Selected'
360
+ DETECTED_VER = 'Detected'
361
+
362
+ SAMPLE_MODE_CHECKBOX = lambda v:f'Sample Mode ({v}s)'
363
+ REMOVED_FILES = lambda r, e:f'Audio Input Verification Report:\n\nRemoved Files:\n\n{r}\n\nError Details:\n\n{e}'
364
+ ADVANCED_SETTINGS = (ENSEMBLE_OPTION, MDX_OPTION, DEMUCS_OPTION, VR_OPTION, HELP_OPTION, ERROR_OPTION)
365
+
366
+ WAV = 'WAV'
367
+ FLAC = 'FLAC'
368
+ MP3 = 'MP3'
369
+
370
+ MP3_BIT_RATES = ('96k', '128k', '160k', '224k', '256k', '320k')
371
+ WAV_TYPE = ('PCM_U8', 'PCM_16', 'PCM_24', 'PCM_32', '32-bit Float', '64-bit Float')
372
+
373
+ SELECT_SAVED_SET = 'Choose Option'
374
+ SAVE_SETTINGS = 'Save Current Settings'
375
+ RESET_TO_DEFAULT = 'Reset to Default'
376
+ RESET_FULL_TO_DEFAULT = 'Reset to Default'
377
+ RESET_PM_TO_DEFAULT = 'Reset All Application Settings to Default'
378
+
379
+ SAVE_SET_OPTIONS = (SAVE_SETTINGS, RESET_TO_DEFAULT)
380
+
381
+ TIME_PITCH = ('1.0', '2.0', '3.0', '4.0')
382
+ TIME_TEXT = '_time_stretched'
383
+ PITCH_TEXT = '_pitch_shifted'
384
+
385
+ #RegEx Input Validation
386
+
387
+ REG_PITCH = r'^[-+]?(1[0]|[0-9]([.][0-9]*)?)$'
388
+ REG_TIME = r'^[+]?(1[0]|[0-9]([.][0-9]*)?)$'
389
+ REG_COMPENSATION = r'\b^(1[0]|[0-9]([.][0-9]*)?|Auto|None)$\b'
390
+ REG_THES_POSTPORCESS = r'\b^([0]([.][0-9]{0,6})?)$\b'
391
+ REG_CHUNKS = r'\b^(200|1[0-9][0-9]|[1-9][0-9]?|Auto|Full)$\b'
392
+ REG_CHUNKS_DEMUCS = r'\b^(200|1[0-9][0-9]|[1-9][0-9]?|Auto|Full)$\b'
393
+ REG_MARGIN = r'\b^[0-9]*$\b'
394
+ REG_SEGMENTS = r'\b^(200|1[0-9][0-9]|[1-9][0-9]?|Default)$\b'
395
+ REG_SAVE_INPUT = r'\b^([a-zA-Z0-9 -]{0,25})$\b'
396
+ REG_AGGRESSION = r'^[-+]?[0-9]\d*?$'
397
+ REG_WINDOW = r'\b^[0-9]{0,4}$\b'
398
+ REG_SHIFTS = r'\b^[0-9]*$\b'
399
+ REG_BATCHES = r'\b^([0-9]*?|Default)$\b'
400
+ REG_OVERLAP = r'\b^([0]([.][0-9]{0,6})?|None)$\b'
401
+
402
+ # Sub Menu
403
+
404
+ VR_ARCH_SETTING_LOAD = 'Load for VR Arch'
405
+ MDX_SETTING_LOAD = 'Load for MDX-Net'
406
+ DEMUCS_SETTING_LOAD = 'Load for Demucs'
407
+ ALL_ARCH_SETTING_LOAD = 'Load for Full Application'
408
+
409
+ # Mappers
410
+
411
+ DEFAULT_DATA = {
412
+
413
+ 'chosen_process_method': MDX_ARCH_TYPE,
414
+ 'vr_model': CHOOSE_MODEL,
415
+ 'aggression_setting': 10,
416
+ 'window_size': 512,
417
+ 'batch_size': 4,
418
+ 'crop_size': 256,
419
+ 'is_tta': False,
420
+ 'is_output_image': False,
421
+ 'is_post_process': False,
422
+ 'is_high_end_process': False,
423
+ 'post_process_threshold': 0.2,
424
+ 'vr_voc_inst_secondary_model': NO_MODEL,
425
+ 'vr_other_secondary_model': NO_MODEL,
426
+ 'vr_bass_secondary_model': NO_MODEL,
427
+ 'vr_drums_secondary_model': NO_MODEL,
428
+ 'vr_is_secondary_model_activate': False,
429
+ 'vr_voc_inst_secondary_model_scale': 0.9,
430
+ 'vr_other_secondary_model_scale': 0.7,
431
+ 'vr_bass_secondary_model_scale': 0.5,
432
+ 'vr_drums_secondary_model_scale': 0.5,
433
+ 'demucs_model': CHOOSE_MODEL,
434
+ 'demucs_stems': ALL_STEMS,
435
+ 'segment': DEMUCS_SEGMENTS[0],
436
+ 'overlap': DEMUCS_OVERLAP[0],
437
+ 'shifts': 2,
438
+ 'chunks_demucs': CHUNKS[0],
439
+ 'margin_demucs': 44100,
440
+ 'is_chunk_demucs': False,
441
+ 'is_chunk_mdxnet': False,
442
+ 'is_primary_stem_only_Demucs': False,
443
+ 'is_secondary_stem_only_Demucs': False,
444
+ 'is_split_mode': True,
445
+ 'is_demucs_combine_stems': True,
446
+ 'demucs_voc_inst_secondary_model': NO_MODEL,
447
+ 'demucs_other_secondary_model': NO_MODEL,
448
+ 'demucs_bass_secondary_model': NO_MODEL,
449
+ 'demucs_drums_secondary_model': NO_MODEL,
450
+ 'demucs_is_secondary_model_activate': False,
451
+ 'demucs_voc_inst_secondary_model_scale': 0.9,
452
+ 'demucs_other_secondary_model_scale': 0.7,
453
+ 'demucs_bass_secondary_model_scale': 0.5,
454
+ 'demucs_drums_secondary_model_scale': 0.5,
455
+ 'demucs_stems': ALL_STEMS,
456
+ 'demucs_pre_proc_model': NO_MODEL,
457
+ 'is_demucs_pre_proc_model_activate': False,
458
+ 'is_demucs_pre_proc_model_inst_mix': False,
459
+ 'mdx_net_model': CHOOSE_MODEL,
460
+ 'chunks': CHUNKS[0],
461
+ 'margin': 44100,
462
+ 'compensate': AUTO_SELECT,
463
+ 'is_denoise': False,
464
+ 'is_invert_spec': False,
465
+ 'is_mixer_mode': False,
466
+ 'mdx_batch_size': DEF_OPT,
467
+ 'mdx_voc_inst_secondary_model': NO_MODEL,
468
+ 'mdx_other_secondary_model': NO_MODEL,
469
+ 'mdx_bass_secondary_model': NO_MODEL,
470
+ 'mdx_drums_secondary_model': NO_MODEL,
471
+ 'mdx_is_secondary_model_activate': False,
472
+ 'mdx_voc_inst_secondary_model_scale': 0.9,
473
+ 'mdx_other_secondary_model_scale': 0.7,
474
+ 'mdx_bass_secondary_model_scale': 0.5,
475
+ 'mdx_drums_secondary_model_scale': 0.5,
476
+ 'is_save_all_outputs_ensemble': True,
477
+ 'is_append_ensemble_name': False,
478
+ 'chosen_audio_tool': AUDIO_TOOL_OPTIONS[0],
479
+ 'choose_algorithm': MANUAL_ENSEMBLE_OPTIONS[0],
480
+ 'time_stretch_rate': 2.0,
481
+ 'pitch_rate': 2.0,
482
+ 'is_gpu_conversion': False,
483
+ 'is_primary_stem_only': False,
484
+ 'is_secondary_stem_only': False,
485
+ 'is_testing_audio': False,
486
+ 'is_add_model_name': False,
487
+ 'is_accept_any_input': False,
488
+ 'is_task_complete': False,
489
+ 'is_normalization': False,
490
+ 'is_create_model_folder': False,
491
+ 'mp3_bit_set': '320k',
492
+ 'save_format': WAV,
493
+ 'wav_type_set': 'PCM_16',
494
+ 'user_code': '',
495
+ 'export_path': '',
496
+ 'input_paths': [],
497
+ 'lastDir': None,
498
+ 'export_path': '',
499
+ 'model_hash_table': None,
500
+ 'help_hints_var': False,
501
+ 'model_sample_mode': False,
502
+ 'model_sample_mode_duration': 30
503
+ }
504
+
505
+ SETTING_CHECK = ('vr_model',
506
+ 'aggression_setting',
507
+ 'window_size',
508
+ 'batch_size',
509
+ 'crop_size',
510
+ 'is_tta',
511
+ 'is_output_image',
512
+ 'is_post_process',
513
+ 'is_high_end_process',
514
+ 'post_process_threshold',
515
+ 'vr_voc_inst_secondary_model',
516
+ 'vr_other_secondary_model',
517
+ 'vr_bass_secondary_model',
518
+ 'vr_drums_secondary_model',
519
+ 'vr_is_secondary_model_activate',
520
+ 'vr_voc_inst_secondary_model_scale',
521
+ 'vr_other_secondary_model_scale',
522
+ 'vr_bass_secondary_model_scale',
523
+ 'vr_drums_secondary_model_scale',
524
+ 'demucs_model',
525
+ 'segment',
526
+ 'overlap',
527
+ 'shifts',
528
+ 'chunks_demucs',
529
+ 'margin_demucs',
530
+ 'is_chunk_demucs',
531
+ 'is_primary_stem_only_Demucs',
532
+ 'is_secondary_stem_only_Demucs',
533
+ 'is_split_mode',
534
+ 'is_demucs_combine_stems',
535
+ 'demucs_voc_inst_secondary_model',
536
+ 'demucs_other_secondary_model',
537
+ 'demucs_bass_secondary_model',
538
+ 'demucs_drums_secondary_model',
539
+ 'demucs_is_secondary_model_activate',
540
+ 'demucs_voc_inst_secondary_model_scale',
541
+ 'demucs_other_secondary_model_scale',
542
+ 'demucs_bass_secondary_model_scale',
543
+ 'demucs_drums_secondary_model_scale',
544
+ 'demucs_stems',
545
+ 'mdx_net_model',
546
+ 'chunks',
547
+ 'margin',
548
+ 'compensate',
549
+ 'is_denoise',
550
+ 'is_invert_spec',
551
+ 'mdx_batch_size',
552
+ 'mdx_voc_inst_secondary_model',
553
+ 'mdx_other_secondary_model',
554
+ 'mdx_bass_secondary_model',
555
+ 'mdx_drums_secondary_model',
556
+ 'mdx_is_secondary_model_activate',
557
+ 'mdx_voc_inst_secondary_model_scale',
558
+ 'mdx_other_secondary_model_scale',
559
+ 'mdx_bass_secondary_model_scale',
560
+ 'mdx_drums_secondary_model_scale',
561
+ 'is_save_all_outputs_ensemble',
562
+ 'is_append_ensemble_name',
563
+ 'chosen_audio_tool',
564
+ 'choose_algorithm',
565
+ 'time_stretch_rate',
566
+ 'pitch_rate',
567
+ 'is_primary_stem_only',
568
+ 'is_secondary_stem_only',
569
+ 'is_testing_audio',
570
+ 'is_add_model_name',
571
+ "is_accept_any_input",
572
+ 'is_task_complete',
573
+ 'is_create_model_folder',
574
+ 'mp3_bit_set',
575
+ 'save_format',
576
+ 'wav_type_set',
577
+ 'user_code',
578
+ 'is_gpu_conversion',
579
+ 'is_normalization',
580
+ 'help_hints_var',
581
+ 'model_sample_mode',
582
+ 'model_sample_mode_duration')
583
+
584
+ # Message Box Text
585
+
586
+ INVALID_INPUT = 'Invalid Input', 'The input is invalid.\n\nPlease verify the input still exists or is valid and try again.'
587
+ INVALID_EXPORT = 'Invalid Export Directory', 'You have selected an invalid export directory.\n\nPlease make sure the selected directory still exists.'
588
+ INVALID_ENSEMBLE = 'Not Enough Models', 'You must select 2 or more models to run ensemble.'
589
+ INVALID_MODEL = 'No Model Chosen', 'You must select an model to continue.'
590
+ MISSING_MODEL = 'Model Missing', 'The selected model is missing or not valid.'
591
+ ERROR_OCCURED = 'Error Occured', '\n\nWould you like to open the error log for more details?\n'
592
+
593
+ # GUI Text Constants
594
+
595
+ BACK_TO_MAIN_MENU = 'Back to Main Menu'
596
+
597
+ # Help Hint Text
598
+
599
+ INTERNAL_MODEL_ATT = 'Internal model attribute. \n\n ***Do not change this setting if you are unsure!***'
600
+ STOP_HELP = 'Halts any running processes. \n A pop-up window will ask the user to confirm the action.'
601
+ SETTINGS_HELP = 'Opens the main settings guide. This window includes the \"Download Center\"'
602
+ COMMAND_TEXT_HELP = 'Provides information on the progress of the current process.'
603
+ SAVE_CURRENT_SETTINGS_HELP = 'Allows the user to open any saved settings or save the current application settings.'
604
+ CHUNKS_HELP = ('For MDX-Net, all values use the same amount of resources. Using chunks is no longer recommended.\n\n' + \
605
+ '• This option is now only for output quality.\n' + \
606
+ '• Some tracks may fare better depending on the value.\n' + \
607
+ '• Some tracks may fare worse depending on the value.\n' + \
608
+ '• Larger chunk sizes use will take less time to process.\n' +\
609
+ '• Smaller chunk sizes use will take more time to process.\n')
610
+ CHUNKS_DEMUCS_HELP = ('This option allows the user to reduce (or increase) RAM or V-RAM usage.\n\n' + \
611
+ '• Smaller chunk sizes use less RAM or V-RAM but can also increase processing times.\n' + \
612
+ '• Larger chunk sizes use more RAM or V-RAM but can also reduce processing times.\n' + \
613
+ '• Selecting \"Auto\" calculates an appropriate chuck size based on how much RAM or V-RAM your system has.\n' + \
614
+ '• Selecting \"Full\" will process the track as one whole chunk. (not recommended)\n' + \
615
+ '• The default selection is \"Auto\".')
616
+ MARGIN_HELP = 'Selects the frequency margins to slice the chunks from.\n\n• The recommended margin size is 44100.\n• Other values can give unpredictable results.'
617
+ AGGRESSION_SETTING_HELP = ('This option allows you to set how strong the primary stem extraction will be.\n\n' + \
618
+ '• The range is 0-100.\n' + \
619
+ '• Higher values perform deeper extractions.\n' + \
620
+ '• The default is 10 for instrumental & vocal models.\n' + \
621
+ '• Values over 10 can result in muddy-sounding instrumentals for the non-vocal models')
622
+ WINDOW_SIZE_HELP = ('The smaller your window size, the better your conversions will be. \nHowever, a smaller window means longer conversion times and heavier resource usage.\n\n' + \
623
+ 'Breakdown of the selectable window size values:\n' + \
624
+ '• 1024 - Low conversion quality, shortest conversion time, low resource usage.\n' + \
625
+ '• 512 - Average conversion quality, average conversion time, normal resource usage.\n' + \
626
+ '• 320 - Better conversion quality.')
627
+ DEMUCS_STEMS_HELP = ('Here, you can choose which stem to extract using the selected model.\n\n' +\
628
+ 'Stem Selections:\n\n' +\
629
+ '• All Stems - Saves all of the stems the model is able to extract.\n' +\
630
+ '• Vocals - Pulls vocal stem only.\n' +\
631
+ '• Other - Pulls other stem only.\n' +\
632
+ '• Bass - Pulls bass stem only.\n' +\
633
+ '• Drums - Pulls drum stem only.\n')
634
+ SEGMENT_HELP = ('This option allows the user to reduce (or increase) RAM or V-RAM usage.\n\n' + \
635
+ '• Smaller segment sizes use less RAM or V-RAM but can also increase processing times.\n' + \
636
+ '• Larger segment sizes use more RAM or V-RAM but can also reduce processing times.\n' + \
637
+ '• Selecting \"Default\" uses the recommended segment size.\n' + \
638
+ '• It is recommended that you not use segments with \"Chunking\".')
639
+ ENSEMBLE_MAIN_STEM_HELP = 'Allows the user to select the type of stems they wish to ensemble.\n\nOptions:\n\n' +\
640
+ f'• {VOCAL_PAIR} - The primary stem will be the vocals and the secondary stem will be the the instrumental\n' +\
641
+ f'• {OTHER_PAIR} - The primary stem will be other and the secondary stem will be no other (the mixture without the \'other\' stem)\n' +\
642
+ f'• {BASS_PAIR} - The primary stem will be bass and the secondary stem will be no bass (the mixture without the \'bass\' stem)\n' +\
643
+ f'• {DRUM_PAIR} - The primary stem will be drums and the secondary stem will be no drums (the mixture without the \'drums\' stem)\n' +\
644
+ f'• {FOUR_STEM_ENSEMBLE} - This option will gather all the 4 stem Demucs models and ensemble all of the outputs.\n'
645
+ ENSEMBLE_TYPE_HELP = 'Allows the user to select the ensemble algorithm to be used to generate the final output.\n\nExample & Other Note:\n\n' +\
646
+ f'• {MAX_MIN} - If this option is chosen, the primary stem outputs will be processed through \nthe \'Max Spec\' algorithm, and the secondary stem will be processed through the \'Min Spec\' algorithm.\n' +\
647
+ f'• Only a single algorithm will be shown when the \'4 Stem Ensemble\' option is chosen.\n\nAlgorithm Details:\n\n' +\
648
+ f'• {MAX_SPEC} - This algorithm combines the final results and generates the highest possible output from them.\nFor example, if this algorithm were processing vocal stems, you would get the fullest possible \n' +\
649
+ 'result making the ensembled vocal stem sound cleaner. However, it might result in more unwanted artifacts.\n' +\
650
+ f'• {MIN_SPEC} - This algorithm combines the results and generates the lowest possible output from them.\nFor example, if this algorithm were processing instrumental stems, you would get the cleanest possible result \n' +\
651
+ 'result, eliminating more unwanted artifacts. However, the result might also sound \'muddy\' and lack a fuller sound.\n' +\
652
+ f'• {AUDIO_AVERAGE} - This algorithm simply combines the results and averages all of them together. \n'
653
+ ENSEMBLE_LISTBOX_HELP = 'List of the all the models available for the main stem pair selected.'
654
+ IS_GPU_CONVERSION_HELP = ('When checked, the application will attempt to use your GPU (if you have one).\n' +\
655
+ 'If you do not have a GPU but have this checked, the application will default to your CPU.\n\n' +\
656
+ 'Note: CPU conversions are much slower than those processed through the GPU.')
657
+ SAVE_STEM_ONLY_HELP = 'Allows the user to save only the selected stem.'
658
+ IS_NORMALIZATION_HELP = 'Normalizes output to prevent clipping.'
659
+ CROP_SIZE_HELP = '**Only compatible with select models only!**\n\n Setting should match training crop-size value. Leave as is if unsure.'
660
+ IS_TTA_HELP = ('This option performs Test-Time-Augmentation to improve the separation quality.\n\n' +\
661
+ 'Note: Having this selected will increase the time it takes to complete a conversion')
662
+ IS_POST_PROCESS_HELP = ('This option can potentially identify leftover instrumental artifacts within the vocal outputs. \nThis option may improve the separation of some songs.\n\n' +\
663
+ 'Note: Selecting this option can adversely affect the conversion process, depending on the track. Because of this, it is only recommended as a last resort.')
664
+ IS_HIGH_END_PROCESS_HELP = 'The application will mirror the missing frequency range of the output.'
665
+ SHIFTS_HELP = ('Performs multiple predictions with random shifts of the input and averages them.\n\n' +\
666
+ '• The higher number of shifts, the longer the prediction will take. \n- Not recommended unless you have a GPU.')
667
+ OVERLAP_HELP = 'This option controls the amount of overlap between prediction windows (for Demucs one window is 10 seconds)'
668
+ IS_CHUNK_DEMUCS_HELP = '• Enables \"Chunks\".\n• We recommend you not enable this option with \"Split Mode\" enabled or with the Demucs v4 Models.'
669
+ IS_CHUNK_MDX_NET_HELP = '• Enables \"Chunks\".\n• Using this option for MDX-Net no longer effects RAM usage.\n• Having this enabled will effect output quality, for better or worse depending on the set value.'
670
+ IS_SPLIT_MODE_HELP = ('• Enables \"Segments\". \n• We recommend you not enable this option with \"Enable Chunks\".\n' +\
671
+ '• Deselecting this option is only recommended for those with powerful PCs or if using \"Chunk\" mode instead.')
672
+ IS_DEMUCS_COMBINE_STEMS_HELP = 'The application will create the secondary stem by combining the remaining stems \ninstead of inverting the primary stem with the mixture.'
673
+ COMPENSATE_HELP = 'Compensates the audio of the primary stems to allow for a better secondary stem.'
674
+ IS_DENOISE_HELP = '• This option removes a majority of the noise generated by the MDX-Net models.\n• The conversion will take nearly twice as long with this enabled.'
675
+ CLEAR_CACHE_HELP = 'Clears any user selected model settings for previously unrecognized models.'
676
+ IS_SAVE_ALL_OUTPUTS_ENSEMBLE_HELP = 'Enabling this option will keep all indivudual outputs generated by an ensemble.'
677
+ IS_APPEND_ENSEMBLE_NAME_HELP = 'The application will append the ensemble name to the final output \nwhen this option is enabled.'
678
+ DONATE_HELP = 'Takes the user to an external web-site to donate to this project!'
679
+ IS_INVERT_SPEC_HELP = '• This option may produce a better secondary stem.\n• Inverts primary stem with mixture using spectragrams instead of wavforms.\n• This inversion method is slightly slower.'
680
+ IS_MIXER_MODE_HELP = '• This option may improve separations for outputs from 4-stem models.\n• Might produce more noise.\n• This option might slow down separation time.'
681
+ IS_TESTING_AUDIO_HELP = 'Appends a unique 10 digit number to output files so the user \ncan compare results with different settings.'
682
+ IS_MODEL_TESTING_AUDIO_HELP = 'Appends the model name to output files so the user \ncan compare results with different settings.'
683
+ IS_ACCEPT_ANY_INPUT_HELP = 'The application will accept any input when enabled, even if it does not have an audio format extension.\n\nThis is for experimental purposes, and having it enabled is not recommended.'
684
+ IS_TASK_COMPLETE_HELP = 'When enabled, chimes will be heard when a process completes or fails.'
685
+ IS_CREATE_MODEL_FOLDER_HELP = 'Two new directories will be generated for the outputs in \nthe export directory after each conversion.\n\n' +\
686
+ '• First directory - Named after the model.\n' +\
687
+ '• Second directory - Named after the track.\n\n' +\
688
+ '• Example: \n\n' +\
689
+ '─ Export Directory\n' +\
690
+ ' └── First Directory\n' +\
691
+ ' └── Second Directory\n' +\
692
+ ' └── Output File(s)'
693
+ DELETE_YOUR_SETTINGS_HELP = 'This menu contains your saved settings. You will be asked to \nconfirm if you wish to delete the selected setting.'
694
+ SET_STEM_NAME_HELP = 'Choose the primary stem for the selected model.'
695
+ MDX_DIM_T_SET_HELP = INTERNAL_MODEL_ATT
696
+ MDX_DIM_F_SET_HELP = INTERNAL_MODEL_ATT
697
+ MDX_N_FFT_SCALE_SET_HELP = 'Set the N_FFT size the model was trained with.'
698
+ POPUP_COMPENSATE_HELP = f'Choose the appropriate voluem compensattion for the selected model\n\nReminder: {COMPENSATE_HELP}'
699
+ VR_MODEL_PARAM_HELP = 'Choose the parameters needed to run the selected model.'
700
+ CHOSEN_ENSEMBLE_HELP = 'Select saved enselble or save current ensemble.\n\nDefault Selections:\n\n• Save the current ensemble.\n• Clears all current model selections.'
701
+ CHOSEN_PROCESS_METHOD_HELP = 'Here, you choose between different Al networks and algorithms to process your track.\n\n' +\
702
+ 'There are five options:\n\n' +\
703
+ '• VR Architecture - These models use magnitude spectrograms for Source Separation.\n' +\
704
+ '• MDX-Net - These models use Hybrid Spectrogram/Waveform for Source Separation.\n' +\
705
+ '• Demucs v3 - These models use Hybrid Spectrogram/Waveform for Source Separation.\n' +\
706
+ '• Ensemble Mode - Here, you can get the best results from multiple models and networks.\n' +\
707
+ '• Audio Tools - These are additional tools for added convenience.'
708
+ INPUT_FOLDER_ENTRY_HELP = 'Select Input:\n\nHere is where you select the audio files(s) you wish to process.'
709
+ INPUT_FOLDER_ENTRY_HELP_2 = 'Input Option Menu:\n\nClick here to access the input option menu.'
710
+ OUTPUT_FOLDER_ENTRY_HELP = 'Select Output:\n\nHere is where you select the directory where your processed files are to be saved.'
711
+ INPUT_FOLDER_BUTTON_HELP = 'Open Input Folder Button: \n\nOpens the directory containing the selected input audio file(s).'
712
+ OUTPUT_FOLDER_BUTTON_HELP = 'Open Output Folder Button: \n\nOpens the selected output folder.'
713
+ CHOOSE_MODEL_HELP = 'Each process method comes with its own set of options and models.\n\nHere is where you choose the model associated with the selected process method.'
714
+ FORMAT_SETTING_HELP = 'Save outputs as '
715
+ SECONDARY_MODEL_ACTIVATE_HELP = 'When enabled, the application will run an additional inference with the selected model(s) above.'
716
+ SECONDARY_MODEL_HELP = 'Choose the secondary model associated with this stem you wish to run with the current process method.'
717
+ SECONDARY_MODEL_SCALE_HELP = 'The scale determines how the final audio outputs will be averaged between the primary and secondary models.\n\nFor example:\n\n' +\
718
+ '• 10% - 10 percent of the main model result will be factored into the final result.\n' +\
719
+ '• 50% - The results from the main and secondary models will be averaged evenly.\n' +\
720
+ '• 90% - 90 percent of the main model result will be factored into the final result.'
721
+ PRE_PROC_MODEL_ACTIVATE_HELP = 'The application will run an inference with the selected model above, pulling only the instrumental stem when enabled. \nFrom there, all of the non-vocal stems will be pulled from the generated instrumental.\n\nNotes:\n\n' +\
722
+ '• This option can significantly reduce vocal bleed within the non-vocal stems.\n' +\
723
+ '• It is only available in Demucs.\n' +\
724
+ '• It is only compatible with non-vocal and non-instrumental stem outputs.\n' +\
725
+ '• This will increase thetotal processing time.\n' +\
726
+ '• Only VR and MDX-Net Vocal or Instrumental models are selectable above.'
727
+
728
+ AUDIO_TOOLS_HELP = 'Here, you choose between different audio tools to process your track.\n\n' +\
729
+ '• Manual Ensemble - You must have 2 or more files selected as your inputs. Allows the user to run their tracks through \nthe same algorithms used in Ensemble Mode.\n' +\
730
+ '• Align Inputs - You must have exactly 2 files selected as your inputs. The second input will be aligned with the first input.\n' +\
731
+ '• Time Stretch - The user can speed up or slow down the selected inputs.\n' +\
732
+ '• Change Pitch - The user can change the pitch for the selected inputs.\n'
733
+ PRE_PROC_MODEL_INST_MIX_HELP = 'When enabled, the application will generate a third output without the selected stem and vocals.'
734
+ MODEL_SAMPLE_MODE_HELP = 'Allows the user to process only part of a track to sample settings or a model without \nrunning a full conversion.\n\nNotes:\n\n' +\
735
+ '• The number in the parentheses is the current number of seconds the generated sample will be.\n' +\
736
+ '• You can choose the number of seconds to extract from the track in the \"Additional Settings\" menu.'
737
+
738
+ POST_PROCESS_THREASHOLD_HELP = 'Allows the user to control the intensity of the Post_process option.\n\nNotes:\n\n' +\
739
+ '• Higher values potentially remove more artifacts. However, bleed might increase.\n' +\
740
+ '• Lower values limit artifact removal.'
741
+
742
+ BATCH_SIZE_HELP = 'Specify the number of batches to be processed at a time.\n\nNotes:\n\n' +\
743
+ '• Higher values mean more RAM usage but slightly faster processing times.\n' +\
744
+ '• Lower values mean less RAM usage but slightly longer processing times.\n' +\
745
+ '• Batch size value has no effect on output quality.'
746
+
747
+ # Warning Messages
748
+
749
+ STORAGE_ERROR = 'Insufficient Storage', 'There is not enough storage on main drive to continue. Your main drive must have at least 3 GB\'s of storage in order for this application function properly. \n\nPlease ensure your main drive has at least 3 GB\'s of storage and try again.\n\n'
750
+ STORAGE_WARNING = 'Available Storage Low', 'Your main drive is running low on storage. Your main drive must have at least 3 GB\'s of storage in order for this application function properly.\n\n'
751
+ CONFIRM_WARNING = '\nAre you sure you wish to continue?'
752
+ PROCESS_FAILED = 'Process failed, please see error log\n'
753
+ EXIT_PROCESS_ERROR = 'Active Process', 'Please stop the active process or wait for it to complete before you exit.'
754
+ EXIT_HALTED_PROCESS_ERROR = 'Halting Process', 'Please wait for the application to finish halting the process before exiting.'
755
+ EXIT_DOWNLOAD_ERROR = 'Active Download', 'Please stop the download or wait for it to complete before you exit.'
756
+ SET_TO_DEFAULT_PROCESS_ERROR = 'Active Process', 'You cannot reset all of the application settings during an active process.'
757
+ SET_TO_ANY_PROCESS_ERROR = 'Active Process', 'You cannot reset the application settings during an active process.'
758
+ RESET_ALL_TO_DEFAULT_WARNING = 'Reset Settings Confirmation', 'All application settings will be set to factory default.\n\nAre you sure you wish to continue?'
759
+ AUDIO_VERIFICATION_CHECK = lambda i, e:f'++++++++++++++++++++++++++++++++++++++++++++++++++++\n\nBroken File Removed: \n\n{i}\n\nError Details:\n\n{e}\n++++++++++++++++++++++++++++++++++++++++++++++++++++'
760
+ INVALID_ONNX_MODEL_ERROR = 'Invalid Model', 'The file selected is not a valid MDX-Net model. Please see the error log for more information.'
761
+
762
+
763
+ # Separation Text
764
+
765
+ LOADING_MODEL = 'Loading model...'
766
+ INFERENCE_STEP_1 = 'Running inference...'
767
+ INFERENCE_STEP_1_SEC = 'Running inference (secondary model)...'
768
+ INFERENCE_STEP_1_4_STEM = lambda stem:f'Running inference (secondary model for {stem})...'
769
+ INFERENCE_STEP_1_PRE = 'Running inference (pre-process model)...'
770
+ INFERENCE_STEP_2_PRE = lambda pm, m:f'Loading pre-process model ({pm}: {m})...'
771
+ INFERENCE_STEP_2_SEC = lambda pm, m:f'Loading secondary model ({pm}: {m})...'
772
+ INFERENCE_STEP_2_SEC_CACHED_MODOEL = lambda pm, m:f'Secondary model ({pm}: {m}) cache loaded.\n'
773
+ INFERENCE_STEP_2_PRE_CACHED_MODOEL = lambda pm, m:f'Pre-process model ({pm}: {m}) cache loaded.\n'
774
+ INFERENCE_STEP_2_SEC_CACHED = 'Loading cached secondary model source(s)... Done!\n'
775
+ INFERENCE_STEP_2_PRIMARY_CACHED = 'Model cache loaded.\n'
776
+ INFERENCE_STEP_2 = 'Inference complete.'
777
+ SAVING_STEM = 'Saving ', ' stem...'
778
+ SAVING_ALL_STEMS = 'Saving all stems...'
779
+ ENSEMBLING_OUTPUTS = 'Ensembling outputs...'
780
+ DONE = ' Done!\n'
781
+ ENSEMBLES_SAVED = 'Ensembled outputs saved!\n\n'
782
+ NEW_LINES = "\n\n"
783
+ NEW_LINE = "\n"
784
+ NO_LINE = ''
785
+
786
+ # Widget Placements
787
+
788
+ MAIN_ROW_Y = -15, -17
789
+ MAIN_ROW_X = -4, 21
790
+ MAIN_ROW_WIDTH = -53
791
+ MAIN_ROW_2_Y = -15, -17
792
+ MAIN_ROW_2_X = -28, 1
793
+ CHECK_BOX_Y = 0
794
+ CHECK_BOX_X = 20
795
+ CHECK_BOX_WIDTH = -50
796
+ CHECK_BOX_HEIGHT = 2
797
+ LEFT_ROW_WIDTH = -10
798
+ LABEL_HEIGHT = -5
799
+ OPTION_HEIGHT = 7
800
+ LOW_MENU_Y = 18, 16
801
+ FFMPEG_EXT = (".aac", ".aiff", ".alac" ,".flac", ".FLAC", ".mov", ".mp4", ".MP4",
802
+ ".m4a", ".M4A", ".mp2", ".mp3", "MP3", ".mpc", ".mpc8",
803
+ ".mpeg", ".ogg", ".OGG", ".tta", ".wav", ".wave", ".WAV", ".WAVE", ".wma", ".webm", ".eac3", ".mkv")
804
+
805
+ FFMPEG_MORE_EXT = (".aa", ".aac", ".ac3", ".aiff", ".alac", ".avi", ".f4v",".flac", ".flic", ".flv",
806
+ ".m4v",".mlv", ".mov", ".mp4", ".m4a", ".mp2", ".mp3", ".mp4", ".mpc", ".mpc8",
807
+ ".mpeg", ".ogg", ".tta", ".tty", ".vcd", ".wav", ".wma")
808
+ ANY_EXT = ""
809
+
810
+ # Secondary Menu Constants
811
+
812
+ VOCAL_PAIR_PLACEMENT = 1, 2, 3, 4
813
+ OTHER_PAIR_PLACEMENT = 5, 6, 7, 8
814
+ BASS_PAIR_PLACEMENT = 9, 10, 11, 12
815
+ DRUMS_PAIR_PLACEMENT = 13, 14, 15, 16
816
+
817
+ # Drag n Drop String Checks
818
+
819
+ DOUBLE_BRACKET = "} {"
820
+ RIGHT_BRACKET = "}"
821
+ LEFT_BRACKET = "{"
822
+
823
+ # Manual Downloads
824
+
825
+ VR_PLACEMENT_TEXT = 'Place models in \"models/VR_Models\" directory.'
826
+ MDX_PLACEMENT_TEXT = 'Place models in \"models/MDX_Net_Models\" directory.'
827
+ DEMUCS_PLACEMENT_TEXT = 'Place models in \"models/Demucs_Models\" directory.'
828
+ DEMUCS_V3_V4_PLACEMENT_TEXT = 'Place items in \"models/Demucs_Models/v3_v4_repo\" directory.'
829
+
830
+ FULL_DOWNLOAD_LIST_VR = {
831
+ "VR Arch Single Model v5: 1_HP-UVR": "1_HP-UVR.pth",
832
+ "VR Arch Single Model v5: 2_HP-UVR": "2_HP-UVR.pth",
833
+ "VR Arch Single Model v5: 3_HP-Vocal-UVR": "3_HP-Vocal-UVR.pth",
834
+ "VR Arch Single Model v5: 4_HP-Vocal-UVR": "4_HP-Vocal-UVR.pth",
835
+ "VR Arch Single Model v5: 5_HP-Karaoke-UVR": "5_HP-Karaoke-UVR.pth",
836
+ "VR Arch Single Model v5: 6_HP-Karaoke-UVR": "6_HP-Karaoke-UVR.pth",
837
+ "VR Arch Single Model v5: 7_HP2-UVR": "7_HP2-UVR.pth",
838
+ "VR Arch Single Model v5: 8_HP2-UVR": "8_HP2-UVR.pth",
839
+ "VR Arch Single Model v5: 9_HP2-UVR": "9_HP2-UVR.pth",
840
+ "VR Arch Single Model v5: 10_SP-UVR-2B-32000-1": "10_SP-UVR-2B-32000-1.pth",
841
+ "VR Arch Single Model v5: 11_SP-UVR-2B-32000-2": "11_SP-UVR-2B-32000-2.pth",
842
+ "VR Arch Single Model v5: 12_SP-UVR-3B-44100": "12_SP-UVR-3B-44100.pth",
843
+ "VR Arch Single Model v5: 13_SP-UVR-4B-44100-1": "13_SP-UVR-4B-44100-1.pth",
844
+ "VR Arch Single Model v5: 14_SP-UVR-4B-44100-2": "14_SP-UVR-4B-44100-2.pth",
845
+ "VR Arch Single Model v5: 15_SP-UVR-MID-44100-1": "15_SP-UVR-MID-44100-1.pth",
846
+ "VR Arch Single Model v5: 16_SP-UVR-MID-44100-2": "16_SP-UVR-MID-44100-2.pth",
847
+ "VR Arch Single Model v4: MGM_HIGHEND_v4": "MGM_HIGHEND_v4.pth",
848
+ "VR Arch Single Model v4: MGM_LOWEND_A_v4": "MGM_LOWEND_A_v4.pth",
849
+ "VR Arch Single Model v4: MGM_LOWEND_B_v4": "MGM_LOWEND_B_v4.pth",
850
+ "VR Arch Single Model v4: MGM_MAIN_v4": "MGM_MAIN_v4.pth"
851
+ }
852
+
853
+ FULL_DOWNLOAD_LIST_MDX = {
854
+ "MDX-Net Model: UVR-MDX-NET Main": "UVR_MDXNET_Main.onnx",
855
+ "MDX-Net Model: UVR-MDX-NET Inst Main": "UVR-MDX-NET-Inst_Main.onnx",
856
+ "MDX-Net Model: UVR-MDX-NET 1": "UVR_MDXNET_1_9703.onnx",
857
+ "MDX-Net Model: UVR-MDX-NET 2": "UVR_MDXNET_2_9682.onnx",
858
+ "MDX-Net Model: UVR-MDX-NET 3": "UVR_MDXNET_3_9662.onnx",
859
+ "MDX-Net Model: UVR-MDX-NET Inst 1": "UVR-MDX-NET-Inst_1.onnx",
860
+ "MDX-Net Model: UVR-MDX-NET Inst 2": "UVR-MDX-NET-Inst_2.onnx",
861
+ "MDX-Net Model: UVR-MDX-NET Inst 3": "UVR-MDX-NET-Inst_3.onnx",
862
+ "MDX-Net Model: UVR-MDX-NET Karaoke": "UVR_MDXNET_KARA.onnx",
863
+ "MDX-Net Model: UVR_MDXNET_9482": "UVR_MDXNET_9482.onnx",
864
+ "MDX-Net Model: Kim_Vocal_1": "Kim_Vocal_1.onnx",
865
+ "MDX-Net Model: kuielab_a_vocals": "kuielab_a_vocals.onnx",
866
+ "MDX-Net Model: kuielab_a_other": "kuielab_a_other.onnx",
867
+ "MDX-Net Model: kuielab_a_bass": "kuielab_a_bass.onnx",
868
+ "MDX-Net Model: kuielab_a_drums": "kuielab_a_drums.onnx",
869
+ "MDX-Net Model: kuielab_b_vocals": "kuielab_b_vocals.onnx",
870
+ "MDX-Net Model: kuielab_b_other": "kuielab_b_other.onnx",
871
+ "MDX-Net Model: kuielab_b_bass": "kuielab_b_bass.onnx",
872
+ "MDX-Net Model: kuielab_b_drums": "kuielab_b_drums.onnx"}
873
+
874
+ FULL_DOWNLOAD_LIST_DEMUCS = {
875
+
876
+ "Demucs v4: htdemucs_ft":{
877
+ "f7e0c4bc-ba3fe64a.th":"https://dl.fbaipublicfiles.com/demucs/hybrid_transformer/f7e0c4bc-ba3fe64a.th",
878
+ "d12395a8-e57c48e6.th":"https://dl.fbaipublicfiles.com/demucs/hybrid_transformer/d12395a8-e57c48e6.th",
879
+ "92cfc3b6-ef3bcb9c.th":"https://dl.fbaipublicfiles.com/demucs/hybrid_transformer/92cfc3b6-ef3bcb9c.th",
880
+ "04573f0d-f3cf25b2.th":"https://dl.fbaipublicfiles.com/demucs/hybrid_transformer/04573f0d-f3cf25b2.th",
881
+ "htdemucs_ft.yaml": "https://github.com/TRvlvr/model_repo/releases/download/all_public_uvr_models/htdemucs_ft.yaml"
882
+ },
883
+
884
+ "Demucs v4: htdemucs":{
885
+ "955717e8-8726e21a.th": "https://dl.fbaipublicfiles.com/demucs/hybrid_transformer/955717e8-8726e21a.th",
886
+ "htdemucs.yaml": "https://github.com/TRvlvr/model_repo/releases/download/all_public_uvr_models/htdemucs.yaml"
887
+ },
888
+
889
+ "Demucs v4: hdemucs_mmi":{
890
+ "75fc33f5-1941ce65.th": "https://dl.fbaipublicfiles.com/demucs/hybrid_transformer/75fc33f5-1941ce65.th",
891
+ "hdemucs_mmi.yaml": "https://github.com/TRvlvr/model_repo/releases/download/all_public_uvr_models/hdemucs_mmi.yaml"
892
+ },
893
+ "Demucs v4: htdemucs_6s":{
894
+ "5c90dfd2-34c22ccb.th": "https://dl.fbaipublicfiles.com/demucs/hybrid_transformer/5c90dfd2-34c22ccb.th",
895
+ "htdemucs_6s.yaml": "https://github.com/TRvlvr/model_repo/releases/download/all_public_uvr_models/htdemucs_6s.yaml"
896
+ },
897
+ "Demucs v3: mdx":{
898
+ "0d19c1c6-0f06f20e.th": "https://dl.fbaipublicfiles.com/demucs/mdx_final/0d19c1c6-0f06f20e.th",
899
+ "7ecf8ec1-70f50cc9.th": "https://dl.fbaipublicfiles.com/demucs/mdx_final/7ecf8ec1-70f50cc9.th",
900
+ "c511e2ab-fe698775.th": "https://dl.fbaipublicfiles.com/demucs/mdx_final/c511e2ab-fe698775.th",
901
+ "7d865c68-3d5dd56b.th": "https://dl.fbaipublicfiles.com/demucs/mdx_final/7d865c68-3d5dd56b.th",
902
+ "mdx.yaml": "https://github.com/TRvlvr/model_repo/releases/download/all_public_uvr_models/mdx.yaml"
903
+ },
904
+
905
+ "Demucs v3: mdx_q":{
906
+ "6b9c2ca1-3fd82607.th": "https://dl.fbaipublicfiles.com/demucs/mdx_final/6b9c2ca1-3fd82607.th",
907
+ "b72baf4e-8778635e.th": "https://dl.fbaipublicfiles.com/demucs/mdx_final/b72baf4e-8778635e.th",
908
+ "42e558d4-196e0e1b.th": "https://dl.fbaipublicfiles.com/demucs/mdx_final/42e558d4-196e0e1b.th",
909
+ "305bc58f-18378783.th": "https://dl.fbaipublicfiles.com/demucs/mdx_final/305bc58f-18378783.th",
910
+ "mdx_q.yaml": "https://github.com/TRvlvr/model_repo/releases/download/all_public_uvr_models/mdx_q.yaml"
911
+ },
912
+
913
+ "Demucs v3: mdx_extra":{
914
+ "e51eebcc-c1b80bdd.th": "https://dl.fbaipublicfiles.com/demucs/mdx_final/e51eebcc-c1b80bdd.th",
915
+ "a1d90b5c-ae9d2452.th": "https://dl.fbaipublicfiles.com/demucs/mdx_final/a1d90b5c-ae9d2452.th",
916
+ "5d2d6c55-db83574e.th": "https://dl.fbaipublicfiles.com/demucs/mdx_final/5d2d6c55-db83574e.th",
917
+ "cfa93e08-61801ae1.th": "https://dl.fbaipublicfiles.com/demucs/mdx_final/cfa93e08-61801ae1.th",
918
+ "mdx_extra.yaml": "https://github.com/TRvlvr/model_repo/releases/download/all_public_uvr_models/mdx_extra.yaml"
919
+ },
920
+
921
+ "Demucs v3: mdx_extra_q": {
922
+ "83fc094f-4a16d450.th": "https://dl.fbaipublicfiles.com/demucs/mdx_final/83fc094f-4a16d450.th",
923
+ "464b36d7-e5a9386e.th": "https://dl.fbaipublicfiles.com/demucs/mdx_final/464b36d7-e5a9386e.th",
924
+ "14fc6a69-a89dd0ee.th": "https://dl.fbaipublicfiles.com/demucs/mdx_final/14fc6a69-a89dd0ee.th",
925
+ "7fd6ef75-a905dd85.th": "https://dl.fbaipublicfiles.com/demucs/mdx_final/7fd6ef75-a905dd85.th",
926
+ "mdx_extra_q.yaml": "https://github.com/TRvlvr/model_repo/releases/download/all_public_uvr_models/mdx_extra_q.yaml"
927
+ },
928
+
929
+ "Demucs v3: UVR Model":{
930
+ "ebf34a2db.th": "https://github.com/TRvlvr/model_repo/releases/download/all_public_uvr_models/ebf34a2db.th",
931
+ "UVR_Demucs_Model_1.yaml": "https://github.com/TRvlvr/model_repo/releases/download/all_public_uvr_models/UVR_Demucs_Model_1.yaml"
932
+ },
933
+
934
+ "Demucs v3: repro_mdx_a":{
935
+ "9a6b4851-03af0aa6.th": "https://dl.fbaipublicfiles.com/demucs/mdx_final/9a6b4851-03af0aa6.th",
936
+ "1ef250f1-592467ce.th": "https://dl.fbaipublicfiles.com/demucs/mdx_final/1ef250f1-592467ce.th",
937
+ "fa0cb7f9-100d8bf4.th": "https://dl.fbaipublicfiles.com/demucs/mdx_final/fa0cb7f9-100d8bf4.th",
938
+ "902315c2-b39ce9c9.th": "https://dl.fbaipublicfiles.com/demucs/mdx_final/902315c2-b39ce9c9.th",
939
+ "repro_mdx_a.yaml": "https://github.com/TRvlvr/model_repo/releases/download/all_public_uvr_models/repro_mdx_a.yaml"
940
+ },
941
+
942
+ "Demucs v3: repro_mdx_a_time_only":{
943
+ "9a6b4851-03af0aa6.th":"https://dl.fbaipublicfiles.com/demucs/mdx_final/9a6b4851-03af0aa6.th",
944
+ "1ef250f1-592467ce.th":"https://dl.fbaipublicfiles.com/demucs/mdx_final/1ef250f1-592467ce.th",
945
+ "repro_mdx_a_time_only.yaml": "https://github.com/TRvlvr/model_repo/releases/download/all_public_uvr_models/repro_mdx_a_time_only.yaml"
946
+ },
947
+
948
+ "Demucs v3: repro_mdx_a_hybrid_only":{
949
+ "fa0cb7f9-100d8bf4.th":"https://dl.fbaipublicfiles.com/demucs/mdx_final/fa0cb7f9-100d8bf4.th",
950
+ "902315c2-b39ce9c9.th":"https://dl.fbaipublicfiles.com/demucs/mdx_final/902315c2-b39ce9c9.th",
951
+ "repro_mdx_a_hybrid_only.yaml": "https://github.com/TRvlvr/model_repo/releases/download/all_public_uvr_models/repro_mdx_a_hybrid_only.yaml"
952
+ },
953
+
954
+ "Demucs v2: demucs": {
955
+ "demucs-e07c671f.th": "https://dl.fbaipublicfiles.com/demucs/v3.0/demucs-e07c671f.th"
956
+ },
957
+
958
+ "Demucs v2: demucs_extra": {
959
+ "demucs_extra-3646af93.th":"https://dl.fbaipublicfiles.com/demucs/v3.0/demucs_extra-3646af93.th"
960
+ },
961
+
962
+ "Demucs v2: demucs48_hq": {
963
+ "demucs48_hq-28a1282c.th":"https://dl.fbaipublicfiles.com/demucs/v3.0/demucs48_hq-28a1282c.th"
964
+ },
965
+
966
+ "Demucs v2: tasnet": {
967
+ "tasnet-beb46fac.th":"https://dl.fbaipublicfiles.com/demucs/v3.0/tasnet-beb46fac.th"
968
+ },
969
+
970
+ "Demucs v2: tasnet_extra": {
971
+ "tasnet_extra-df3777b2.th":"https://dl.fbaipublicfiles.com/demucs/v3.0/tasnet_extra-df3777b2.th"
972
+ },
973
+
974
+ "Demucs v2: demucs_unittest": {
975
+ "demucs_unittest-09ebc15f.th":"https://dl.fbaipublicfiles.com/demucs/v3.0/demucs_unittest-09ebc15f.th"
976
+ },
977
+
978
+ "Demucs v1: demucs": {
979
+ "demucs.th":"https://dl.fbaipublicfiles.com/demucs/v2.0/demucs.th"
980
+ },
981
+
982
+ "Demucs v1: demucs_extra": {
983
+ "demucs_extra.th":"https://dl.fbaipublicfiles.com/demucs/v2.0/demucs_extra.th"
984
+ },
985
+
986
+ "Demucs v1: light": {
987
+ "light.th":"https://dl.fbaipublicfiles.com/demucs/v2.0/light.th"
988
+ },
989
+
990
+ "Demucs v1: light_extra": {
991
+ "light_extra.th":"https://dl.fbaipublicfiles.com/demucs/v2.0/light_extra.th"
992
+ },
993
+
994
+ "Demucs v1: tasnet": {
995
+ "tasnet.th":"https://dl.fbaipublicfiles.com/demucs/v2.0/tasnet.th"
996
+ },
997
+
998
+ "Demucs v1: tasnet_extra": {
999
+ "tasnet_extra.th":"https://dl.fbaipublicfiles.com/demucs/v2.0/tasnet_extra.th"
1000
+ }
1001
+ }
1002
+
1003
+ # Main Menu Labels
1004
+
1005
+ CHOOSE_PROC_METHOD_MAIN_LABEL = 'CHOOSE PROCESS METHOD'
1006
+ SELECT_SAVED_SETTINGS_MAIN_LABEL = 'SELECT SAVED SETTINGS'
1007
+ CHOOSE_MDX_MODEL_MAIN_LABEL = 'CHOOSE MDX-NET MODEL'
1008
+ BATCHES_MDX_MAIN_LABEL = 'BATCH SIZE'
1009
+ VOL_COMP_MDX_MAIN_LABEL = 'VOLUME COMPENSATION'
1010
+ SELECT_VR_MODEL_MAIN_LABEL = 'CHOOSE VR MODEL'
1011
+ AGGRESSION_SETTING_MAIN_LABEL = 'AGGRESSION SETTING'
1012
+ WINDOW_SIZE_MAIN_LABEL = 'WINDOW SIZE'
1013
+ CHOOSE_DEMUCS_MODEL_MAIN_LABEL = 'CHOOSE DEMUCS MODEL'
1014
+ CHOOSE_DEMUCS_STEMS_MAIN_LABEL = 'CHOOSE STEM(S)'
1015
+ CHOOSE_SEGMENT_MAIN_LABEL = 'SEGMENT'
1016
+ ENSEMBLE_OPTIONS_MAIN_LABEL = 'ENSEMBLE OPTIONS'
1017
+ CHOOSE_MAIN_PAIR_MAIN_LABEL = 'MAIN STEM PAIR'
1018
+ CHOOSE_ENSEMBLE_ALGORITHM_MAIN_LABEL = 'ENSEMBLE ALGORITHM'
1019
+ AVAILABLE_MODELS_MAIN_LABEL = 'AVAILABLE MODELS'
1020
+ CHOOSE_AUDIO_TOOLS_MAIN_LABEL = 'CHOOSE AUDIO TOOL'
1021
+ CHOOSE_MANUAL_ALGORITHM_MAIN_LABEL = 'CHOOSE ALGORITHM'
1022
+ CHOOSE_RATE_MAIN_LABEL = 'RATE'
1023
+ CHOOSE_SEMITONES_MAIN_LABEL = 'SEMITONES'
1024
+ GPU_CONVERSION_MAIN_LABEL = 'GPU Conversion'
1025
+
1026
+ if OPERATING_SYSTEM=="Darwin":
1027
+ LICENSE_OS_SPECIFIC_TEXT = '• This application is intended for those running macOS Catalina and above.\n' +\
1028
+ '• Application functionality for systems running macOS Mojave or lower is not guaranteed.\n' +\
1029
+ '• Application functionality for older or budget Mac systems is not guaranteed.\n\n'
1030
+ FONT_SIZE_F1 = 13
1031
+ FONT_SIZE_F2 = 11
1032
+ FONT_SIZE_F3 = 12
1033
+ FONT_SIZE_0 = 9
1034
+ FONT_SIZE_1 = 11
1035
+ FONT_SIZE_2 = 12
1036
+ FONT_SIZE_3 = 13
1037
+ FONT_SIZE_4 = 14
1038
+ FONT_SIZE_5 = 15
1039
+ FONT_SIZE_6 = 17
1040
+ HELP_HINT_CHECKBOX_WIDTH = 13
1041
+ MDX_CHECKBOXS_WIDTH = 14
1042
+ VR_CHECKBOXS_WIDTH = 14
1043
+ ENSEMBLE_CHECKBOXS_WIDTH = 18
1044
+ DEMUCS_CHECKBOXS_WIDTH = 14
1045
+ DEMUCS_PRE_CHECKBOXS_WIDTH = 20
1046
+ GEN_SETTINGS_WIDTH = 17
1047
+ MENU_COMBOBOX_WIDTH = 16
1048
+
1049
+ elif OPERATING_SYSTEM=="Linux":
1050
+ LICENSE_OS_SPECIFIC_TEXT = '• This application is intended for those running Linux Ubuntu 18.04+.\n' +\
1051
+ '• Application functionality for systems running other Linux platforms is not guaranteed.\n' +\
1052
+ '• Application functionality for older or budget systems is not guaranteed.\n\n'
1053
+ FONT_SIZE_F1 = 10
1054
+ FONT_SIZE_F2 = 8
1055
+ FONT_SIZE_F3 = 9
1056
+ FONT_SIZE_0 = 7
1057
+ FONT_SIZE_1 = 8
1058
+ FONT_SIZE_2 = 9
1059
+ FONT_SIZE_3 = 10
1060
+ FONT_SIZE_4 = 11
1061
+ FONT_SIZE_5 = 12
1062
+ FONT_SIZE_6 = 15
1063
+ HELP_HINT_CHECKBOX_WIDTH = 13
1064
+ MDX_CHECKBOXS_WIDTH = 14
1065
+ VR_CHECKBOXS_WIDTH = 16
1066
+ ENSEMBLE_CHECKBOXS_WIDTH = 25
1067
+ DEMUCS_CHECKBOXS_WIDTH = 18
1068
+ DEMUCS_PRE_CHECKBOXS_WIDTH = 27
1069
+ GEN_SETTINGS_WIDTH = 17
1070
+ MENU_COMBOBOX_WIDTH = 19
1071
+
1072
+ elif OPERATING_SYSTEM=="Windows":
1073
+ LICENSE_OS_SPECIFIC_TEXT = '• This application is intended for those running Windows 10 or higher.\n' +\
1074
+ '• Application functionality for systems running Windows 7 or lower is not guaranteed.\n' +\
1075
+ '• Application functionality for Intel Pentium & Celeron CPUs systems is not guaranteed.\n\n'
1076
+ FONT_SIZE_F1 = 10
1077
+ FONT_SIZE_F2 = 8
1078
+ FONT_SIZE_F3 = 9
1079
+ FONT_SIZE_0 = 7
1080
+ FONT_SIZE_1 = 8
1081
+ FONT_SIZE_2 = 9
1082
+ FONT_SIZE_3 = 10
1083
+ FONT_SIZE_4 = 11
1084
+ FONT_SIZE_5 = 12
1085
+ FONT_SIZE_6 = 15
1086
+ HELP_HINT_CHECKBOX_WIDTH = 16
1087
+ MDX_CHECKBOXS_WIDTH = 16
1088
+ VR_CHECKBOXS_WIDTH = 16
1089
+ ENSEMBLE_CHECKBOXS_WIDTH = 25
1090
+ DEMUCS_CHECKBOXS_WIDTH = 18
1091
+ DEMUCS_PRE_CHECKBOXS_WIDTH = 27
1092
+ GEN_SETTINGS_WIDTH = 23
1093
+ MENU_COMBOBOX_WIDTH = 19
1094
+
1095
+
1096
+ LICENSE_TEXT = lambda a, p:f'Current Application Version: Ultimate Vocal Remover {a}\n' +\
1097
+ f'Current Patch Version: {p}\n\n' +\
1098
+ 'Copyright (c) 2022 Ultimate Vocal Remover\n\n' +\
1099
+ 'UVR is free and open-source, but MIT licensed. Please credit us if you use our\n' +\
1100
+ f'models or code for projects unrelated to UVR.\n\n{LICENSE_OS_SPECIFIC_TEXT}' +\
1101
+ 'This bundle contains the UVR interface, Python, PyTorch, and other\n' +\
1102
+ 'dependencies needed to run the application effectively.\n\n' +\
1103
+ 'Website Links: This application, System or Service(s) may contain links to\n' +\
1104
+ 'other websites and downloads, and they are solely provided to you as an\n' +\
1105
+ 'additional convenience. You understand and acknowledge that by clicking\n' +\
1106
+ 'or activating such links you are accessing a site or service outside of\n' +\
1107
+ 'this application, and that we do not screen, review, approve, or otherwise\n' +\
1108
+ 'endorse any content or information contained in these linked websites.\n' +\
1109
+ 'You acknowledge and agree that we, our affiliates and partners are not\n' +\
1110
+ 'responsible for the contents of any of these linked websites, including\n' +\
1111
+ 'the accuracy or availability of information provided by the linked websites,\n' +\
1112
+ 'and we make no representations or warranties regarding your use of\n' +\
1113
+ 'the linked websites.\n\n' +\
1114
+ 'This application is MIT Licensed\n\n' +\
1115
+ 'Permission is hereby granted, free of charge, to any person obtaining a copy\n' +\
1116
+ 'of this software and associated documentation files (the "Software"), to deal\n' +\
1117
+ 'in the Software without restriction, including without limitation the rights\n' +\
1118
+ 'to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n' +\
1119
+ 'copies of the Software, and to permit persons to whom the Software is\n' +\
1120
+ 'furnished to do so, subject to the following conditions:\n\n' +\
1121
+ 'The above copyright notice and this permission notice shall be included in all\n' +\
1122
+ 'copies or substantial portions of the Software.\n\n' +\
1123
+ 'THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n' +\
1124
+ 'IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n' +\
1125
+ 'FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n' +\
1126
+ 'AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n' +\
1127
+ 'LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n' +\
1128
+ 'OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n' +\
1129
+ 'SOFTWARE.'
1130
+
1131
+ CHANGE_LOG_HEADER = lambda patch:f"Patch Version:\n\n{patch}"
1132
+
1133
+ #DND CONSTS
1134
+
1135
+ MAC_DND_CHECK = ('/Users/',
1136
+ '/Applications/',
1137
+ '/Library/',
1138
+ '/System/')
1139
+ LINUX_DND_CHECK = ('/home/',
1140
+ '/usr/')
1141
+ WINDOWS_DND_CHECK = ('A:', 'B:', 'C:', 'D:', 'E:', 'F:', 'G:', 'H:', 'I:', 'J:', 'K:', 'L:', 'M:', 'N:', 'O:', 'P:', 'Q:', 'R:', 'S:', 'T:', 'U:', 'V:', 'W:', 'X:', 'Y:', 'Z:')
1142
+
1143
+ WOOD_INST_MODEL_HASH = '0ec76fd9e65f81d8b4fbd13af4826ed8'
1144
+ WOOD_INST_PARAMS = {
1145
+ "vr_model_param": "4band_v3",
1146
+ "primary_stem": NO_WIND_INST_STEM
1147
+ }
gui_data/error_handling.py ADDED
@@ -0,0 +1,106 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from datetime import datetime
2
+ import traceback
3
+
4
+ CUDA_MEMORY_ERROR = "CUDA out of memory"
5
+ CUDA_RUNTIME_ERROR = "CUDNN error executing cudnnSetTensorNdDescriptor"
6
+ DEMUCS_MODEL_MISSING_ERROR = "is neither a single pre-trained model or a bag of models."
7
+ ENSEMBLE_MISSING_MODEL_ERROR = "local variable \'enseExport\' referenced before assignment"
8
+ FFMPEG_MISSING_ERROR = """audioread\__init__.py", line 116, in audio_open"""
9
+ FILE_MISSING_ERROR = "FileNotFoundError"
10
+ MDX_MEMORY_ERROR = "onnxruntime::CudaCall CUDA failure 2: out of memory"
11
+ MDX_MODEL_MISSING = "[ONNXRuntimeError] : 3 : NO_SUCHFILE"
12
+ MDX_MODEL_SETTINGS_ERROR = "Got invalid dimensions for input"
13
+ MDX_RUNTIME_ERROR = "onnxruntime::BFCArena::AllocateRawInternal"
14
+ MODULE_ERROR = "ModuleNotFoundError"
15
+ WINDOW_SIZE_ERROR = "h1_shape[3] must be greater than h2_shape[3]"
16
+ SF_WRITE_ERROR = "sf.write"
17
+ SYSTEM_MEMORY_ERROR = "DefaultCPUAllocator: not enough memory"
18
+ MISSING_MODEL_ERROR = "'NoneType\' object has no attribute \'model_basename\'"
19
+ ARRAY_SIZE_ERROR = "ValueError: \"array is too big; `arr.size * arr.dtype.itemsize` is larger than the maximum possible size.\""
20
+ GPU_INCOMPATIBLE_ERROR = "no kernel image is available for execution on the device"
21
+
22
+ CONTACT_DEV = 'If this error persists, please contact the developers with the error details.'
23
+
24
+ ERROR_MAPPER = {
25
+ CUDA_MEMORY_ERROR:
26
+ ('The application was unable to allocate enough GPU memory to use this model. ' +
27
+ 'Please close any GPU intensive applications and try again.\n' +
28
+ 'If the error persists, your GPU might not be supported.') ,
29
+ CUDA_RUNTIME_ERROR:
30
+ (f'Your PC cannot process this audio file with the chunk size selected. Please lower the chunk size and try again.\n\n{CONTACT_DEV}'),
31
+ DEMUCS_MODEL_MISSING_ERROR:
32
+ ('The selected Demucs model is missing. ' +
33
+ 'Please download the model or make sure it is in the correct directory.'),
34
+ ENSEMBLE_MISSING_MODEL_ERROR:
35
+ ('The application was unable to locate a model you selected for this ensemble.\n\n' +
36
+ 'Please do the following to use all compatible models:\n\n1. Navigate to the \"Updates\" tab in the Help Guide.\n2. Download and install the model expansion pack.\n3. Then try again.\n\n' +
37
+ 'If the error persists, please verify all models are present.'),
38
+ FFMPEG_MISSING_ERROR:
39
+ ('The input file type is not supported or FFmpeg is missing. Please select a file type supported by FFmpeg and try again. ' +
40
+ 'If FFmpeg is missing or not installed, you will only be able to process \".wav\" files until it is available on this system. ' +
41
+ f'See the \"More Info\" tab in the Help Guide.\n\n{CONTACT_DEV}'),
42
+ FILE_MISSING_ERROR:
43
+ (f'Missing file error raised. Please address the error and try again.\n\n{CONTACT_DEV}'),
44
+ MDX_MEMORY_ERROR:
45
+ ('The application was unable to allocate enough GPU memory to use this model.\n\n' +
46
+ 'Please do the following:\n\n1. Close any GPU intensive applications.\n2. Lower the set chunk size.\n3. Then try again.\n\n' +
47
+ 'If the error persists, your GPU might not be supported.'),
48
+ MDX_MODEL_MISSING:
49
+ ('The application could not detect this MDX-Net model on your system. ' +
50
+ 'Please make sure all the models are present in the correct directory.\n\n' +
51
+ 'If the error persists, please reinstall application or contact the developers.'),
52
+ MDX_RUNTIME_ERROR:
53
+ ('The application was unable to allocate enough GPU memory to use this model.\n\n' +
54
+ 'Please do the following:\n\n1. Close any GPU intensive applications.\n2. Lower the set chunk size.\n3. Then try again.\n\n' +
55
+ 'If the error persists, your GPU might not be supported.'),
56
+ WINDOW_SIZE_ERROR:
57
+ ('Invalid window size.\n\n' +
58
+ 'The chosen window size is likely not compatible with this model. Please select a different size and try again.'),
59
+ SF_WRITE_ERROR:
60
+ ('Could not write audio file.\n\n' +
61
+ 'This could be due to one of the following:\n\n1. Low storage on target device.\n2. The export directory no longer exists.\n3. A system permissions issue.'),
62
+ SYSTEM_MEMORY_ERROR:
63
+ ('The application was unable to allocate enough system memory to use this model.\n\n' +
64
+ 'Please do the following:\n\n1. Restart this application.\n2. Ensure any CPU intensive applications are closed.\n3. Then try again.\n\n' +
65
+ 'Please Note: Intel Pentium and Intel Celeron processors do not work well with this application.\n\n' +
66
+ 'If the error persists, the system may not have enough RAM, or your CPU might not be supported.'),
67
+ MISSING_MODEL_ERROR:
68
+ ('Model Missing: The application was unable to locate the chosen model.\n\n' +
69
+ 'If the error persists, please verify any selected models are present.'),
70
+ GPU_INCOMPATIBLE_ERROR:
71
+ ('This process is not compatible with your GPU.\n\n' +
72
+ 'Please uncheck \"GPU Conversion\" and try again'),
73
+ ARRAY_SIZE_ERROR:
74
+ ('The application was not able to process the given audiofile. Please convert the audiofile to another format and try again.'),
75
+ }
76
+
77
+ def error_text(process_method, exception):
78
+
79
+ traceback_text = ''.join(traceback.format_tb(exception.__traceback__))
80
+ message = f'{type(exception).__name__}: "{exception}"\nTraceback Error: "\n{traceback_text}"\n'
81
+ error_message = f'\n\nRaw Error Details:\n\n{message}\nError Time Stamp [{datetime.now().strftime("%Y-%m-%d %H:%M:%S")}]\n'
82
+ process = f'Last Error Received:\n\nProcess: {process_method}\n\n'
83
+
84
+ for error_type, full_text in ERROR_MAPPER.items():
85
+ if error_type in message:
86
+ final_message = full_text
87
+ break
88
+ else:
89
+ final_message = (CONTACT_DEV)
90
+
91
+ return f"{process}{final_message}{error_message}"
92
+
93
+ def error_dialouge(exception):
94
+
95
+ error_name = f'{type(exception).__name__}'
96
+ traceback_text = ''.join(traceback.format_tb(exception.__traceback__))
97
+ message = f'{error_name}: "{exception}"\n{traceback_text}"'
98
+
99
+ for error_type, full_text in ERROR_MAPPER.items():
100
+ if error_type in message:
101
+ final_message = full_text
102
+ break
103
+ else:
104
+ final_message = (f'{error_name}: {exception}\n\n{CONTACT_DEV}')
105
+
106
+ return final_message
gui_data/fail_chime.wav ADDED
Binary file (385 kB). View file
 
gui_data/fonts/centurygothic/GOTHIC.TTF ADDED
Binary file (138 kB). View file
 
gui_data/fonts/centurygothic/GOTHICB.TTF ADDED
Binary file (130 kB). View file
 
gui_data/fonts/centurygothic/GOTHICBI.TTF ADDED
Binary file (139 kB). View file
 
gui_data/fonts/centurygothic/GOTHICI.TTF ADDED
Binary file (149 kB). View file
 
gui_data/img/File.png ADDED
gui_data/img/GUI-Icon.ico ADDED
gui_data/img/GUI-Icon.png ADDED
gui_data/img/UVR-banner.png ADDED
gui_data/img/UVR_5_5_0.png ADDED
gui_data/img/UVR_5_5_1.png ADDED
gui_data/img/UVR_v5_5_MacOS.png ADDED
gui_data/img/credits.png ADDED
gui_data/img/donate.png ADDED
gui_data/img/download.png ADDED
gui_data/img/help.png ADDED
gui_data/img/key.png ADDED
gui_data/img/pause.png ADDED
gui_data/img/play.png ADDED
gui_data/img/splash.bmp ADDED
gui_data/img/stop.png ADDED
gui_data/img/stop_player.png ADDED
gui_data/old_data_check.py ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ import shutil
3
+
4
+ def file_check(original_dir, new_dir):
5
+
6
+ if os.path.isdir(original_dir):
7
+ for file in os.listdir(original_dir):
8
+ shutil.move(os.path.join(original_dir, file), os.path.join(new_dir, file))
9
+
10
+ if len(os.listdir(original_dir)) == 0:
11
+ shutil.rmtree(original_dir)
12
+
13
+ def remove_unneeded_yamls(demucs_dir):
14
+
15
+ for file in os.listdir(demucs_dir):
16
+ if file.endswith('.yaml'):
17
+ if os.path.isfile(os.path.join(demucs_dir, file)):
18
+ os.remove(os.path.join(demucs_dir, file))
19
+
20
+ def remove_temps(remove_dir):
21
+
22
+ if os.path.isdir(remove_dir):
23
+ try:
24
+ shutil.rmtree(remove_dir)
25
+ except Exception as e:
26
+ print(e)
27
+
gui_data/saved_ensembles/saved_ensembles_go_here.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ saved_ensembles_go_here
gui_data/saved_settings/saved_settings_go_here.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ saved_settings_go_here
gui_data/sv_ttk/__init__.py ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from pathlib import Path
2
+ import platform
3
+
4
+ if platform.system() == "Darwin":
5
+ sun_valley_tcl = "sun-valley_darwin.tcl"
6
+ else:
7
+ sun_valley_tcl = "sun-valley.tcl"
8
+
9
+ inited = False
10
+ root = None
11
+
12
+
13
+ def init(func):
14
+ def wrapper(*args, **kwargs):
15
+ global inited
16
+ global root
17
+
18
+ if not inited:
19
+ from tkinter import _default_root
20
+
21
+ path = (Path(__file__).parent / sun_valley_tcl).resolve()
22
+
23
+ try:
24
+ _default_root.tk.call("source", str(path))
25
+ except AttributeError:
26
+ raise RuntimeError(
27
+ "can't set theme. "
28
+ "Tk is not initialized. "
29
+ "Please first create a tkinter.Tk instance, then set the theme."
30
+ ) from None
31
+ else:
32
+ inited = True
33
+ root = _default_root
34
+
35
+ return func(*args, **kwargs)
36
+
37
+ return wrapper
38
+
39
+
40
+ @init
41
+ def set_theme(theme):
42
+ if theme not in {"dark", "light"}:
43
+ raise RuntimeError(f"not a valid theme name: {theme}")
44
+
45
+ root.tk.call("set_theme", theme)
46
+
47
+
48
+ @init
49
+ def get_theme():
50
+ theme = root.tk.call("ttk::style", "theme", "use")
51
+
52
+ try:
53
+ return {"sun-valley-dark": "dark", "sun-valley-light": "light"}[theme]
54
+ except KeyError:
55
+ return theme
56
+
57
+
58
+ @init
59
+ def toggle_theme():
60
+ if get_theme() == "dark":
61
+ use_light_theme()
62
+ else:
63
+ use_dark_theme()
64
+
65
+
66
+ use_dark_theme = lambda: set_theme("dark")
67
+ use_light_theme = lambda: set_theme("light")
gui_data/sv_ttk/sun-valley.tcl ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright © 2021 rdbende <[email protected]>
2
+
3
+ source [file join [file dirname [info script]] theme dark.tcl]
4
+
5
+ option add *tearOff 0
6
+
7
+ proc set_theme {mode} {
8
+ if {$mode == "dark"} {
9
+ ttk::style theme use "sun-valley-dark"
10
+
11
+ array set colors {
12
+ -fg "#F6F6F7"
13
+ -bg "#0e0e0f"
14
+ -disabledfg "#F6F6F7"
15
+ -selectfg "#F6F6F7"
16
+ -selectbg "#003b50"
17
+ }
18
+
19
+ ttk::style configure . \
20
+ -background $colors(-bg) \
21
+ -foreground $colors(-fg) \
22
+ -troughcolor $colors(-bg) \
23
+ -focuscolor $colors(-selectbg) \
24
+ -selectbackground $colors(-selectbg) \
25
+ -selectforeground $colors(-selectfg) \
26
+ -insertwidth 0 \
27
+ -insertcolor $colors(-fg) \
28
+ -fieldbackground $colors(-selectbg) \
29
+ -font {"Century Gothic" 10} \
30
+ -borderwidth 0 \
31
+ -relief flat
32
+
33
+ tk_setPalette \
34
+ background [ttk::style lookup . -background] \
35
+ foreground [ttk::style lookup . -foreground] \
36
+ highlightColor [ttk::style lookup . -focuscolor] \
37
+ selectBackground [ttk::style lookup . -selectbackground] \
38
+ selectForeground [ttk::style lookup . -selectforeground] \
39
+ activeBackground [ttk::style lookup . -selectbackground] \
40
+ activeForeground [ttk::style lookup . -selectforeground]
41
+
42
+ ttk::style map . -foreground [list disabled $colors(-disabledfg)]
43
+
44
+ option add *font [ttk::style lookup . -font]
45
+ option add *Menu.selectcolor $colors(-fg)
46
+ option add *Menu.background #0e0e0f
47
+
48
+ }
49
+ }
gui_data/sv_ttk/sun-valley_darwin.tcl ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright © 2021 rdbende <[email protected]>
2
+
3
+ source [file join [file dirname [info script]] theme dark.tcl]
4
+
5
+ option add *tearOff 0
6
+
7
+ proc set_theme {mode} {
8
+ if {$mode == "dark"} {
9
+ ttk::style theme use "sun-valley-dark"
10
+
11
+ array set colors {
12
+ -fg "#F6F6F7"
13
+ -bg "#0e0e0f"
14
+ -disabledfg "#F6F6F7"
15
+ -selectfg "#F6F6F7"
16
+ -selectbg "#003b50"
17
+ }
18
+
19
+ ttk::style configure . \
20
+ -background $colors(-bg) \
21
+ -foreground $colors(-fg) \
22
+ -troughcolor $colors(-bg) \
23
+ -focuscolor $colors(-selectbg) \
24
+ -selectbackground $colors(-selectbg) \
25
+ -selectforeground $colors(-selectfg) \
26
+ -insertwidth 0 \
27
+ -insertcolor $colors(-fg) \
28
+ -fieldbackground $colors(-selectbg) \
29
+ -font {"Century Gothic" 13} \
30
+ -borderwidth 0 \
31
+ -relief flat
32
+
33
+ tk_setPalette \
34
+ background [ttk::style lookup . -background] \
35
+ foreground [ttk::style lookup . -foreground] \
36
+ highlightColor [ttk::style lookup . -focuscolor] \
37
+ selectBackground [ttk::style lookup . -selectbackground] \
38
+ selectForeground [ttk::style lookup . -selectforeground] \
39
+ activeBackground [ttk::style lookup . -selectbackground] \
40
+ activeForeground [ttk::style lookup . -selectforeground]
41
+
42
+ ttk::style map . -foreground [list disabled $colors(-disabledfg)]
43
+
44
+ option add *font [ttk::style lookup . -font]
45
+ option add *Menu.selectcolor $colors(-fg)
46
+ option add *Menu.background #0e0e0f
47
+
48
+ }
49
+ }
gui_data/sv_ttk/theme/dark.tcl ADDED
@@ -0,0 +1,540 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright © 2021 rdbende <[email protected]>
2
+
3
+ # A stunning dark theme for ttk based on Microsoft's Sun Valley visual style
4
+
5
+ package require Tk 8.6
6
+
7
+ namespace eval ttk::theme::sun-valley-dark {
8
+ variable version 1.0
9
+ package provide ttk::theme::sun-valley-dark $version
10
+
11
+ ttk::style theme create sun-valley-dark -parent clam -settings {
12
+ proc load_images {imgdir} {
13
+ variable images
14
+ foreach file [glob -directory $imgdir *.png] {
15
+ set images([file tail [file rootname $file]]) \
16
+ [image create photo -file $file -format png]
17
+ }
18
+ }
19
+
20
+ load_images [file join [file dirname [info script]] dark]
21
+
22
+ array set colors {
23
+ -fg "#F6F6F7"
24
+ -bg "#0e0e0f"
25
+ -disabledfg "#F6F6F7"
26
+ -selectfg "#ffffff"
27
+ -selectbg "#2f60d8"
28
+ }
29
+
30
+ ttk::style layout TButton {
31
+ Button.button -children {
32
+ Button.padding -children {
33
+ Button.label -side left -expand 1
34
+ }
35
+ }
36
+ }
37
+
38
+ ttk::style layout Toolbutton {
39
+ Toolbutton.button -children {
40
+ Toolbutton.padding -children {
41
+ Toolbutton.label -side left -expand 1
42
+ }
43
+ }
44
+ }
45
+
46
+ ttk::style layout TMenubutton {
47
+ Menubutton.button -children {
48
+ Menubutton.padding -children {
49
+ Menubutton.label -side left -expand 1
50
+ Menubutton.indicator -side right -sticky nsew
51
+ }
52
+ }
53
+ }
54
+
55
+ ttk::style layout TOptionMenu {
56
+ OptionMenu.button -children {
57
+ OptionMenu.padding -children {
58
+ OptionMenu.label -side left -expand 0
59
+ OptionMenu.indicator -side right -sticky nsew
60
+ }
61
+ }
62
+ }
63
+
64
+ ttk::style layout Accent.TButton {
65
+ AccentButton.button -children {
66
+ AccentButton.padding -children {
67
+ AccentButton.label -side left -expand 1
68
+ }
69
+ }
70
+ }
71
+
72
+ ttk::style layout Titlebar.TButton {
73
+ TitlebarButton.button -children {
74
+ TitlebarButton.padding -children {
75
+ TitlebarButton.label -side left -expand 1
76
+ }
77
+ }
78
+ }
79
+
80
+ ttk::style layout Close.Titlebar.TButton {
81
+ CloseButton.button -children {
82
+ CloseButton.padding -children {
83
+ CloseButton.label -side left -expand 1
84
+ }
85
+ }
86
+ }
87
+
88
+ ttk::style layout TCheckbutton {
89
+ Checkbutton.button -children {
90
+ Checkbutton.padding -children {
91
+ Checkbutton.indicator -side left
92
+ Checkbutton.label -side right -expand 1
93
+ }
94
+ }
95
+ }
96
+
97
+ ttk::style layout Switch.TCheckbutton {
98
+ Switch.button -children {
99
+ Switch.padding -children {
100
+ Switch.indicator -side left
101
+ Switch.label -side right -expand 1
102
+ }
103
+ }
104
+ }
105
+
106
+ ttk::style layout Toggle.TButton {
107
+ ToggleButton.button -children {
108
+ ToggleButton.padding -children {
109
+ ToggleButton.label -side left -expand 1
110
+ }
111
+ }
112
+ }
113
+
114
+ ttk::style layout TRadiobutton {
115
+ Radiobutton.button -children {
116
+ Radiobutton.padding -children {
117
+ Radiobutton.indicator -side left
118
+ Radiobutton.label -side right -expand 1
119
+ }
120
+ }
121
+ }
122
+
123
+ ttk::style layout Vertical.TScrollbar {
124
+ Vertical.Scrollbar.trough -sticky ns -children {
125
+ Vertical.Scrollbar.uparrow -side top
126
+ Vertical.Scrollbar.downarrow -side bottom
127
+ Vertical.Scrollbar.thumb -expand 1
128
+ }
129
+ }
130
+
131
+ ttk::style layout Horizontal.TScrollbar {
132
+ Horizontal.Scrollbar.trough -sticky ew -children {
133
+ Horizontal.Scrollbar.leftarrow -side left
134
+ Horizontal.Scrollbar.rightarrow -side right
135
+ Horizontal.Scrollbar.thumb -expand 1
136
+ }
137
+ }
138
+
139
+ ttk::style layout TSeparator {
140
+ TSeparator.separator -sticky nsew
141
+ }
142
+
143
+ ttk::style layout TCombobox {
144
+ Combobox.field -sticky nsew -children {
145
+ Combobox.padding -expand 1 -sticky nsew -children {
146
+ Combobox.textarea -sticky nsew
147
+ }
148
+ }
149
+ null -side right -sticky ns -children {
150
+ Combobox.arrow -sticky nsew
151
+ }
152
+ }
153
+
154
+ ttk::style layout TSpinbox {
155
+ Spinbox.field -sticky nsew -children {
156
+ Spinbox.padding -expand 1 -sticky nsew -children {
157
+ Spinbox.textarea -sticky nsew
158
+ }
159
+
160
+ }
161
+ null -side right -sticky nsew -children {
162
+ Spinbox.uparrow -side left -sticky nsew
163
+ Spinbox.downarrow -side right -sticky nsew
164
+ }
165
+ }
166
+
167
+ ttk::style layout Card.TFrame {
168
+ Card.field {
169
+ Card.padding -expand 1
170
+ }
171
+ }
172
+
173
+ ttk::style layout TLabelframe {
174
+ Labelframe.border {
175
+ Labelframe.padding -expand 1 -children {
176
+ Labelframe.label -side left
177
+ }
178
+ }
179
+ }
180
+
181
+ ttk::style layout TNotebook {
182
+ Notebook.border -children {
183
+ TNotebook.Tab -expand 1
184
+ Notebook.client -sticky nsew
185
+ }
186
+ }
187
+
188
+ ttk::style layout Treeview.Item {
189
+ Treeitem.padding -sticky nsew -children {
190
+ Treeitem.image -side left -sticky {}
191
+ Treeitem.indicator -side left -sticky {}
192
+ Treeitem.text -side left -sticky {}
193
+ }
194
+ }
195
+
196
+ # Button
197
+ ttk::style configure TButton -padding {8 4} -anchor center -foreground $colors(-fg)
198
+
199
+ ttk::style map TButton -foreground \
200
+ [list disabled #7a7a7a \
201
+ pressed #d0d0d0]
202
+
203
+ ttk::style element create Button.button image \
204
+ [list $images(button-rest) \
205
+ {selected disabled} $images(button-disabled) \
206
+ disabled $images(button-disabled) \
207
+ selected $images(button-rest) \
208
+ pressed $images(button-pressed) \
209
+ active $images(button-hover) \
210
+ ] -border 4 -sticky nsew
211
+
212
+ # Toolbutton
213
+ ttk::style configure Toolbutton -padding {8 4} -anchor center
214
+
215
+ ttk::style element create Toolbutton.button image \
216
+ [list $images(empty) \
217
+ {selected disabled} $images(button-disabled) \
218
+ selected $images(button-rest) \
219
+ pressed $images(button-pressed) \
220
+ active $images(button-hover) \
221
+ ] -border 4 -sticky nsew
222
+
223
+ # Menubutton
224
+ ttk::style configure TMenubutton -padding {8 4 0 4}
225
+
226
+ ttk::style element create Menubutton.button \
227
+ image [list $images(button-rest) \
228
+ disabled $images(button-disabled) \
229
+ pressed $images(button-pressed) \
230
+ active $images(button-hover) \
231
+ ] -border 4 -sticky nsew
232
+
233
+ ttk::style element create Menubutton.indicator image $images(arrow-down) -width 28 -sticky {}
234
+
235
+ # OptionMenu
236
+ ttk::style configure TOptionMenu -padding {8 4 0 4}
237
+ ttk::style configure OptionMenudropdown -borderwidth 0 -relief ridge
238
+
239
+ ttk::style element create OptionMenu.button \
240
+ image [list $images(button-rest) \
241
+ disabled $images(button-disabled) \
242
+ pressed $images(button-pressed) \
243
+ active $images(button-hover) \
244
+ ] -border 0 -sticky nsew
245
+
246
+ ttk::style element create OptionMenu.indicator image $images(arrow-down) -width 28 -sticky {}
247
+
248
+ # Accent.TButton
249
+ ttk::style configure Accent.TButton -padding {8 4} -anchor center -foreground #ffffff
250
+
251
+ ttk::style map Accent.TButton -foreground \
252
+ [list pressed #25536a \
253
+ disabled #a5a5a5]
254
+
255
+ ttk::style element create AccentButton.button image \
256
+ [list $images(button-accent-rest) \
257
+ {selected disabled} $images(button-accent-disabled) \
258
+ disabled $images(button-accent-disabled) \
259
+ selected $images(button-accent-rest) \
260
+ pressed $images(button-accent-pressed) \
261
+ active $images(button-accent-hover) \
262
+ ] -border 4 -sticky nsew
263
+
264
+ # Titlebar.TButton
265
+ ttk::style configure Titlebar.TButton -padding {8 4} -anchor center -foreground #ffffff
266
+
267
+ ttk::style map Titlebar.TButton -foreground \
268
+ [list disabled #6f6f6f \
269
+ pressed #d1d1d1 \
270
+ active #ffffff]
271
+
272
+ ttk::style element create TitlebarButton.button image \
273
+ [list $images(empty) \
274
+ disabled $images(empty) \
275
+ pressed $images(button-titlebar-pressed) \
276
+ active $images(button-titlebar-hover) \
277
+ ] -border 4 -sticky nsew
278
+
279
+ # Close.Titlebar.TButton
280
+ ttk::style configure Close.Titlebar.TButton -padding {8 4} -anchor center -foreground #ffffff
281
+
282
+ ttk::style map Close.Titlebar.TButton -foreground \
283
+ [list disabled #6f6f6f \
284
+ pressed #e8bfbb \
285
+ active #ffffff]
286
+
287
+ ttk::style element create CloseButton.button image \
288
+ [list $images(empty) \
289
+ disabled $images(empty) \
290
+ pressed $images(button-close-pressed) \
291
+ active $images(button-close-hover) \
292
+ ] -border 4 -sticky nsew
293
+
294
+ # Checkbutton
295
+ ttk::style configure TCheckbutton -padding 2
296
+
297
+ ttk::style element create Checkbutton.indicator image \
298
+ [list $images(check-unsel-rest) \
299
+ {alternate disabled} $images(check-tri-disabled) \
300
+ {selected disabled} $images(check-disabled) \
301
+ disabled $images(check-unsel-disabled) \
302
+ {pressed alternate} $images(check-tri-hover) \
303
+ {active alternate} $images(check-tri-hover) \
304
+ alternate $images(check-tri-rest) \
305
+ {pressed selected} $images(check-hover) \
306
+ {active selected} $images(check-hover) \
307
+ selected $images(check-rest) \
308
+ {pressed !selected} $images(check-unsel-pressed) \
309
+ active $images(check-unsel-hover) \
310
+ ] -width 26 -sticky w
311
+
312
+ # Switch.TCheckbutton
313
+ ttk::style element create Switch.indicator image \
314
+ [list $images(switch-off-rest) \
315
+ {selected disabled} $images(switch-on-disabled) \
316
+ disabled $images(switch-off-disabled) \
317
+ {pressed selected} $images(switch-on-pressed) \
318
+ {active selected} $images(switch-on-hover) \
319
+ selected $images(switch-on-rest) \
320
+ {pressed !selected} $images(switch-off-pressed) \
321
+ active $images(switch-off-hover) \
322
+ ] -width 46 -sticky w
323
+
324
+ # Toggle.TButton
325
+ ttk::style configure Toggle.TButton -padding {8 4 8 4} -anchor center -foreground $colors(-fg)
326
+
327
+ ttk::style map Toggle.TButton -foreground \
328
+ [list {selected disabled} #a5a5a5 \
329
+ {selected pressed} #d0d0d0 \
330
+ selected #ffffff \
331
+ pressed #25536a \
332
+ disabled #7a7a7a
333
+ ]
334
+
335
+
336
+ ttk::style element create ToggleButton.button image \
337
+ [list $images(button-rest) \
338
+ {selected disabled} $images(button-accent-disabled) \
339
+ disabled $images(button-disabled) \
340
+ {pressed selected} $images(button-rest) \
341
+ {active selected} $images(button-accent-hover) \
342
+ selected $images(button-accent-rest) \
343
+ {pressed !selected} $images(button-accent-rest) \
344
+ active $images(button-hover) \
345
+ ] -border 4 -sticky nsew
346
+
347
+ # Radiobutton
348
+ ttk::style configure TRadiobutton -padding 0
349
+
350
+ ttk::style element create Radiobutton.indicator image \
351
+ [list $images(radio-unsel-rest) \
352
+ {selected disabled} $images(radio-disabled) \
353
+ disabled $images(radio-unsel-disabled) \
354
+ {pressed selected} $images(radio-pressed) \
355
+ {active selected} $images(radio-hover) \
356
+ selected $images(radio-rest) \
357
+ {pressed !selected} $images(radio-unsel-pressed) \
358
+ active $images(radio-unsel-hover) \
359
+ ] -width 20 -sticky w
360
+
361
+ ttk::style configure Menu.TRadiobutton -padding 0
362
+
363
+ ttk::style element create Menu.Radiobutton.indicator image \
364
+ [list $images(radio-unsel-rest) \
365
+ {selected disabled} $images(radio-disabled) \
366
+ disabled $images(radio-unsel-disabled) \
367
+ {pressed selected} $images(radio-pressed) \
368
+ {active selected} $images(radio-hover) \
369
+ selected $images(radio-rest) \
370
+ {pressed !selected} $images(radio-unsel-pressed) \
371
+ active $images(radio-unsel-hover) \
372
+ ] -width 20 -sticky w
373
+
374
+ # Scrollbar
375
+
376
+ #ttk::style layout Vertical.TScrollbar
377
+
378
+ ttk::style element create Horizontal.Scrollbar.trough image $images(scroll-hor-trough) -sticky ew -border 0
379
+ ttk::style element create Horizontal.Scrollbar.thumb image $images(scroll-hor-thumb) -sticky ew -border 3
380
+
381
+ ttk::style element create Horizontal.Scrollbar.rightarrow image $images(scroll-right) -sticky {} -width 13
382
+ ttk::style element create Horizontal.Scrollbar.leftarrow image $images(scroll-left) -sticky {} -width 13
383
+
384
+ ttk::style element create Vertical.Scrollbar.trough image $images(scroll-vert-trough) -sticky ns -border 0
385
+ ttk::style element create Vertical.Scrollbar.thumb image $images(scroll-vert-thumb) -sticky ns -border 3
386
+
387
+ ttk::style element create Vertical.Scrollbar.uparrow image $images(scroll-up) -sticky {} -height 13
388
+ ttk::style element create Vertical.Scrollbar.downarrow image $images(scroll-down) -sticky {} -height 13
389
+
390
+ # Scale
391
+ ttk::style element create Horizontal.Scale.trough image $images(scale-trough-hor) \
392
+ -border 5 -padding 0
393
+
394
+ ttk::style element create Vertical.Scale.trough image $images(scale-trough-vert) \
395
+ -border 5 -padding 0
396
+
397
+ ttk::style element create Scale.slider \
398
+ image [list $images(scale-thumb-rest) \
399
+ disabled $images(scale-thumb-disabled) \
400
+ pressed $images(scale-thumb-pressed) \
401
+ active $images(scale-thumb-hover) \
402
+ ] -sticky {}
403
+
404
+ # Progressbar
405
+ ttk::style element create Horizontal.Progressbar.trough image $images(progress-trough-hor) \
406
+ -border 1 -sticky ew
407
+
408
+ ttk::style element create Horizontal.Progressbar.pbar image $images(progress-pbar-hor) \
409
+ -border 2 -sticky ew
410
+
411
+ ttk::style element create Vertical.Progressbar.trough image $images(progress-trough-vert) \
412
+ -border 1 -sticky ns
413
+
414
+ ttk::style element create Vertical.Progressbar.pbar image $images(progress-pbar-vert) \
415
+ -border 2 -sticky ns
416
+
417
+ # Entry
418
+ ttk::style configure TEntry -foreground $colors(-fg)
419
+
420
+ ttk::style map TEntry -foreground \
421
+ [list disabled #757575 \
422
+ pressed #cfcfcf
423
+ ]
424
+
425
+ ttk::style element create Entry.field \
426
+ image [list $images(entry-rest) \
427
+ {focus hover !invalid} $images(entry-focus) \
428
+ invalid $images(entry-invalid) \
429
+ disabled $images(entry-disabled) \
430
+ {focus !invalid} $images(entry-focus) \
431
+ hover $images(entry-hover) \
432
+ ] -border 5 -padding 8 -sticky nsew
433
+
434
+ # Combobox
435
+ ttk::style configure TCombobox -foreground $colors(-fg)
436
+
437
+ ttk::style map TCombobox -foreground \
438
+ [list disabled #757575 \
439
+ pressed #cfcfcf
440
+ ]
441
+
442
+ ttk::style configure TCombobox -foreground $colors(-fg)
443
+ ttk::style configure ComboboxPopdownFrame -borderwidth 3 -relief solid
444
+
445
+ ttk::style map TCombobox -selectbackground [list \
446
+ {readonly hover} $colors(-selectbg) \
447
+ {readonly focus} $colors(-selectbg) \
448
+ ] -selectforeground [list \
449
+ {readonly hover} $colors(-selectfg) \
450
+ {readonly focus} $colors(-selectfg) \
451
+ ]
452
+
453
+ ttk::style element create Combobox.field \
454
+ image [list $images(button-rest) \
455
+ {readonly disabled} $images(button-disabled) \
456
+ {readonly pressed} $images(button-pressed) \
457
+ {readonly hover} $images(button-hover) \
458
+ readonly $images(button-rest) \
459
+ invalid $images(entry-invalid) \
460
+ disabled $images(entry-disabled) \
461
+ focus $images(entry-focus) \
462
+ hover $images(button-hover) \
463
+ ] -border 5 -padding 8 -sticky nsew
464
+
465
+ ttk::style element create Combobox.arrow image $images(arrow-down) -width 35 -sticky {}
466
+
467
+ # Spinbox
468
+ ttk::style configure TSpinbox -foreground $colors(-fg)
469
+
470
+ ttk::style map TSpinbox -foreground \
471
+ [list disabled #757575 \
472
+ pressed #cfcfcf
473
+ ]
474
+
475
+ ttk::style element create Spinbox.field \
476
+ image [list $images(entry-rest) \
477
+ invalid $images(entry-invalid) \
478
+ disabled $images(entry-disabled) \
479
+ focus $images(entry-focus) \
480
+ hover $images(entry-hover) \
481
+ ] -border 5 -padding {8 8 54 8} -sticky nsew
482
+
483
+ ttk::style element create Spinbox.uparrow image $images(arrow-up) -width 35 -sticky {}
484
+ ttk::style element create Spinbox.downarrow image $images(arrow-down) -width 35 -sticky {}
485
+
486
+ # Sizegrip
487
+ ttk::style element create Sizegrip.sizegrip image $images(sizegrip) \
488
+ -sticky nsew
489
+
490
+ # Separator
491
+ ttk::style element create TSeparator.separator image $images(separator)
492
+
493
+ # Card
494
+ ttk::style element create Card.field image $images(card) \
495
+ -border 10 -padding 4 -sticky nsew
496
+
497
+ # Labelframe
498
+ ttk::style element create Labelframe.border image $images(card) \
499
+ -border 5 -padding 4 -sticky nsew
500
+
501
+ # Notebook
502
+ ttk::style configure TNotebook -padding 1
503
+
504
+ ttk::style element create Notebook.border \
505
+ image $images(notebook-border) -border 5 -padding 5
506
+
507
+ ttk::style element create Notebook.client image $images(notebook)
508
+
509
+ ttk::style element create Notebook.tab \
510
+ image [list $images(tab-rest) \
511
+ selected $images(tab-selected) \
512
+ active $images(tab-hover) \
513
+ ] -border 13 -padding {16 14 16 6} -height 32
514
+
515
+ # Treeview
516
+ ttk::style element create Treeview.field image $images(card) \
517
+ -border 5
518
+
519
+ ttk::style element create Treeheading.cell \
520
+ image [list $images(treeheading-rest) \
521
+ pressed $images(treeheading-pressed) \
522
+ active $images(treeheading-hover)
523
+ ] -border 5 -padding 15 -sticky nsew
524
+
525
+ ttk::style element create Treeitem.indicator \
526
+ image [list $images(arrow-right) \
527
+ user2 $images(empty) \
528
+ user1 $images(arrow-down) \
529
+ ] -width 26 -sticky {}
530
+
531
+ ttk::style configure Treeview -background $colors(-bg) -rowheight [expr {[font metrics font -linespace] + 2}]
532
+ ttk::style map Treeview \
533
+ -background [list selected #292929] \
534
+ -foreground [list selected $colors(-selectfg)]
535
+
536
+ # Panedwindow
537
+ # Insane hack to remove clam's ugly sash
538
+ ttk::style configure Sash -gripcount 0
539
+ }
540
+ }
gui_data/sv_ttk/theme/dark/arrow-down.png ADDED
gui_data/sv_ttk/theme/dark/arrow-right.png ADDED
gui_data/sv_ttk/theme/dark/arrow-up.png ADDED
gui_data/sv_ttk/theme/dark/button-accent-disabled.png ADDED
gui_data/sv_ttk/theme/dark/button-accent-hover.png ADDED
gui_data/sv_ttk/theme/dark/button-accent-pressed.png ADDED
gui_data/sv_ttk/theme/dark/button-accent-rest.png ADDED
gui_data/sv_ttk/theme/dark/button-close-hover.png ADDED
gui_data/sv_ttk/theme/dark/button-close-pressed.png ADDED
gui_data/sv_ttk/theme/dark/button-disabled.png ADDED
gui_data/sv_ttk/theme/dark/button-hover.png ADDED
gui_data/sv_ttk/theme/dark/button-pressed.png ADDED
gui_data/sv_ttk/theme/dark/button-rest.png ADDED
gui_data/sv_ttk/theme/dark/button-titlebar-hover.png ADDED
gui_data/sv_ttk/theme/dark/button-titlebar-pressed.png ADDED
gui_data/sv_ttk/theme/dark/card.png ADDED