Broken click track on 64-bit (*ubuntu 9.10 workaround?)

This section is now closed.
Forum rules
Audacity 1.3.x is now obsolete. Please use the current Audacity 2.x.x package for your distribution or compile Audacity from the source code.
personman
Posts: 15
Joined: Thu Jan 15, 2009 3:11 pm
Operating System: Please select

Broken click track on 64-bit (*ubuntu 9.10 workaround?)

Post by personman » Thu Jan 15, 2009 3:21 pm

UPDATED: Upon further testing, we've narrowed it down to an issue with 64-bit builds of Audacity. A workaround is to install the 32-bit version and the 32-bit dependencies.

See: http://forum.audacityteam.org/viewtopic ... =20#p56271

for an attempted work-around to use 32-bit Audacity with *ubuntu 9.10 64-bit.


I've had this problem for a long time, in every audacity version I've tried up to 1.3.6. When I generate a click track, it only gives me one measure, no matter how many measures I ask for. I run 64-bit Debian Linux. Here is the output I get from the Debug button:

Code: Select all

[ gc: total 18640, 1437 free; samples 101KB, 0KB free ]
[ gc: total 18640, 1744 free; samples 101KB, 0KB free ]
[ gc: total 18640, 2943 free; samples 101KB, 0KB free ]
Does anyone else have this problem? Has anyone found a fix?

Thanks.

-Andy

Edit: Here is the output I get from the console:

Code: Select all

no more csLADSPA plugins
; loading "/usr/share/audacity/nyquist/init.lsp"
; loading "/usr/share/audacity/nyquist/nyinit.lsp"
; loading "/usr/share/audacity/nyquist/follow.lsp"

Nyquist -- A Language for Sound Synthesis and Composition
    Copyright (c) 1991-2003 by Roger B. Dannenberg
    Version 2.29

[ gc: total 16640, 353 free; samples 1KB, 0KB free ]
[ gc: total 17640, 835 free; samples 5KB, 0KB free ]
[ gc: total 18640, 1834 free; samples 5KB, 0KB free ]
[ gc: total 18640, 3010 free; samples 5KB, 0KB free ]
[ gc: total 18640, 3038 free; samples 99KB, 0KB free ]
error: too few arguments
1> [ gc: total 18640, 3034 free; samples 101KB, 0KB free ]
Last edited by personman on Tue Nov 03, 2009 8:49 pm, edited 2 times in total.

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

Re: Click track broken?

Post by steve » Thu Jan 15, 2009 5:40 pm

That seems a bit weird.
Try this as an experiment:

1) Open Audacity
2) From the Tracks menu select "Add New > Audio Track"
3) Switch on the "Snap to" in the Selection Toolbar and select exactly 1 second (from t=0.0 to t=1.0)
4) From the Effects menu, select "Nyquist Prompt" and paste the following code into the dialogue box.

Code: Select all

 (setq tempo 120)
(setq sig 4)
(setq measures 16)
(setq offset 0)
(setq click-type 0)
(setq q 1)
(setq high 92)
(setq low 80)

(setf click-type (+ click-type 1))

(defun check (arg min max)
(if (and (>= arg min) (<= arg max))
0 1))

(setf error-msg "")

