From 459e82452873f42b14031cc2a8f13d8fa740bab1 Mon Sep 17 00:00:00 2001 From: James Crook Date: Tue, 20 Feb 2018 15:08:51 +0000 Subject: [PATCH] Dark versions of spectrograms - Paul made a comment about tweaking spectrogram colours. --- scripts/piped-work/docimages_core.py | 4 ++++ scripts/piped-work/docimages_spectro.py | 22 ++++++++++++++++++++-- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/scripts/piped-work/docimages_core.py b/scripts/piped-work/docimages_core.py index 066c82340..991a9b509 100644 --- a/scripts/piped-work/docimages_core.py +++ b/scripts/piped-work/docimages_core.py @@ -75,6 +75,8 @@ def setup() : global sample_path global sample global sample2 + global postfix + postfix = '' path = 'C:\\Users\\James Crook\\' sample_path ='C:\\Users\\James Crook\\Music\\' sample ='C:\\Users\\James Crook\\Music\\The Poodle Podcast.wav' @@ -91,6 +93,8 @@ def makeWayForTracks( ) : def capture( name, what ) : global path + global postfix + name = name.split( '.png' )[0] + postfix + '.png' do( 'Screenshot: Path="'+path+name+'" CaptureWhat=' + what ) def loadExample( name ): diff --git a/scripts/piped-work/docimages_spectro.py b/scripts/piped-work/docimages_spectro.py index 1b8f66cb7..7d734c8cf 100644 --- a/scripts/piped-work/docimages_spectro.py +++ b/scripts/piped-work/docimages_spectro.py @@ -9,6 +9,7 @@ exec( open("docimages_core.py" ).read() ) import math +import time # 11 2KHz tones, of decreasing amplitude. @@ -74,9 +75,10 @@ def setWindow( name, value ): do( 'SetTrack: SpecPrefs=1 Name="Window Size '+value+'"' ) do( 'SetPreference: Name="/Spectrum/FFTSize" Reload=1 Value='+value ) do( 'SetTrack: Track=0 Display=Spectrogram' ) - capture( name + value + '.png', 'All_Tracks' ) + capture( name + postfix + value + '.png', 'All_Tracks' ) -def multiWindow( name ) : + +def multiWindow( name ) : setWindow( name, "256" ) setWindow( name, "512" ) setWindow( name, "2048" ) @@ -146,9 +148,25 @@ def spectro_imagesF(): #quickTest() +do( 'SetPreference: Name="/GUI/Theme" Value=light Reload=1' ) + + +postfix = '' spectro_imagesA() spectro_imagesB() spectro_imagesC() spectro_imagesD() spectro_imagesE() spectro_imagesF() + +do( 'SetPreference: Name="/GUI/Theme" Value=dark Reload=1' ) + +postfix = 'Dark' +spectro_imagesA() +spectro_imagesB() +spectro_imagesC() +spectro_imagesD() +spectro_imagesE() +spectro_imagesF() + +do( 'SetPreference: Name="/GUI/Theme" Value=light Reload=1' )