/* Update phase, rollover at 1.0 */
data-phase[0] += (data-frequency[0] / SAMPLE_RATE);
if(data-phase[0] 1.0f) data-phase[0] -= 2.0f;
data-phase[1] += (data-frequency[1] / SAMPLE_RATE);
if(data-phase[1] 1.0f) data-phase[1] -= 2.0f;
You haven't shown us the declarations/data types for
On Apr 27, 2011, at 1:38 AM, Ross Bencina wrote:
eu...@lavabit.com wrote:
*out++ = data-amplitude[0] * sinf( (2.0f * M_PI) * data-phase[0] );
*out++ = data-amplitude[1] * sinf( (2.0f * M_PI) * data-phase[1] );
/* Update phase, rollover at 1.0 */
data-phase[0] += (data-frequency[0] /
Might want to ask this one on the PA list (:
On Wed, Apr 27, 2011 at 2:47 PM, eu...@lavabit.com wrote:
Hello,
Today I tried compiling on Windows with MinGW MSYS, and everything
works, the spectrum is clean at SR=44.1 kHz and even the LUT version is
acceptable.
Probably on linux I was
The factor in the sine argument must be 2*M_PI, otherwise it generates
half the frequency.
Because of the sine periodicity, all this work:
if(phase 1.0) phase -= 1.0; // sine arg rolls over 2*PI-0
if(phase 1.0) phase -= 2.0; // 2*PI--2*PI
if(phase 0.5) phase -= 1.0; // PI--PI
First is probably
Hello,
I want to generate two different frequency sinewaves on LineOut -
LeftRight. For audio IO I'm using Portaudio(Linux, PortAudio V19-devel
(built Apr 17 2011 22:00:29)), and the callback code is:
static int paCallback( const void* inBuff, void* outBuff,
just stabbing in the dark in case nobody else gives a more useful
response but...
#1 - what is the format of your output? If it's low in bitcount that
could make the signal more dirty i believe (less resolution to make a
more perfect sine wave)
#2 - have you tried calculating via doubles?
#3 -
oh also, it *might* matter what device you are using with port audio.
for instance, when i use ASIO i seem to get a much louder, more raw
signal than if i use, say, the directsound interface.
i think the DS device must do some kind of dsp on it like maybe
there's a compressor or something.
To
except your algorithm ?
Regards
Rob
-Original Message-
From: Alan Wolfe
Sent: Tuesday, April 26, 2011 9:14 PM
To: A discussion list for music-related DSP
Subject: Re: [music-dsp] Sinewave generation - strange spectrum
just stabbing in the dark in case nobody else gives a more useful
Hi,
Try using 48 kHz sampling rate instead of 44.1 kHz (or the other way).
AFAIK the HDA Intel is an integrated soundcard, it might have a low
quality sample rate converter / interpolator.
Regards,
Gabor Pap
On Tue, Apr 26, 2011 at 11:55 PM, eu...@lavabit.com wrote:
Thanks for the quick
:14 PM
To: A discussion list for music-related DSP
Subject: Re: [music-dsp] Sinewave generation - strange spectrum
just stabbing in the dark in case nobody else gives a more useful
response but...
#1 - what is the format of your output? If it's low in bitcount that
could make the signal
: Alan Wolfe
Sent: Tuesday, April 26, 2011 9:14 PM
To: A discussion list for music-related DSP
Subject: Re: [music-dsp] Sinewave generation - strange spectrum
just stabbing in the dark in case nobody else gives a more useful
response but...
#1 - what is the format of your output? If it's low
11 matches
Mail list logo