Adding randomized silence (Windows 10, Audacity 2.1.3)

Help for Audacity 2.x.x on Windows.

ImageThis forum is for Audacity 2.x.x on Windows.

  • Please state which version of Windows you are using, the exact three-section version of Audacity from Help > About Audacity and whether you obtained the .exe installer or the zip.

  • Audacity 1.2.x and 1.3.x are obsolete and no longer supported. If you still have those versions, please upgrade at https://www.audacityteam.org/download/.
    The old forums for those versions are now closed, but you can still read the archives of the 1.2.x and 1.3.x forums.

Re: Adding randomized silence (Windows 10, Audacity 2.1.3)

Permanent link to this post Posted by PiTeRr » Thu Aug 10, 2017 6:53 pm

Thanks a lot :) I think I get it. Merging a silence and tone into pair make it the easiest to shuffle that merged list. I think I also understand the Fisher-Yates shuffle algorithm. But I have also another question : is it possible to incorporate in that code occurence of tones at 2 frequencies in given terms ? I mean in one track 100 tones at frequency 1000 Hz, 10 at each level and 100 tones at frequency 4000 Hz, 10 at each level, all of this shuffled ?
PiTeRr
 
Posts: 16
Joined: Thu Jul 27, 2017 6:15 pm
Operating System: Windows 10

Re: Adding randomized silence (Windows 10, Audacity 2.1.3)

Permanent link to this post Posted by PiTeRr » Mon Aug 14, 2017 12:28 pm

Hi :) could I count on help with my issue :) ?
PiTeRr
 
Posts: 16
Joined: Thu Jul 27, 2017 6:15 pm
Operating System: Windows 10

Re: Adding randomized silence (Windows 10, Audacity 2.1.3)

Permanent link to this post Posted by steve » Mon Aug 14, 2017 3:07 pm

PiTeRr wrote: is it possible to incorporate in that code occurence of tones at 2 frequencies in given terms ? I mean in one track 100 tones at frequency 1000 Hz, 10 at each level and 100 tones at frequency 4000 Hz, 10 at each level, all of this shuffled ?

Sure that would be possible, but probably best not to take too much on at once. By splitting the task into functions, we are making the program modular, so it should be fairly straightforward to extend the program by adding new "modules".

Did you see this post? https://forum.audacityteam.org/viewtopi ... 39&t=96715
How are you going to incorporate that into your program?
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
steve
Senior Forum Staff
 
Posts: 44161
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Adding randomized silence (Windows 10, Audacity 2.1.3)

Permanent link to this post Posted by steve » Tue Aug 15, 2017 1:49 pm

You could write the list of 'gains' (that will be shuffled) by hand as
(setf gainlist (list 0 -5 -10 -15 -20 -25 -30 -35 -40 -45 0 -5 -10....))
but as we're writing a program, why not just tell the computer to generate the list for us:
Code: Select all
;; Make a list of 100 numbers for gain levels where
;; 10 are at each is multiple of 5 between 0 and -45.

(defun gainlist (&aux glist)
  (do ((gain 0 (- gain 5)))
      ((= gain -50) glist)
    (dotimes (i 10)
      (push gain glist))))

;; Test it
(print (gainlist))
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
steve
Senior Forum Staff
 
Posts: 44161
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Previous

Return to Windows



Who is online

Users browsing this forum: No registered users and 12 guests