(setf error-msg (if 
(= (check tempo 30 300) 0)
error-msg
(strcat error-msg (format nil
"Tempo ~a outside valid range 30 to 300 bpm
" tempo))))
; beats per measure
(setf error-msg (if
(= (check sig 1 20) 0)
error-msg
(strcat error-msg (format nil
"Beats per measure ~a outside valid range 1 to 20
" sig))))
; number of measures
(setf error-msg (if
(= (check measures 1 1000) 0)
error-msg
(strcat error-msg (format nil
"Number of measures ~a outside valid range 1 to 1000
" measures))))
; time start offset
(setf error-msg (if
(= (check offset 0 30) 0)
error-msg
(strcat error-msg (format nil
"Time offset ~a outside valid range 0 to 30 seconds
" offset))))
; q
(setf error-msg (if
(= (check q 1 20) 0)
error-msg
(strcat error-msg (format nil
"Filter quality q ~a outside valid range 1 to 20
" q))))
; high MIDI pitch
(setf error-msg (if
(= (check high 18 116) 0)
error-msg
(strcat error-msg (format nil
"High MIDI pitch ~a outside valid range 18 to 116
" high))))
; low MIDI pitch
(setf error-msg (if
(= (check low 18 116) 0)
error-msg
(strcat error-msg (format nil
"Low MIDI pitch ~a outside valid range 18 to 116
" low))))
(cond
; if error-msg is not blank, give error msg
((> (length error-msg) 0)
(setf error-msg (strcat (format nil
"Error - nnYou have entered at least one invalid value:
") error-msg))) ; end error msg

; no error so generate click track
(t
(setf ticklen 0.01) ; duration of 1 click
(setf beatlen (/ 60.0 tempo))

(defun drip (p) ; p is pitch in hz
(lp 
(stretch 1
(mult (exp-dec 0 0.015 0.25) 
( sim
(mult (hzosc (*  2.40483  p))  0.5 )
(mult (hzosc (*  5.52008  p))  0.25 )
(mult (hzosc (* 8.653  p))  0.125 )
(mult (hzosc (* 11.8  p))  0.0625 )
))) 
440))
; function used to normalize noise and tick clicks
; this function is necessary because filtering 
; changes amplitude of filtered noise clicks
(defun normalize (sound)
(setf peak-level (peak sound ny:all))
(scale (/ 1.0 peak-level) sound))
; make one measure
(setf measure (stretch-abs ticklen (mult 0.75 
; pwl is used to add fast [5ms] fade-in and fade-out of clicks
(pwl 0 0 0.005 1 0.995 1 1 0 1)
(cond
((= click-type 1) ; ping accented clicks
(osc high))
((= click-type 2) ; noise accented clicks
(normalize (lowpass2 (noise 1) (step-to-hz high) q)))
((= click-type 3) ; tick accented clicks
(normalize (drip (step-to-hz high)))) ))))
(dotimes (x (- sig 1))
  (setf measure (sim measure
                     (at (* beatlen (+ x 1))                 
                         (stretch-abs ticklen (mult 0.5 
; again, pwl adds 5ms fade-in and fade-out to clicks
(pwl 0 0 0.005 1 0.995 1 1 0 1)
(cond
((= click-type 1) ;ping tone unaccented clicks
(osc low))
((= click-type 2) ; noise unaccented clicks
(normalize (lowpass2 (noise 1) (step-to-hz low) q)))
((= click-type 3) ; tick unaccented clicks
(normalize (drip (step-to-hz low)))) )))))))
; make the measure exactly the right length
(setf measure (sim measure
                   (stretch-abs (* sig beatlen) (const 0.0))))

; loop measure n [measures-1] times
(setf result measure)
(dotimes (x (- measures 1))
  (setf result (seq result measure)))
; add time offset to result,
; if offset > 0 seconds
(setf result (if (= offset 0) result
(sim (s-rest offset) (at-abs offset (cue result)))))
; return [click track] result
result
)) ; end 
When you press "OK" or "Debug" it should create a click track.

The code is just the normal Click Track code, modified slightly to run from the Nyquist prompt.
If this works correctly, then perhaps your Click Track plug-in has been corrupted somehow.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

personman
Posts: 15
Joined: Thu Jan 15, 2009 3:11 pm
Operating System: Please select

Re: Click track broken?

Post by personman » Thu Jan 15, 2009 8:30 pm

Still just getting one measure. Here is the output:

Code: Select all

[ gc: total 16640, 328 free; samples 1KB, 0KB free ]
[ gc: total 17640, 830 free; samples 5KB, 0KB free ]
[ gc: total 18640, 1784 free; samples 5KB, 0KB free ]
[ gc: total 18640, 3004 free; samples 5KB, 0KB free ]

Code: Select all

no more csLADSPA plugins
; loading "/usr/share/audacity/nyquist/init.lsp"
; loading "/usr/share/audacity/nyquist/nyinit.lsp"
; loading "/usr/share/audacity/nyquist/follow.lsp"

Nyquist -- A Language for Sound Synthesis and Composition
    Copyright (c) 1991-2003 by Roger B. Dannenberg
    Version 2.29

[ gc: total 18640, 3028 free; samples 101KB, 0KB free ]
HCK OnTimer

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

Re: Click track broken?

Post by steve » Fri Jan 16, 2009 12:43 pm

Well that rules out one possibility.

This is the first report of this problem that I have come across, so we are kind of hunting in the dark.

Which version of Audacity are you currently using?

I see that you are getting the first output from the Nyquist Debug window, but where are you getting the second lot of output from?

When you reinstall Audacity 1.3.x, it will usually use an existing version of the configuration file "audacity.cfg".
audacity.cfg is created the first time you run Audacity, and unless you manually remove audacity.cfg you never have a "clean install". Try deleting audacity.cfg and see if you still have the issue.

The usual location is: /home/usr/.audacity/audacity.cfg
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Naddiseo

Re: Click track broken?

Post by Naddiseo » Thu Jan 22, 2009 12:21 am

I can replicate the problem on Ubuntu 9.04, audacity 1.3.6. Is there any info you need from me?

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

Re: Click track broken?

Post by steve » Thu Jan 22, 2009 1:06 am

Naddiseo wrote:I can replicate the problem on Ubuntu 9.04, audacity 1.3.6. Is there any info you need from me?
Do you mean Ubuntu 8.04?
Did you build Audacity 1.3.6 from source?
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Naddiseo

Re: Click track broken?

Post by Naddiseo » Thu Jan 22, 2009 4:10 am

stevethefiddle wrote:
Naddiseo wrote:I can replicate the problem on Ubuntu 9.04, audacity 1.3.6. Is there any info you need from me?
Do you mean Ubuntu 8.04?
Did you build Audacity 1.3.6 from source?
$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=9.04
DISTRIB_CODENAME=jaunty
DISTRIB_DESCRIPTION="Ubuntu jaunty (development branch)"
$ apt-cache policy audacity
audacity:
Installed: 1.3.6-2
Candidate: 1.3.6-2

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

Re: Click track broken?

Post by steve » Thu Jan 22, 2009 5:48 pm

Ubuntu jaunty ! Cool :D

I've tried Audacity 1.3.6 on Intrepid, but had a lot of problems with it. The current development version is Audacity 1.3.7 which seems to be much better (a lot of bug fixes, but at the moment only available as 1.3.7 alpha). 1.3.7 beta is due out imminently, so since you are obviously keen on trying out the latest releases you may be interested in installing that (either the alpha version from CVS now, or the beta version when it is released as a tarball).
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Naddiseo

Re: Click track broken?

Post by Naddiseo » Thu Jan 22, 2009 9:24 pm

stevethefiddle wrote:Ubuntu jaunty ! Cool :D

I've tried Audacity 1.3.6 on Intrepid, but had a lot of problems with it. The current development version is Audacity 1.3.7 which seems to be much better (a lot of bug fixes, but at the moment only available as 1.3.7 alpha). 1.3.7 beta is due out imminently, so since you are obviously keen on trying out the latest releases you may be interested in installing that (either the alpha version from CVS now, or the beta version when it is released as a tarball).
Sure thing, I'll try the CVS later today, and report back.

Naddiseo

Re: Click track broken?

Post by Naddiseo » Fri Jan 23, 2009 4:37 am

OK, I just compiled the CVS, and I still get the problem with click track: It generates one bar, but stretches it over the full time.

Locked