Skip to content

Commit

Permalink
changed spectrogram config
Browse files Browse the repository at this point in the history
  • Loading branch information
Taiko2k committed Mar 9, 2019
1 parent 4eab900 commit 79cf824
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 14 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@ v3.8.1
- Tweaked rename tracks to ignore bad file renames
- Tweaked showcase visualiser to activate more in upper ranges
- Tweaked showcase visualiser colourisation
- Tweaked spectrogram to toggle colours on re-select
- Improved mini-mode and queue-box to show filename if metadata missing
- Fixed enable move folder setting persisting
- Fixed rename tracks default template
- Fixed a possible crash when importing tracks with stats tab open
- Fixed clicking between buttons in view box causing it to close
- Removed spectrogram colour config

v3.8.0

Expand Down
7 changes: 0 additions & 7 deletions config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,9 @@ plex-servname=
#disable-linux-mpris

### --- Spectrogram ----------------------------------------------------------------------------------
### Base colour is the background colour. Are R,G,B int values. Must be from 0 to 255.
### Colour multiply values produce the foreground colour. Are R,G,B float values. Can be 0 to 1 or greater.

vis-scroll

#vis-base-colour=10,10,10
#vis-colour-multiply=2,1.2,5

### Colour of the bar spectrum visualiser is set per theme in the theme files under the 'music vis' label
### Colours of the level meter cannot currently be configured

### --- View -------------------------------------------------------------------------------------------

Expand Down
37 changes: 30 additions & 7 deletions tauon.py
Original file line number Diff line number Diff line change
Expand Up @@ -696,6 +696,8 @@ def __init__(self):
self.showcase_vis = True
self.show_lyrics_showcase = True

self.spec2_colour_mode = 0


prefs = Prefs()

Expand Down Expand Up @@ -937,6 +939,7 @@ def __init__(self):
#self.vis_4_colour = [0,0,0,255]
self.vis_4_colour = None


gui = GuiVar()


Expand Down Expand Up @@ -1563,6 +1566,8 @@ def show_message(text, message_mode='info', subtext=""):
prefs.tabs_on_top = save[107]
if save[108] is not None:
prefs.showcase_vis = save[108]
if save[109] is not None:
prefs.spec2_colour_mode = save[109]

state_file.close()
del save
Expand Down Expand Up @@ -1800,12 +1805,12 @@ def track_number_process(line):

if 'vis-scroll' in p:
prefs.spec2_scroll = True
if 'vis-base-colour=' in p:
result = p.split('=')[1]
prefs.spec2_base = list(map(int, result.split(',')))
if 'vis-colour-multiply=' in p:
result = p.split('=')[1]
prefs.spec2_multiply = list(map(float, result.split(',')))
# if 'vis-base-colour=' in p:
# result = p.split('=')[1]
# prefs.spec2_base = list(map(int, result.split(',')))
# if 'vis-colour-multiply=' in p:
# result = p.split('=')[1]
# prefs.spec2_multiply = list(map(float, result.split(',')))

# if 'rename-tracks-default=' in p:
# result = p.split('=')[1]
Expand Down Expand Up @@ -10881,10 +10886,17 @@ def spec_on():
vis_menu.add(_("Spectrum Visualizer"), spec_on)

def spec2_def():

if gui.vis_want == 3:
prefs.spec2_colour_mode += 1
if prefs.spec2_colour_mode > 1:
prefs.spec2_colour_mode = 0

gui.vis_want = 3
#gui.turbo = True
prefs.spec2_colour_setting = 'custom'
gui.update_layout()

vis_menu.add(_("Spectrogram"), spec2_def)

def sa_remove(h):
Expand Down Expand Up @@ -20413,6 +20425,16 @@ def update_layout_do():

#print("TEST")

if prefs.spec2_colour_mode == 0:
prefs.spec2_base = [10, 10, 100]
prefs.spec2_multiply = [0.5, 1, 1]
elif prefs.spec2_colour_mode == 1:
prefs.spec2_base = [10, 10, 10]
prefs.spec2_multiply = [2, 1.2, 5]
# elif prefs.spec2_colour_mode == 2:
# prefs.spec2_base = [10, 100, 10]
# prefs.spec2_multiply = [1, -1, 0.4]

gui.draw_vis4_top = False

if gui.combo_mode and prefs.showcase_vis and not gui.mode == 3:
Expand Down Expand Up @@ -20796,7 +20818,8 @@ def save_state():
prefs.window_opacity,
prefs.gallery_single_click,
prefs.tabs_on_top,
prefs.showcase_vis]
prefs.showcase_vis,
prefs.spec2_colour_mode]

#print(prefs.last_device + "-----")

Expand Down

0 comments on commit 79cf824

Please sign in to comment.