Skip to content

Commit

Permalink
Split up long string literals in Praat manual pages such that MSVC ca…
Browse files Browse the repository at this point in the history
…n handle them
  • Loading branch information
YannickJadoul committed Aug 7, 2024
1 parent d6915ce commit dc4f492
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 44 deletions.
2 changes: 1 addition & 1 deletion praat/dwtools/manual_KlattGrid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ Settings
################################################################################
"KlattGrid: Extract oral formant grid (open phases)..."
© David Weenink 2009-04-21
)~~~" R"~~~(
Extracts the oral formant grid as used in the synthesis, i.e. the resulting grid contains
the informantion from the oral formant grid and the delta formant grid combined during the open phase of the glottis.
Expand Down
2 changes: 1 addition & 1 deletion praat/fon/manual_commands.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ Macintosh
If you are user #miep, your Praat preferences folder will be `/Users/miep/Library/Preferences/Praat Prefs/`.
Linux
=====
=====)~~~" R"~~~(
If your home folder is #`/home/miep/`, your Praat preferences folder will be `/home/miep/.praat-dir/`.
################################################################################
Expand Down
32 changes: 16 additions & 16 deletions praat/fon/manual_functions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ A growing list of functions that you can use in @formulas and @scripting...
, @`randomUniform` (%`min`, %`max`) – uniformly distributed random deviate
, @`randomUniform#` (%`n`, %`min`, %`max`) – %n independent uniformly distributed random numbers
, @`randomUniform#` (%`vector#`, %min, %max) – duplicate %`vector#`,
and replace all elements with independent uniformly distributed random numbers
and replace all elements with independent uniformly distributed random numbers)~~~" R"~~~(
, @`randomUniform##` (%`nrow`, %`ncol`, %`min`, %`max`) – %`nrow` \xx %`ncol` independent uniformly distributed random numbers
, @`randomUniform##` (%`matrix##`, %`min`, %`max`) – duplicate %`matrix##`,
and replace all cells with independent uniformly distributed random numbers
Expand All @@ -253,7 +253,7 @@ A growing list of functions that you can use in @formulas and @scripting...
, @`readLinesFromFile$#` (%`filePath$`) – read all lines from a text file
, @`rectify` (%`x`) – set to zero if negative (no change if positive)
, @`rectify#` (%`vector#`) – rectify each element of %`vector#`
, @`rectify##` (%`matrix##`) – rectify each cell of %`matrix##`)~~~" R"~~~(
, @`rectify##` (%`matrix##`) – rectify each cell of %`matrix##`
, @`removeObject` (`...`) – remove objects from the list, by ID and/or name
, @`repeat#` (%`v#`, %`n`) – repeat the whole sequence of elements of %`v#` %`n` times
, @`replace$` (%`a$`, %`b$`, %`c$`, %`n`) – within %`a$`, replace the first %`n` occurrences of %`b$` with %`c$`, or all if %`n` = 0
Expand Down Expand Up @@ -670,7 +670,7 @@ Tests
"`arctan#`"
© Paul Boersma 2023
A function that can be used in @@Formulas@.
A function that can be used in @@Formulas@.)~~~" R"~~~(
Syntax and semantics
====================
Expand Down Expand Up @@ -784,7 +784,7 @@ Examples
This is an assertion that is satisfied:
{
a = 5*6
\#{assert} a = 30)~~~" R"~~~(
\#{assert} a = 30
writeInfoLine: a
}
This is an assertion that is violated:
Expand Down Expand Up @@ -1201,7 +1201,7 @@ A function that can be used in @@Formulas@.
Syntax and semantics
====================
#`cos#` (%`v#`)
#`cos#` (%`v#`))~~~" R"~~~(
: compute the cosine (@`cos`) of each element of the vector %`v#`.
################################################################################
Expand Down Expand Up @@ -1391,7 +1391,7 @@ Syntax and semantics
: determine whether the user clicked in the Demo window.
Usage
=====)~~~" R"~~~(
=====
This function is usually called after a user event has been detected (with @`demoWaitForInput`),
and is typically followed by determing the location of the click
(with @`demoX`) and @`demoY`, or with @`demoClickedIn`).
Expand Down Expand Up @@ -1807,7 +1807,7 @@ Syntax and semantics
Related function
================
The inverse of #`exp` is @`ln`.
)~~~" R"~~~(
################################################################################
"`exp#`"
© Paul Boersma 2023
Expand Down Expand Up @@ -2062,7 +2062,7 @@ Syntax and semantics
################################################################################
"`from_to_count#`"
© Paul Boersma 2023-06-30
)~~~" R"~~~(
A function that can be used in @@Formulas@.
Syntax and semantics
Expand Down Expand Up @@ -2383,7 +2383,7 @@ The possible results are all real numbers.
A function that can be used in @@Formulas@.
Syntax and semantics
====================
====================)~~~" R"~~~(
#`invSigmoid#` (%`v#`)
: compute the inverse sigmoid (@`invSigmoid`) of each element of the vector %`v#`.
Expand Down Expand Up @@ -2905,7 +2905,7 @@ Checks on the types of the arguments (always has to be matrix, number, number, n
asserterror The third argument of the function “part##” should be
... a number (the end row), not a string.
a## = part## (m##, 4, "hello", 66, 99)
)~~~" R"~~~(
asserterror The third argument of the function “part##” should be
... a number (the end row), not a numeric vector.
a## = part## (m##, 4, { 0 }, 66, 99)
Expand Down Expand Up @@ -3019,7 +3019,7 @@ Syntax and semantics
: format a number as a string,
with a trailing percent sign and %`precision` digits after the decimal point.
################################################################################)~~~" R"~~~(
################################################################################
"`phonToDifferenceLimens`"
© Paul Boersma 2002, 2023
Expand Down Expand Up @@ -3359,7 +3359,7 @@ Syntax and semantics
: generate %`n` independent uniformly distributed (@`randomUniform`) numbers.
#`randomUniform#` (%`model#`, %`min`, %`max`)
: create a vector with the same number of elements as %`model#`,
: create a vector with the same number of elements as %`model#`,)~~~" R"~~~(
and fill all elements with independent uniformly distributed numbers.
This is shorthand for doing
{;
Expand Down Expand Up @@ -3530,7 +3530,7 @@ Syntax and semantics
################################################################################
"`replace$`"
© Paul Boersma 2023
)~~~" R"~~~(
A function that can be used in @Formulas.
Syntax and semantics
Expand Down Expand Up @@ -3920,7 +3920,7 @@ Assume that at the start of the following script, the list of objects is empty:
pulses = To PointProcess (cc)
plusObject: sound
}
At this point, the list of objects will contain three objects,
At this point, the list of objects will contain three objects,)~~~" R"~~~(
which will look as follows (ID, type name, given name),
where the two that stand selected are given in bold:
`
Expand Down Expand Up @@ -4478,7 +4478,7 @@ Syntax and semantics
#`tan#` (%`v#`)
: compute the tangent (@`tan`) of each element of the vector %`v#`.
################################################################################)~~~" R"~~~(
################################################################################
"`tan##`"
© Paul Boersma 2023
Expand Down Expand Up @@ -4516,7 +4516,7 @@ Syntax and semantics
: compute the hyperbolic tangent (@`tanh`) of each element of the vector %`v#`.
################################################################################
"`tanh##`"
"`tanh##`")~~~" R"~~~(
© Paul Boersma 2023
A function that can be used in @@Formulas@.
Expand Down
6 changes: 3 additions & 3 deletions praat/fon/manual_licenses.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ Here is the Unicode Inc. license text:
This is the license under which Praat as a whole is distributed.
`
GNU GENERAL PUBLIC LICENSE
GNU GENERAL PUBLIC LICENSE)~~~" R"~~~(
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Expand Down Expand Up @@ -655,7 +655,7 @@ This is the license under which Praat as a whole is distributed.
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
)~~~" R"~~~(
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
Expand Down Expand Up @@ -962,7 +962,7 @@ This is the license under which Praat as a whole is distributed.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
)~~~" R"~~~(
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
Expand Down
4 changes: 2 additions & 2 deletions praat/fon/manual_pitch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -961,7 +961,7 @@ windowed signal by the autocorrelation function of the window:
~ %r_%x (%\ta) \~~ %r__%xw_ (%\ta) / %r_%w (%\ta)
The pitch is basically determined as the inverse of the time (%lag) where the autocorrelation function %r
The pitch is basically determined as the inverse of the time (%lag) where the autocorrelation function %r)~~~" R"~~~(
has its maximum. However, there are likely to be multiple peaks in %r,
and all of these can be %%pitch candidates%. For each moment in time (e.g. every 10 ms),
the algorithm determines the (typically) 15 highest peaks in %r,
Expand Down Expand Up @@ -1328,7 +1328,7 @@ the attenuation of higher candidates will then have the exact same shape:
One logarithmic mark left: 1200, "yes", "yes", "yes", ""
One logarithmic mark right: 1200, "no", "yes", "no", "top"
Text bottom: "no", "attenuation"
Text left: "yes", "pitch (Hz)"
Text left: "yes", "pitch (Hz)")~~~" R"~~~(
Colour: colour#
Line width: 3
attenuationAtFloor = 0.03 ^ (50/1200)^2
Expand Down
2 changes: 1 addition & 1 deletion praat/fon/manual_programming.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ on all platforms can meanwhile open and view all these versions correctly.
8. Interpreting trigraphs
=========================
The example above contains several phonetic symbols, and it is not always easy to type those into a text field.
The example above contains several phonetic symbols, and it is not always easy to type those into a text field.)~~~" R"~~~(
For this reason, Praat provides %trigraphs for most phonetic characters, as well as for many non-ASCII characters
used in the languages of the world. For instance, the vowel “ɔ” (a “turned c”) can be typed as `\\ct` into
the TextGrid window as well as anywhere else in Praat where you want to draw graphical text
Expand Down
10 changes: 5 additions & 5 deletions praat/fon/manual_sound.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ The spectral values at frequencies between 400 and 7900 Hz are set to zero.
Between 200 and 400 Hz and between 7900 and 8100 Hz, the values are multiplied by a raised sine,
so as to give a smooth transition without ringing in the time domain (the raised sine also allows us to view
the spectrum as a sum of spectral bands). Finally, a backward Fourier transform gives us the filtered sound.
)~~~" R"~~~(
The remaining part of the spectrum is divided into %%critical bands%, i.e. frequency bands one Bark wide.
For instance, the first critical band run from 300 to 406 Hz, the second from 406 to 520 Hz, and so on.
Each critical band is converted to a pass-band filtered sound by means of the backward Fourier transform.
Expand Down Expand Up @@ -935,7 +935,7 @@ This filter has an in-place version: @@Sound: Filter with one formant (in-place)
################################################################################
"Sound: Filter with one formant (in-place)..."
© Paul Boersma 2017-11-14
)~~~" R"~~~(
A command to filter every selected @Sound object in-place, with a single formant of a specified frequency and bandwidth.
This is the in-place version of @@Sound: Filter (one formant)...@,
Expand Down Expand Up @@ -1359,7 +1359,7 @@ Settings
If %t_1 is not less than %t_2, the entire time domain of the sound is considered.
##Interpolation
: the interpolation method (#none, #parabolic, #cubic, #sinc70, #sinc700) of the @@vector peak interpolation@.
: the interpolation method (#none, #parabolic, #cubic, #sinc70, #sinc700) of the @@vector peak interpolation@.)~~~" R"~~~(
The standard is “sinc70” because a Sound object is normally a sampled band-limited signal,
which can be seen as a sum of sinc functions.
Expand Down Expand Up @@ -1830,7 +1830,7 @@ Sound pressure calibration
Your computer's sound-recording software returns integer values between -32768 and 32767.
Praat divides them by 32768 before putting them into a Sound object,
so that the values in the Sound objects are always between -1 and +1.
)~~~" R"~~~(
The Praat program considers these numbers to be air pressures in units of Pascal,
but they are probably not the actual true air pressures that went into the microphone.
For how to obtain the true air pressures, perform a @@sound pressure calibration@.
Expand Down Expand Up @@ -2208,7 +2208,7 @@ If you consider the sounds outside their time domains as #similar to what they a
the discretized formula in 1 should be based on the average over the jointly defined values of %f[%\ta] and %g[%t−%\ta],
without counting any multiplications of values outside the time domains.
Suppose that %f is defined on the time domain [0, 1.2] with the value of 1 everywhere,
and %g is defined on the time domain [0, 3] with the value 1 everywhere.
and %g is defined on the time domain [0, 3] with the value 1 everywhere.)~~~" R"~~~(
Their cross-correlation under the assumption that they are #zero elsewhere is then
{ 5x3
short = Create Sound from formula: "short", 1, 0.0, 1.2, 1000, ~ 1
Expand Down
30 changes: 15 additions & 15 deletions praat/fon/manual_whatsnew.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ What used to be new?
• TextGrid window: repaired a bug introduced in 6.2.10 by which a click in the boundary insertion circle
would copy the contents of a new interval from another tier (if that other tier stood selected).
##6.2.13# (18 May 2022)
##6.2.13# (18 May 2022))~~~" R"~~~(
• Playing a sound on the Mac: prevented an audible click at the end of audio output (appending a silence at the end is no longer needed).
• FormantPath window: more flexible visualization.
• New versions of PortAudio and Unicode.
Expand Down Expand Up @@ -502,7 +502,7 @@ What used to be new?
• TextGrid window: removed a bug that caused Praat to crash when option-clicking or command-clicking a boundary when another boundary was selected on a point tier.
• @@Record Sound (fixed time)...@: removed a bug that caused Praat to crash with certain combinations of duration and sampling frequency on Windows.
• PowerCepstrogram: more precise integration, so that the cepstral peak prominence is now a continuous function of time.
• TextGrid: Get points (preceded): removed a bug that caused Praat to crash under some edge conditions.)~~~" R"~~~(
• TextGrid: Get points (preceded): removed a bug that caused Praat to crash under some edge conditions.
• Scripting: @`tryToWriteFile` () and @`tryToAppendFile` () should not be available in manuals.
##6.1.36# (6 December 2020)
Expand Down Expand Up @@ -703,7 +703,7 @@ then dragged the mouse out of that window, then released the mouse button, and t
• Removed a bug introduced in 6.0.44 whereby an MFCC's maximum frequency could be ignored.
• Pitch: Tabulate candidates.
• SoundSet.
)~~~" R"~~~(
##6.0.48# (17 February 2019)
• Removed a bug introduced in 6.0.44 whereby Praat could crash when drawing a function without any points.
• Removed a bug whereby Praat would not start up on macOS 10.10 (because of required GPU libraries).
Expand Down Expand Up @@ -870,7 +870,7 @@ then dragged the mouse out of that window, then released the mouse button, and t
##6.0.10# (8 January 2016)
• Corrected a bug that would cause Praat to crash when starting an ExperimentMFC window.
• Mac 64-bit: corrected a bug that would cause black selections in the Sound window.
)~~~" R"~~~(
##6.0.09# (1 January 2016)
• Windows 64-bit: corrected a bug that could cause Praat to crash when closing the Sound window after popping up dialog boxes.
Expand Down Expand Up @@ -1036,7 +1036,7 @@ the column index was larger than the number of rows.
• Manipulation: repaired a bug that could cause Praat to crash when playing a manipulation of a Sound created by the @SpeechSynthesizer.
##5.3.83# (16 August 2014)
• TextGrid window: repaired a bug with automatic alignment that could cause an analysis tier to go out of order.
• TextGrid window: repaired a bug with automatic alignment that could cause an analysis tier to go out of order.)~~~" R"~~~(
• Linux audio: created a second workaround that reduces even more the chances of a freeze that is due to a potential deadlock
in the collaboration between Alsa and PulseAudio that can occur when the playback of a sound is cancelled.
• Smoother communication with Phon.
Expand Down Expand Up @@ -1205,7 +1205,7 @@ the column index was larger than the number of rows.
• Phonetic symbols \ts, \tS and \ap.
• Network: ##Normalize weights...#, ##List weights...#, ##Weights down to Table...#.
##5.3.42# (2 March 2013))~~~" R"~~~(
##5.3.42# (2 March 2013)
• Repaired some minor bugs regarding synchronization between multiple windows.
##5.3.41# (9 February 2013)
Expand Down Expand Up @@ -1407,7 +1407,7 @@ and many more; also \_u (\bs\_ u). See @@Phonetic symbols: diacritics@.
##5.2.35# (5 August 2011)
• Corrected the menus of the Sound and TextGrid windows.
##5.2.34# (3 August 2011)
##5.2.34# (3 August 2011))~~~" R"~~~(
• @@Insert picture from file...@ now works on Windows (as well as on the Mac).
• Corrected a bug that could cause Praat to crash when playing a LongSound.
Expand Down Expand Up @@ -1587,7 +1587,7 @@ if the selection ran from the penultimate interval to the end of the TextGrid.
##5.1.39# (10 July 2010)
• GTK beta version.
• Linux: made @@Record Sound (fixed time)...|Sound: Record (fixed time)...@ work correctly (the sampling frequency was wrong).
• GTK: list of objects: multiple selection, working Rename button.)~~~" R"~~~(
• GTK: list of objects: multiple selection, working Rename button.
• GTK: running a script no longer deselects all objects at the start.
• GTK: working Buttons editor.
• GTK: correctly laid out settings windows.
Expand Down Expand Up @@ -1768,7 +1768,7 @@ if the selection ran from the penultimate interval to the end of the TextGrid.
• Articulatory synthesis: corrected a bug that could cause Praat to crash when copying Artwords.
• Macintosh: corrected a bug that could cause poor text alignment in picture.
##5.1.02# (9 March 2009)
##5.1.02# (9 March 2009))~~~" R"~~~(
• Allow pause forms without fields.
• The value “undefined” is disallowed from all fields in command windows
except ##Table: Set numeric value...# and @@TableOfReal: Set value...@.
Expand Down Expand Up @@ -1965,7 +1965,7 @@ if the names of these files or their directory paths contained non-ASCII charact
© Paul Boersma 2007
##5.0# (10 December 2007)
• Corrected many bugs.)~~~" R"~~~(
• Corrected many bugs.
• Display font sizes in points rather than pixels.
##4.6.41# (9 December 2007)
Expand Down Expand Up @@ -2146,7 +2146,7 @@ if the names of these files or their directory paths contained non-ASCII charact
• @@Table: Formula (column range)...@
• OT learning: OTGrammar window shows harmonies.
##4.5.24# (27 April 2007)
##4.5.24# (27 April 2007))~~~" R"~~~(
• OT learning: added decision strategy MaximumEntropy;
this has the same harmony determination method as Harmonic Grammar (include the additive constraint noise),
but there is some more variability, in that every candidate gets a relative probability of exp(harmony).
Expand Down Expand Up @@ -2324,7 +2324,7 @@ for a selected combination of independent variables.
• @@Table: Report mean (Student t)...|Table: Report mean...@.
• Formulas: @@Formulas 8. Attributes of objects|`row$` and `col$` attributes@.
• Warning when trying to read data files whose format is newer than the Praat version.
)~~~" R"~~~(
##4.4.16# (1 April 2006)
• Spectrum window: dynamic range setting.
• SoundRecorder: corrected a bug in the Intel Mac edition.
Expand Down Expand Up @@ -2542,7 +2542,7 @@ Praat 4.3, 26 January 2005
• PitchTier: To Sound (sine).
• Better warnings against use of the LPC object.
Voice:
Voice:)~~~" R"~~~(
• July 9, 2004 (4.2.08): Shimmer measurements: more accurate and less sensitive to additive noise.
• More extensive voice report: pitch statistics; harmonicity.
Expand Down Expand Up @@ -2723,7 +2723,7 @@ Phonology library:
Graphics:
• Improved spectrogram drawing.
• @@Special symbols@: háček.
• Macintosh: improved screen rendition of rotated text.)~~~" R"~~~(
• Macintosh: improved screen rendition of rotated text.
Audio:
• Macintosh: support for multiple audio input devices (sound cards).
Expand Down Expand Up @@ -2908,7 +2908,7 @@ Labelling
• ##TextTier: To TableOfReal...#.
Numerics and statistics library
• @@Multidimensional scaling@ (Kruskal, INDSCAL, etc).
• @@Multidimensional scaling@ (Kruskal, INDSCAL, etc).)~~~" R"~~~(
• @TableOfReal: @@TableOfReal: ||Set value...@, @@Formula...@,
##Remove column...#, ##Insert column...#,
##Draw as squares...#, ##To Matrix#.
Expand Down

0 comments on commit dc4f492

Please sign in to comment.