Questions tagged [tone-generation]

25 questions
4
votes
1 answer

Smoothed Square Wave

new here and probably pretty unexperienced compared to the rest of you. This should be simple enough but just wanted some clarification. I'm trying to model an analog square wave oscillator with C. With the oscillator I'm trying to mimic, the square…
yun
  • 189
  • 1
  • 11
3
votes
4 answers

Amplitude of the fft is less than what is expected

This is my MATLAB code Amp = 0.3; freqHz = 1000; fsHz = 160000; dt = 1/fsHz; t = 0:dt:2000*dt; sine = Amp * sin(2*pi*freqHz*t); t = 0:2000 subplot(2,2,1) plot(t,sine) y1 = sine; Fs = 160000; % samples per second N = length(y1); …
SeAlGhz
  • 91
  • 5
3
votes
1 answer

Sampling pure tone sine waves

What would happen if I am using the maximum frequency as the sample rate for sampling a pure tone sine wave? For example, a $10\ \rm kHz$ sampling frequency for a $10\ \rm kHz$ monotone sine wave. What effect would aliasing produce at the output?
3
votes
3 answers

Constructing a tone through additive synthesis

This question follows from: Synthesizing harmonic tones with Karplus Strong I am attempting to generate a full soundbank of 88 notes. As far as I can see my three options are: Using samples Using something like Karplus Strong (as linked…
P i
  • 1,277
  • 10
  • 24
1
vote
1 answer

Best window before FFT ? (for a signal consisting of 2 tones used for phase measurement)

I am doing phase measurments by transmitting and receiving tones (100 kHz and 16 kHz simultaneously). I am transmitting the tones and receiving them, applying Blackman Harris window and doing FFT for phase measurements. I feel the Blackman Harris…
Kurtul
  • 115
  • 5
1
vote
2 answers

Understanding sine wave generation in Python with linspace

I was trying to sample a 12.8 MHz sine wave (78.125 ns) signal at every 160us (micro seconds). Since 160us is multiple of base period 78.125ns(x2048) i expected to get a sample of fixed amplitude but instead what I am seeing is a another periodic…
arun
  • 13
  • 4
1
vote
1 answer

reducing MIPS in detecting tones

Currently our software is detecting tones using FFT and checking if there is only a single peak in frequency spectrum. Our software needs to know what kind of input it is before taking action. So we differentiate the case when tone is fed as input…
1
vote
1 answer

How to perform sine generation (in C)?

I am interested in how should a listing for a program look like that will generate a sine of f=50hz, using the next arguments for any moment in time. float phis=162*PI/180;//initial phase of…
mypaul
  • 13
  • 1
  • 6
1
vote
2 answers

Generating a high SNR sinusoide with lut on a DSP

I'm generating a sinus by using a lut method on a DSPic33f. My sample rate is 48 kHz, so I saved 12000 of the first value (unsigned int, 16 bits) and use trigonometric formulas to calculate the other parts of the sinusoid. I can change the frequency…
Nessy W.
  • 11
  • 1
1
vote
3 answers

Synthesizing harmonic tones with Karplus Strong

I'm building my own MIDI synth. I have to create a decent sounding tone for every note on the piano keyboard (A-1 through C7, or MIDI 21 through 21+88=109) I've been using a basic ring resonator, where I create a ring of the right size (for example,…
P i
  • 1,277
  • 10
  • 24
0
votes
1 answer

Convert A frequency weight to Z frequency weight

I want to get the SPL of a monotonic sound like a 1khz tone but the problem is that I have a SPL meter which gives data in terms of A frequency weight. Is it possible to get the SPL of a 1khz signal, which is my dominant frequency and its amplitude…
SeAlGhz
  • 91
  • 5
0
votes
1 answer

Karplus-Strong with Jaffe-Smith sample rate-independent

I tried to implement the Karplus-Strong algorithm with some of the Jaffe-Smith extensions (improve pitch, dynamics, etc). Here is the code. When I run it with a sampleRate of 48000Hz, I get very reasonably sounding string, without any hissing,…
fserb
  • 101
  • 2
0
votes
0 answers

Sound of (sea) waves imitation

I need to create an algorithm for sound of waves. So I imagine it should be a white noise with doppler effect. However I understand doppler is just change of frequency. But white noise have all the frequencies in it. What's the basic idea? Is there…
Boppity Bop
  • 101
  • 2
0
votes
1 answer

How to account for phase and shift when composing a new signal based upon 2 or more recordings?

I have 2 signals that were independently recorded, and want to produce a new signal that would represent what would be recorded if both signal sources were emitting at the same time together. Specifically my case is that I have a recording of…
Vass
  • 113
  • 5
0
votes
0 answers

Direct Digital Frequency Synthesis, NCO and negative frequencies

I need to translate a frequency band generated by a DDFS designed in a FPGA (using Xilinx DDS Compiler). My output to the NCO is in I/Q format. I chose to use a NCO to perform the frequency shift but I am wondering what is the best solution to do…
AtoM_84
  • 11
  • 2
1
2