Loading ...
Sorry, an error occurred while loading the content.

Re: [praat-users] difficulty of selection

Expand Messages
  • Paul Boersma
    Dear Veikko, the thing that goes wrong is exemplified by the following sequence: Move B to... 1.0 Move E to... 2.0 Move B to... 3.0 Move E to... 4.0 you would
    Message 1 of 3 , May 26, 2001
    View Source
    • 0 Attachment
      Dear Veikko,

      the thing that goes wrong is exemplified by the following sequence:

      Move B to... 1.0
      Move E to... 2.0
      Move B to... 3.0
      Move E to... 4.0

      you would think that after this, the selection would be from 3.0 to 4.0 seconds?
      Wrong! In the third line, you move B to 3.0 seconds. However, E was already
      at 2.0 seconds, so the roles of B and E now have to interchange, i.e. the selection
      runs from 2.0 to 3.0 seconds. With the fourth line, this is extended and
      becomes 2.0 to 4.0 seconds.

      You can prevent this by adding the line

      Move B to... 3.0

      again at the end, i.e.

      Move B to... sta
      Move E to... end
      Move B to... sta

      does the trick.

      However, your script contains several problems. First, it is not necessary
      to enter the editor at all: you can just select the Sound and do
      "Extract part... sta end".
      More seriously, large parts of the vowel will not be analysed
      because of the windowing. You might like to use "Extract part... sta-0.01 end+0.01"
      or so, depending on the length of your required unanalysed margins.
      Finally, your script mixes modern Praat-script syntax with the syntax
      of Praat scripts before June 1998, now undocumented. This makes the script less
      readable. Try:

      s1 = selected ("Sound")
      tg1 = selected ("TextGrid")
      select 'tg1'
      ivals = Get number of intervals... 1
      for i from 1 to ivals

      and so on.

      Best wishes,
      Paul
      --

      Paul Boersma
      Institute of Phonetic Sciences, University of Amsterdam
      Herengracht 338, 1016CG Amsterdam, The Netherlands
      http://www.fon.hum.uva.nl/paul/
      phone +31-20-5252385
    Your message has been successfully submitted and would be delivered to recipients shortly.