mirror of
				https://github.com/cookiengineer/audacity
				synced 2025-11-04 08:04:06 +01:00 
			
		
		
		
	Dark versions of spectrograms
- Paul made a comment about tweaking spectrogram colours.
This commit is contained in:
		
				
					committed by
					
						
						Paul Licameli
					
				
			
			
				
	
			
			
			
						parent
						
							931e483201
						
					
				
				
					commit
					459e824528
				
			@@ -75,6 +75,8 @@ def setup() :
 | 
				
			|||||||
    global sample_path
 | 
					    global sample_path
 | 
				
			||||||
    global sample
 | 
					    global sample
 | 
				
			||||||
    global sample2
 | 
					    global sample2
 | 
				
			||||||
 | 
					    global postfix
 | 
				
			||||||
 | 
					    postfix = ''
 | 
				
			||||||
    path = 'C:\\Users\\James Crook\\'
 | 
					    path = 'C:\\Users\\James Crook\\'
 | 
				
			||||||
    sample_path ='C:\\Users\\James Crook\\Music\\'
 | 
					    sample_path ='C:\\Users\\James Crook\\Music\\'
 | 
				
			||||||
    sample ='C:\\Users\\James Crook\\Music\\The Poodle Podcast.wav'
 | 
					    sample ='C:\\Users\\James Crook\\Music\\The Poodle Podcast.wav'
 | 
				
			||||||
@@ -91,6 +93,8 @@ def makeWayForTracks(  ) :
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
def capture( name, what ) :
 | 
					def capture( name, what ) :
 | 
				
			||||||
    global path
 | 
					    global path
 | 
				
			||||||
 | 
					    global postfix
 | 
				
			||||||
 | 
					    name = name.split( '.png' )[0] + postfix + '.png' 
 | 
				
			||||||
    do( 'Screenshot: Path="'+path+name+'" CaptureWhat=' + what )
 | 
					    do( 'Screenshot: Path="'+path+name+'" CaptureWhat=' + what )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def loadExample( name ):
 | 
					def loadExample( name ):
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -9,6 +9,7 @@
 | 
				
			|||||||
exec( open("docimages_core.py" ).read() )
 | 
					exec( open("docimages_core.py" ).read() )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import math
 | 
					import math
 | 
				
			||||||
 | 
					import time
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# 11 2KHz tones, of decreasing amplitude.
 | 
					# 11 2KHz tones, of decreasing amplitude.
 | 
				
			||||||
@@ -74,9 +75,10 @@ def setWindow( name, value ):
 | 
				
			|||||||
    do( 'SetTrack: SpecPrefs=1 Name="Window Size '+value+'"' )
 | 
					    do( 'SetTrack: SpecPrefs=1 Name="Window Size '+value+'"' )
 | 
				
			||||||
    do( 'SetPreference: Name="/Spectrum/FFTSize" Reload=1 Value='+value )
 | 
					    do( 'SetPreference: Name="/Spectrum/FFTSize" Reload=1 Value='+value )
 | 
				
			||||||
    do( 'SetTrack: Track=0 Display=Spectrogram' )
 | 
					    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, "256" )
 | 
				
			||||||
    setWindow( name, "512" )
 | 
					    setWindow( name, "512" )
 | 
				
			||||||
    setWindow( name, "2048" )
 | 
					    setWindow( name, "2048" )
 | 
				
			||||||
@@ -146,9 +148,25 @@ def spectro_imagesF():
 | 
				
			|||||||
        
 | 
					        
 | 
				
			||||||
#quickTest()
 | 
					#quickTest()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					do( 'SetPreference: Name="/GUI/Theme" Value=light Reload=1' )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					postfix = ''
 | 
				
			||||||
spectro_imagesA()
 | 
					spectro_imagesA()
 | 
				
			||||||
spectro_imagesB()
 | 
					spectro_imagesB()
 | 
				
			||||||
spectro_imagesC()
 | 
					spectro_imagesC()
 | 
				
			||||||
spectro_imagesD()
 | 
					spectro_imagesD()
 | 
				
			||||||
spectro_imagesE()
 | 
					spectro_imagesE()
 | 
				
			||||||
spectro_imagesF()
 | 
					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' )
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user