/* manual_TimeDomain.c
 *
 * Copyright (C) 1992-2004 Paul Boersma
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or (at
 * your option) any later version.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * See the GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */

#include "ManPagesM.h"
#include "PraatStrings.h"

#include "Sound.h"

void manual_TimeDomain_init (ManPages me);
void manual_TimeDomain_init (ManPages me) {

MAN_BEGIN ("time domain", "ppgb", 20040506)
INTRO ("This manual page assumes that you have read the @Intro.")
NORMAL ("Many objects in Praat are %%functions of time%. Examples are: "
	"@Sound, @Pitch, @Spectrogram, @Formant, @Intensity, @TextGrid, "
	"@PitchTier, @DurationTier, @Harmonicity, @PointProcess.")
NORMAL ("In Praat, these functions have a contiguous ##time domain#, i.e. "
	"a single time stretch with a @@starting time@ and a @@finishing time@. "
	"The @@total duration@ of such a function is the difference between the starting time "
	"and the finishing time. There are up to five ways to see the time domain "
	"of an object.")
ENTRY ("The time domain in editor windows")
NORMAL ("If you select an object that is a function of time and click #Edit, an editor window "
	"will appear on the screen. The rectangle at the bottom will show the starting time, "
	"the finishing time, and the total duration.")
ENTRY ("The time domain in the picture window")
NORMAL ("If you select an object that is a function of time and choose one of the #Draw commands, "
	"the settings window invites you to supply a time range. If you keep this time range "
	"at its standard setting (from 0.0 to 0.0 seconds), Praat will draw the object for the whole time domain "
	"and print the starting time and the finishing time below the horizontal axis (if #Garnish is on).")
ENTRY ("The time domain in the Info window")
NORMAL ("If you select an object that is a function of time and click #Info, "
	"the Info window will tell you the starting time, the finishing time, and the total duration (among other properties of the object).")
ENTRY ("Time domain query commands")
NORMAL ("If you select an object that is a function of time, "
	"the following three commands will become available in the #Query menu:")
LIST_ITEM ("##Get starting time")
LIST_ITEM ("##Get finishing time")
LIST_ITEM ("##Get total duration")
NORMAL ("If you choose one of these commands, the Info window will tell you the result, "
	"expressed in seconds. These commands are most useful in a Praat script. Example:")
CODE ("select Pitch hello")
CODE ("startingTime = Get starting time")
CODE ("finishingTime = Get finishing time")
CODE ("centreTime = (startingTime + finishingTime) / 2")
CODE ("echo This Pitch runs from 'startingTime' to 'finishingTime' seconds,")
CODE ("printline and the centre of its time domain is at 'centreTime' seconds.")
ENTRY ("Details for hackers")
NORMAL ("If you select an object that is a function of time and you click @Inspect, "
	"you can see how the time domain information is stored in the object: "
	"the starting time is the object's #xmin attribute and the finishing time is its #xmax attribute. "
	"The total duration is not stored in the object, since it can easily be computed as #xmax minus #xmin.")
MAN_END

MAN_BEGIN ("starting time", "ppgb", 20040420)
INTRO ("- the beginning of the @@time domain@ (see there).")
MAN_END

MAN_BEGIN ("finishing time", "ppgb", 20040420)
INTRO ("- the end of the @@time domain@ (see there).")
MAN_END

MAN_BEGIN ("total duration", "ppgb", 20040505)
INTRO ("- the extent of the @@time domain@ (see there).")
MAN_END

}

/* End of file manual_TimeDomain.c */
