78rpm EQ Curve Generator

Share your Audacity/Nyquist plug-ins here, or test drive the latest plug-ins submitted by Audacity users.

After testing a plug-in from this forum, please post feedback for the plug-in author.
steve
Site Admin
Posts: 81227
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: 78rpm EQ Curve Generator

Post by steve » Sun Feb 05, 2012 1:11 pm

steve wrote:If it's confirmed that Nyquist can save files that contain a "/" in the name then I'll change the validator function.
Just heard from Bill who has confirmed that files with a "/" in the file name do gets saved with the "/" in the file name (the forward slash is not interpreted as a directory level and the Mac does not attempt to translate it).
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

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

Re: 78rpm EQ Curve Generator

Post by steve » Mon Feb 06, 2012 3:36 am

Got the "write to file" function done: http://forum.audacityteam.org/viewtopic ... 39&t=63540
I think that it includes all of the error checking of your original code POL, (let me know if I've missed anything out), plus file name verification.
Hopefully not too many errors - just needs testing now.

I think it should be pretty easy to adapt the function to suit the 78rpm EQ Curve Generator (assuming you'd like the extra error checking).
I just wish the code was a bit shorter :roll:
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

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

Re: 78rpm EQ Curve Generator

Post by steve » Tue Feb 07, 2012 1:36 am

There's a bug in "78rpm EQ Curve Generator" that we'd missed.

On Windows, if the output path is set to "D:" the path is not found.
(Thanks to Edgar for spotting the same problem in writefile.ny)

The problem is that if the working directory is a drive letter, then (setdir ".") returns the path with a "" at the end, whereas for all other paths there is no "" at the end.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Gale Andrews
Quality Assurance
Posts: 41761
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10

Re: 78rpm EQ Curve Generator

Post by Gale Andrews » Tue Feb 07, 2012 1:44 am

steve wrote:There's a bug in "78rpm EQ Curve Generator" that we'd missed.

On Windows, if the output path is set to "D:" the path is not found.
(Thanks to Edgar for spotting the same problem in writefile.ny)

The problem is that if the working directory is a drive letter, then (setdir ".") returns the path with a "" at the end, whereas for all other paths there is no "" at the end.
I think I did notice this before, though I am not going to search for the topic to prove it. In fact I specifically tested this time to see if it was fixed. From what I recall, this wasn't easy to fix?


Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual

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

Re: 78rpm EQ Curve Generator

Post by steve » Tue Feb 07, 2012 1:57 am

Gale Andrews wrote:In fact I specifically tested this time to see if it was fixed.
And it's not fixed is it?
Gale Andrews wrote:From what I recall, this wasn't easy to fix?
I don't see a "neat" fix for it.
It's a Windows specific inconsistency, so we'll need to conditionally test for Windows, then test for if the path is a drive letter, and balance up the file separators if it is.

I've already got a test for Windows in the new "write-to-file" function (thanks to Edgar-rtf for that), so we can use something like:

Code: Select all

(if (and (windowsp)(= (length (setdir ".") 3))) ..... )
to test for it.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

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

Re: 78rpm EQ Curve Generator

Post by steve » Tue Feb 07, 2012 2:00 am

The code could be soooo much simpler if we didn't need to support Windows :D
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Gale Andrews
Quality Assurance
Posts: 41761
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10

Re: 78rpm EQ Curve Generator

Post by Gale Andrews » Tue Feb 07, 2012 2:49 am

steve wrote:
Gale Andrews wrote:In fact I specifically tested this time to see if it was fixed.
And it's not fixed is it?
No, on Win XP (real machine).
steve wrote: I've already got a test for Windows in the new "write-to-file" function (thanks to Edgar-rtf for that), so we can use something like:

Code: Select all

(if (and (windowsp)(= (length (setdir ".") 3))) ..... )
to test for it.
Where would be the best place to slot that into writefile.ny?


Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual

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

Re: 78rpm EQ Curve Generator

Post by steve » Tue Feb 07, 2012 4:15 am

Gale Andrews wrote:No, on Win XP (real machine).
Thanks for the confirmation.
steve wrote:

Code: Select all

(if (and (windowsp)(= (length (setdir ".") 3))) ..... )
It looks like there is a neater way.

At around line 98 in writefile.ny

Code: Select all

  ;; Test if path is working directory
  (unless (or (equal path (setdir "."))
              ;; allow for Windows inconsistencies
              (and (windowsp)
                   (string-equal path (string-right-trim slashstring (setdir ".")))))
    (setq warn (format nil "Output folder "~a~a" cannot be found~%" 
                (string-right-trim slashstring path) slashstring))
    (setq path (home)) ;fall back to Home folder
    (setdir path))
Too late at night for me to test this properly, I'll have another look tomorrow.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

PGA
Posts: 695
Joined: Thu Jan 19, 2012 9:16 pm
Operating System: Please select

Re: 78rpm EQ Curve Generator

Post by PGA » Tue Feb 07, 2012 8:01 am

steve wrote:The code could be soooo much simpler if we didn't need to support Windows :D
And the user population would be soooo much smaller :D :D

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

Re: 78rpm EQ Curve Generator

Post by steve » Tue Feb 07, 2012 12:15 pm

Sad but true.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Post Reply