Scripting 7.1. Scripting an editor from a shell script

From a Praat shell script, you can switch to an editor and back again:

sound$ = "hallo"
start = 0.3
finish = 0.7
sound = Read from file: sound$ + ".aifc"
View & Edit
editor: sound
Zoom: start, finish
endeditor
Play

This script reads a sound file from disk, pops up an editor for the resulting object, makes this editor zoom in on the part between 0.3 and 0.7 seconds, and returns to the Praat shell to play the entire sound.

After editor you can either give the unique id of the object, as above, or its name:

editor: "Sound " + sound$

Links to this page


© Paul Boersma 20140526