dear Julek,
when you report a bug in your script, there are typically three things we need to know:
1. in what situation did you run it (Praat version, platform, the data)?
2. what did you expect would happen (e.g. the script should walk through all files, writing XXX into file YYY)?
3. what happened instead (if there was an error message, then please cite it in its entirety)?
Without those things, I will not be able to see where the biggest (or first) problem lies.
One thing that I see in your code is:
Filter (pre-emphasis): 50
soundFiltered = selected ('sound')
Here you mean
Filter (pre-emphasis): 50
soundFiltered = selected ("Sound")
Otherwise, your third line (which is superfluous, by the way) will give the error "No object with number 1" or so, if the second line doesn't give an error. Thus, `sound` is the ID of the Sound object that you created earlier, and if that is 123, your
second line is trying to get the ID of the 123th currently selected object, which is something totally different.
In any case, the following would be better, and works in a single line:
soundFiltered = Filter (pre-emphasis): 50
best wishes,
Paul
On 12 Mar 2023, at 10:00, julekcecelewski via groups.io <julekcecelewski@...> wrote:
Hello everyone,
I am currently writing a fairly simple Praat script, but I can't seem to find the error. I am attaching my script and I am certain that someone more experienced than me will immediately see the problem. Thank you for your responses, and sorry if this problem
is too basic for your level, please be patient with the beginner that I am.
<script_analyse_formants_l_test.praat>
_____
Paul Boersma
Professor of Phonetic Sciences
University of Amsterdam
Spuistraat 134, room 632
1012VB Amsterdam, The Netherlands
http://www.fon.hum.uva.nl/paul/