Editing Audio with .1 millisecond accuracy

Effects, Recipes, Interfacing with other software, etc.
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
Post Reply
michael-koscak
Posts: 4
Joined: Mon Sep 15, 2014 5:30 pm
Operating System: Please select

Editing Audio with .1 millisecond accuracy

Post by michael-koscak » Tue Sep 16, 2014 2:34 am

Hello,
I am new to audacity, I am trying to generate a noise that will be on and off for 889 microseconds. I am going to use the audio signal for data transmission. I have been able to turn on an LED from the audio signal generated by Generate > Tone... if I turn the gain loud and turn the volume on my computer up. I would like to be able to pulse this LED so that I can have it either on (generating tone) or off (silence) at this precise time. There can be some error, but it must be consistently close to this length. Can Audacity edit this precisely? Is this more of a question of my sound card? If someone could point me in the right direction for achieving this goal it would be greatly appreciated, thank you!!!

kozikowski
Forum Staff
Posts: 68938
Joined: Thu Aug 02, 2007 5:57 pm
Operating System: macOS 10.13 High Sierra

Re: Editing Audio with .1 millisecond accuracy

Post by kozikowski » Tue Sep 16, 2014 5:54 am

Change the default Audacity sample rate from 44100 to 96000. Generate > Sine Wave: 8999Hz > OK.

Cut the sine wave on the timeline down to eight cycles (illustration).

That tone should last very close to your timing specification. Export that as a WAV (Microsoft) and you should be able to use it any time you need a blast of tone of that duration. There's about a hundred things that can go wrong....

Koz
Attachments
Screen Shot 2014-09-15 at 10.50.33 PM.png
Screen Shot 2014-09-15 at 10.50.33 PM.png (35.03 KiB) Viewed 1220 times

kozikowski
Forum Staff
Posts: 68938
Joined: Thu Aug 02, 2007 5:57 pm
Operating System: macOS 10.13 High Sierra

Re: Editing Audio with .1 millisecond accuracy

Post by kozikowski » Tue Sep 16, 2014 5:57 am

Working the maths backwards gives you the duration in the illustration.
Koz
Attachments
Screen Shot 2014-09-15 at 10.56.03 PM.png
Screen Shot 2014-09-15 at 10.56.03 PM.png (25.51 KiB) Viewed 1220 times

michael-koscak
Posts: 4
Joined: Mon Sep 15, 2014 5:30 pm
Operating System: Please select

Re: Editing Audio with .1 millisecond accuracy

Post by michael-koscak » Tue Sep 16, 2014 5:19 pm

Thank you! After doing more research I think I am going to try to write something using python to do this but I really appreciate the response!

kozikowski
Forum Staff
Posts: 68938
Joined: Thu Aug 02, 2007 5:57 pm
Operating System: macOS 10.13 High Sierra

Re: Editing Audio with .1 millisecond accuracy

Post by kozikowski » Tue Sep 16, 2014 5:44 pm

One of the things that can go wrong is acceleration distortion. In The Real World, the tone is not going to start and stop neat, orderly and clean like that. The rise wave of the first cycle and the fall wave of the last are going to generate infinite frequencies. Typically, this sounds like a tick or click at both ends of the tone. The only way to get around modulation effects like this is to fade the tone in and out. Obviously, this will mess up the key times. You're never going to get clean tones with that kind of accuracy in an audio system.

Oddly, you can do something like this in a video system, except nobody is using analog video anymore.

Koz

Post Reply