Suggestion for pluck generator

Anything you think is missing, or needs enhancement, goes here.

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

Suggestion for pluck generator

Permanent link to this post Posted by HummingBirdGuy » Tue May 30, 2017 3:16 am

Hi all,

I have a suggestion regarding the pluck generator in Audacity: would it be possible to add an option to specify the tuning used for the generated notes, for example, so that the played sound can be 432Hz instead of 440, or any other choice?

Thank you in advance!

Regards.
HummingBirdGuy
 
Posts: 46
Joined: Wed Mar 11, 2015 2:40 pm
Operating System: Please select

Re: Suggestion for pluck generator

Permanent link to this post Posted by steve » Tue May 30, 2017 7:48 am

Thank you for your suggestion.
You may find this post interesting / informative: viewtopic.php?p=267178#p267178
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
steve
Senior Forum Staff
 
Posts: 43926
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Suggestion for pluck generator

Permanent link to this post Posted by HummingBirdGuy » Wed May 31, 2017 3:29 am

Hello,

Although I have nothing against one tune another, I can find them to be sometimes relaxing or sometimes more exact (speaking of 440 hz), but that's only what I think and of course the number of opinions is fairly existent. However, there are more available tunings which can be used (for instance, we can remember the 435Hz which was proposed in france for some time. And since I find this generator quite useful for some things, it wouldn't be a bad idea (I guess) to add such an option.

Again thanks much!
HummingBirdGuy
 
Posts: 46
Joined: Wed Mar 11, 2015 2:40 pm
Operating System: Please select

Re: Suggestion for pluck generator

Permanent link to this post Posted by steve » Wed May 31, 2017 8:54 am

As the "Pluck" effect is a Nyquist plug-in, it is very easy to modify because it is just a plain text file with the file name extension changed from ".txt" to ".ny". The biggest problem is finding a plain text editor that does not screw up the format. For Windows I recommend NotePad++.

All that you need to do is to open the file "pluck.ny" in a plain text editor and change one line:
Change from
Code: Select all
;control pitch "Pluck MIDI pitch" int "" 60 1 120

to
Code: Select all
;control pitch "Pluck MIDI pitch" float "" 60 1 120

then save the file. You will now be able to enter a decimal value for the note, so you can get any note in any tuning.

If you want to change it a bit more so that you can enter the note as a frequency rather than a note number, change the line to:
Code: Select all
;control pitch "Pluck frequency (Hz)" float "" 440 40 4000
(setf pitch (hz-to-step pitch))


The pluck.ny file can be found in the plug-ins directory:
  • On Windows the "Plug-Ins" folder is in the directory where Audacity resides - usually C:\Program Files or C:\Program Files (x86)
  • On Mac place them in Audacity's "Plug-Ins" folder at ~/Library/Application Support/audacity/Plug-Ins.
  • On Linux, the "plug-ins" folder is in usr/share/audacity if you installed an Audacity package supplied by your distribution, or usr/local/share/audacity if you compiled Audacity from source code.

Probably more useful for you would be to have controls for the note, octave and tuning. That's a bit more complex, so I've done that for you and change the name of the plug-in to "Pluck (Hz)" so that you can install this alongside the original "Pluck" effect. For installation instructions, see: http://manual.audacityteam.org/man/effe ... st_effects

and here's the modified version:
pluckhz.ny
(1.67 KiB) Downloaded 27 times
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
steve
Senior Forum Staff
 
Posts: 43926
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Suggestion for pluck generator

Permanent link to this post Posted by HummingBirdGuy » Thu Jun 01, 2017 3:37 am

Hello there,

I've downloaded the ni effect you've just done and it's pretty cool! Kinda useful, for example, to tune a guitar or any other instrument! (In fact I use it with that purpose).

Would you mind if I can share it with my friends? Obviously I will give all credit to you because you really deserve it.

I will try to do what you suggest regarding changing the file to see what happens.

Thanks a lot for your help! :)
HummingBirdGuy
 
Posts: 46
Joined: Wed Mar 11, 2015 2:40 pm
Operating System: Please select

Re: Suggestion for pluck generator

Permanent link to this post Posted by steve » Thu Jun 01, 2017 9:52 am

HummingBirdGuy wrote:Would you mind if I can share it with my friends?

Not at all. It's GPL open source so you're very welcome to use it, share it or modify it.
It would be nice if you just gave them the link to the post (https://forum.audacityteam.org/viewtopi ... 88#p328188) so that they download it for themselves, then we get an idea of how popular it is. If sufficiently popular I can upload it to the Audacity wiki plug-in page.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
steve
Senior Forum Staff
 
Posts: 43926
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu


Return to Adding Features to Audacity



Who is online

Users browsing this forum: No registered users and 2 guests