1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-05-01 16:19:43 +02:00

Add docimages_all.py script.

This commit is contained in:
James Crook 2018-02-16 13:12:42 +00:00 committed by Paul Licameli
parent 7cfe4ac20a
commit d7953e9ef4
6 changed files with 48 additions and 30 deletions

View File

@ -133,11 +133,12 @@ def biasDemo():
withDcBias( 0.1 )
capture( 'DcBias.png' , 'All_Tracks' )
#imageAfters( Commands, 'All_Tracks_Plus' ) # With ruler
#imageAfters( Effects, 'All_Tracks' ) # Without ruler
#imageAfters( Slow, 'All_Tracks' ) # Without ruler
#generators()
#spaceDemo()
imageSet("After")
imageAfters( Commands, 'All_Tracks_Plus' ) # With ruler
imageAfters( Effects, 'All_Tracks' ) # Without ruler
imageAfters( Slow, 'All_Tracks' ) # Without ruler
generators()
spaceDemo()
biasDemo()

View File

@ -0,0 +1,12 @@
# docimages_all.py
# Sends commands to get images for the manual.
# Execs all the docimage scripts.
# Make sure Audacity is running first and that mod-script-pipe is enabled
# before running this script.
exec( open("docimages_tracks.py" ).read() )
exec( open("docimages_labels.py" ).read() )
exec( open("docimages_spectro.py" ).read() )
exec( open("docimages_after.py" ).read() )

View File

@ -80,6 +80,9 @@ def setup() :
startPipes()
do( 'SetProject: X=10 Y=10 Width=850 Height=800' )
def imageSet(name):
print("****************** " + name + " ***************************")
def makeWayForTracks( ) :
do( 'Select: First=0 Last=20' )
do( 'RemoveTracks' )

View File

@ -48,7 +48,7 @@ def addLabels2():
do( 'Select: First=3 Last=3' )
def image1and2() :
def label_image1and2() :
makeStereoTracks(1)
addLabels()
# A stero track with four labels.
@ -60,7 +60,7 @@ def image1and2() :
do( "Select: Start=0 End=0 First=0 Last=2" )
capture( 'AutoLabels002.png','First_Two_Tracks' )
def image3and4() :
def label_image3and4() :
makeStereoTracks(1)
addLabels()
# Removing a label with split-delete step 1
@ -71,7 +71,7 @@ def image3and4() :
do( "SplitDelete" )
capture( 'AutoLabels004.png','First_Two_Tracks' )
def image5and6and7() :
def label_image5and6and7() :
makeStereoTracks(1)
addLabels2()
# Nothing selected
@ -85,7 +85,7 @@ def image5and6and7() :
do( "Select: Start=0 End=0" )
capture( 'AutoLabels007.png','First_Three_Tracks' )
def image8and9and10() :
def label_image8and9and10() :
makeStereoTracks(1)
addLabels2()
# Select nothing in all three tracks.
@ -102,10 +102,11 @@ def image8and9and10() :
do( 'Delete' )
capture( 'AutoLabels010.png','First_Three_Tracks' )
image1and2()
image3and4()
image5and6and7()
image8and9and10()
imageSet("Labels")
label_image1and2()
label_image3and4()
label_image5and6and7()
label_image8and9and10()

View File

@ -32,7 +32,7 @@ def makeStepper():
do( 'Select: Start=0 End=0')
def image1and2() :
def spectro_image1and2() :
loadStereoTracks(1)
# A stereo track
capture( 'Spectral001.png', 'First_Track' )
@ -42,7 +42,7 @@ def image1and2() :
do( 'Select: Start=55 End=70 First=0 Last=1')
capture( 'Spectral002.png', 'First_Track' )
def image3and4():
def spectro_image3and4():
makeStepper();
# Stepper tone, viewed in dB.
do( 'SetTrack: Scale=dB')
@ -53,6 +53,6 @@ def image3and4():
#quickTest()
image1and2()
image3and4()
spectro_image1and2()
spectro_image3and4()

View File

@ -10,7 +10,7 @@
exec( open("docimages_core.py" ).read() )
def image1and8() :
def track_image1and8() :
loadMonoTracks(1)
# A mono track complete with ruler
capture( 'AutoTracks001.png', 'First_Track_Plus' )
@ -18,7 +18,7 @@ def image1and8() :
do( 'SetClip: Clip=0 Start=-4.0')
capture( 'AutoTracks008.png', 'First_Track' )
def image2and6() :
def track_image2and6() :
makeStereoTracks(1)
# A stereo track, with its name on the track
capture( 'AutoTracks002.png', 'First_Track' )
@ -28,7 +28,7 @@ def image2and6() :
capture( 'AutoTracks006.png', 'First_Track' )
# Four colours of track
def image3() :
def track_image3() :
loadMonoTracks( 4 )
do( 'SetTrack: Track=0 Name="Instrument 1" Height=122 Color=Color0')
do( 'SetTrack: Track=1 Name="Instrument 2" Height=122 Color=Color1')
@ -36,7 +36,7 @@ def image3() :
do( 'SetTrack: Track=3 Name="Instrument 4" Height=122 Color=Color3')
capture( 'AutoTracks003.png', 'First_Four_Tracks' )
def image7and4and5():
def track_image7and4and5():
loadMonoTracks(2)
# Two mono tracks of different sizes
do( 'SetTrack: Track=0 Height=180')
@ -56,7 +56,7 @@ def image7and4and5():
capture( 'AutoTracks005.png', 'First_Track' )
def image9and10() :
def track_image9and10() :
#make rather than load. We want an artificial track.
makeMonoTracks(1)
# Zoomed in to show points stem-plot
@ -69,9 +69,10 @@ def image9and10() :
do( 'SetPreference: Name=/GUI/SampleView Value=0 Reload=1')
capture( 'AutoTracks010.png', 'First_Track' )
image1and8()
image2and6()
image3()
image7and4and5()
image9and10()
imageSet("Tracks")
track_image1and8()
track_image2and6()
track_image3()
track_image7and4and5()
track_image9and10()