Tone Generator - Multiple Tones and Variable Amplitude - diyAudio
Go Back   Home > Forums > Design & Build > Equipment & Tools

Equipment & Tools From test equipment to hand tools

Please consider donating to help us continue to serve you.

Ads on/off / Custom Title / More PMs / More album space / Advanced printing & mass image saving
Reply
 
Thread Tools Search this Thread
Old 16th November 2007, 11:58 PM   #1
percy is offline percy  United States
diyAudio Member
 
Join Date: Apr 2004
Location: MN
Default Tone Generator - Multiple Tones and Variable Amplitude

I am searching for PC based tone generator that will allow adding multiple tones with variable amplitude. For example, 1Khz at -3db, 2Khz at -40db, etc...

Also it has to be capable of creating tones at 92Khz or higher also.

Right now I have the NCH Tone Generator that has multiple tones and variable amplitude but unfortunately its fixed at 44.1Khz so can't add any frequency above Fs/2.

Any help greatly appreciated!

TiA!
  Reply With Quote
Old 17th November 2007, 01:30 AM   #2
jcx is offline jcx  United States
diyAudio Member
 
Join Date: Feb 2003
Location: ..
if you intend to use a sound card fs/2 will be just one limit, even 192K cards may not put out much at 92KHz because of digital filters internal to the ADC chips often set at 0.4*fs

LtSpice, SciLab are 2 freeware options that can create .wav files
Audacity can play/record - although I've seen dropouts at 192KHz
  Reply With Quote
Old 17th November 2007, 05:02 AM   #3
percy is offline percy  United States
diyAudio Member
 
Join Date: Apr 2004
Location: MN
brain fart...when I wrote 92khz I wanted to write 96khz but was thinking 192khz.
for now anything that behaves well at 96khz should serve the purpose.
  Reply With Quote
Old 17th November 2007, 10:39 PM   #4
jcx is offline jcx  United States
diyAudio Member
 
Join Date: Feb 2003
Location: ..
actually I should have written ADCs and DACs - on soundcards both are typically oversampling internally and have digital filtering below fs/2 built in

you will have 0 output in any sampled system at fs/2 = 96 KHz with a 192K soundcard
  Reply With Quote
Old 18th November 2007, 04:23 PM   #5
percy is offline percy  United States
diyAudio Member
 
Join Date: Apr 2004
Location: MN
well I could get ETG (expression tone generator) and GoldWave to generate complex tones at a 96Khz sample rate. Basically they both have expression evaluators so lots of flexibility on the type of signal you want to create. But there's one problem -

I see distortion when I do a spectrum analysis of the resulting wav file. (fft of the just the static wav file, not by playing/recording the signal). I was expecting that when I generate a 1Khz sine tone, all I would see in the fft is one fundamental at 1Khz and nothing else but instead I see harmonics at 3khz, 5khz,.. I noticed this happens is in both GW and ETG.

What could cause this ? My only guess is insufficient precision in the sinusoidal function used to compute the sample values ?? Is that possible ?

p.s.:- I haven't tried Ltspice or Scilab, but do you think they have what I want ?
  Reply With Quote
Old 18th November 2007, 07:28 PM   #6
jcx is offline jcx  United States
diyAudio Member
 
Join Date: Feb 2003
Location: ..
I'd expect most packages to work equally well within some limits: the quantization will give some distortion content ~ 1 bit amplitude level - and windowing issues with the fft can give apparent "spurs" from spectral spreading if you don't use exact integer fundamental cycles in your ftt

it's possible that biased rounding or other math error could contribute too but for 16 bit resolution, 32 bit math should be OK

at 24 bits the math may need to be 64 bit
  Reply With Quote
Old 19th November 2007, 04:23 AM   #7
jcx is offline jcx  United States
diyAudio Member
 
Join Date: Feb 2003
Location: ..
It appears some people can mess up truncation/rounding - LtSpice has a problem with 16 bit wav files, not 8 or 24!
Mike's usually fast with fixes - I hope this is cleared up by the next release (sometimes weekly)

I guess other tools could have similar problems - always verify, correct numerical implementations really follow the theory to a fine degree
  Reply With Quote
Old 20th November 2007, 04:52 AM   #8
jcx is offline jcx  United States
diyAudio Member
 
Join Date: Feb 2003
Location: ..
LtSpice 16bit wav functions now fixed v2.22c - that was quick
  Reply With Quote
Old 22nd November 2007, 03:48 PM   #9
AndrewT is online now AndrewT  Scotland
diyAudio Member
 
Join Date: Jul 2004
Location: Scottish Borders
Hi,
If I'm right to think that all digital signals start as square waves added together to form an approximation of a sinewave then there must always be measurable distortion of the filtered output signal.
The higher the sinewave frequency, the fewer squarewaves to approximate the wave shape, the worse the distortion.
The lower the level, the fewer steps available for each increment of voltage and again the worse the distortion.

It seems that all HF signals generated digitally must by design have significant distortion that worsens as the Fs/2 limit is approached.

I cannot see how 192kHz square waves can ever produce a 96kHz sinewave even with a high slope analogue filter hung on the end of the DAC.
__________________
regards Andrew T.
  Reply With Quote
Old 22nd November 2007, 04:10 PM   #10
Pan is offline Pan  Sweden
diyAudio Member
 
Join Date: Sep 2002
Andrew, it's the other way around. A square wave is made up of lots of sinewaves.


/Peter
  Reply With Quote

Reply


Hide this!Advertise here!
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Amplitude and frequency distributions wanted DouglasSelf Solid State 13 18th September 2013 07:54 PM
Pressure sensor to control amplitude Dogue Instruments and Amps 7 15th October 2008 11:22 PM
Why do sweep signals have progressively decreasing amplitude ? percy Equipment & Tools 6 13th February 2008 12:08 AM
Audio Signal Amplitude Levels..? xitronics Analog Line Level 0 16th October 2006 04:19 PM


New To Site? Need Help?

All times are GMT. The time now is 02:16 PM.


vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2014 DragonByte Technologies Ltd.
Copyright 1999-2014 diyAudio

Content Relevant URLs by vBSEO 3.3.2