how to run YIN starting at sound start + 0.25s?

Using Nyquist scripts in Audacity.
Post and download new plug-ins.
Forum rules
If you require help using Audacity, please post on the forum board relevant to your operating system:
Windows
Mac OS X
GNU/Linux and Unix-like
JimWI
Posts: 6
Joined: Tue Jan 05, 2021 3:40 pm
Operating System: Windows 10

Re: how to run YIN starting at sound start + 0.25s?

Post by JimWI » Tue Jan 05, 2021 4:49 pm


stepheneb
Posts: 33
Joined: Wed Jan 17, 2018 3:51 am
Operating System: macOS 10.15 Catalina

Re: how to run YIN starting at sound start + 0.25s?

Post by stepheneb » Tue Jan 05, 2021 5:04 pm

steve wrote:
Tue Jan 05, 2021 4:14 pm
JimWI wrote:
Tue Jan 05, 2021 3:53 pm
Any suggestions?
My guess is that you are trying to use the code on a stereo track.
stepheneb's code is written for mono tracks only.
Yes.

When I record in Audacity I'm collecting stereo data but delete one of the channels before running my scripts on mono data.

steve
Site Admin
Posts: 78703
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: how to run YIN starting at sound start + 0.25s?

Post by steve » Tue Jan 05, 2021 5:58 pm

JimWI wrote:
Tue Jan 05, 2021 4:49 pm
If it helps, I put 2 test files here:
https://chambersislandusa.com/mando/aud ... tnotes.wav (4 secs long)
https://chambersislandusa.com/mando/aud ... enotes.wav (12 secs)
Results from "testones.wav"

Code: Select all

time		frequency	RMS
0.000	5512.501		0.002
0.500	441.234		0.041
1.000	495.712		0.104
1.500	495.898		0.042
2.000	556.505		0.117
2.500	554.872		0.028
3.000	590.785		0.026
3.500	659.309		0.092
4.000	659.394		0.022

9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

steve
Site Admin
Posts: 78703
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: how to run YIN starting at sound start + 0.25s?

Post by steve » Tue Jan 05, 2021 6:01 pm

JimWI wrote:
Tue Jan 05, 2021 3:53 pm
Hello: I just tried your "updated" example on a file of mine with 5 mandolin notes recorded. The out I received was:
Nyquist !
%1.3f
I'd love to be able to get the frequencies and the time durations, as shown in your table.
Any suggestions?
Jim
Please post the full code that you are using.
When posting, use the "code tags" from the "</>" button around the code like this:

[code]
code goes here
[/code]


When you run the code in the Nyquist prompt, click the "Debug" button rather than the "OK" button.
After the code has run, the debug window will open. Copy the contents of the debug window and include it (in "code" tags) in your reply.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

JimWI
Posts: 6
Joined: Tue Jan 05, 2021 3:40 pm
Operating System: Windows 10

Re: how to run YIN starting at sound start + 0.25s?

Post by JimWI » Tue Jan 05, 2021 7:41 pm

Steve and steveneb:

Thanks!! Both files are mono.
Got it. Had to run it using the Nyquist prompt. I was running it from the Analyze tab.
Is there an 'easy' way to save the output to a file?

Thanks again!
Jim

steve
Site Admin
Posts: 78703
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: how to run YIN starting at sound start + 0.25s?

Post by steve » Tue Jan 05, 2021 8:16 pm

JimWI wrote:
Tue Jan 05, 2021 7:41 pm
Is there an 'easy' way to save the output to a file?
Saving can be written into the Nyquist script, but the "easy" way:

Now that you have it working.

1. "Help menu > Diagnostics > Show Log"
2. In the log window, click "Clear"
3. Run the Nyquist script again, but use the "OK" button this time.

Notice that the output appears in the Audacity log window.

You can now either "Save" the contents of the log window, or copy and paste from the log window.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

JimWI
Posts: 6
Joined: Tue Jan 05, 2021 3:40 pm
Operating System: Windows 10

Re: how to run YIN starting at sound start + 0.25s?

Post by JimWI » Fri Jan 08, 2021 4:18 pm

I got the output window to show on both my test files. I noticed that the output shows frequencies in 0.5 sec intervals. What do I change to get frequencies to show in smaller intervals, as 0.1 sec? Does it have something to do with the "dur' variable?
Thanks in advance.

JimWI
Posts: 6
Joined: Tue Jan 05, 2021 3:40 pm
Operating System: Windows 10

Re: how to run YIN starting at sound start + 0.25s?

Post by JimWI » Fri Jan 08, 2021 5:06 pm

I found it. I wasn't looking very hard. It's the "window-time" variable.
Thanks for all the help.
Jim

Post Reply