# DIYstompboxes.com

## DIY Stompboxes => Digital & DSP => Topic started by: markphaser on October 10, 2006, 02:59:24 PM

Title: DSP theory and basics
Post by: markphaser on October 10, 2006, 02:59:24 PM
What are the basics of DSP and the theory please?

How would writing Algorithms really easy software would matlab be easy to write LFO waveforms and phase shifters,flangers algorthms?

What is a block diagram of a DSP LFO or phase shifter,flangers please?

I heard u buy the DSP chip and read its instruction data sheet codes and then buy a templete that is made in matlab and u can modify it adding code or manipulating the values and code does this sound right?

Title: Re: DSP theory and basics
Post by: markphaser on October 10, 2006, 11:54:33 PM
what software is easy to write DSP algorithms for phase shifting and short time delays ?

What is the basics and fundamentals of DSP? what kind of software can do all the math algorithms for u and has sample templetes already done like a library? what else is the basics and fundamentals of DSP in a block diagram the terms of DSP?

How can i make different waveforms using DSP what would i need to know to do this please?

Title: Re: DSP theory and basics
Post by: Sir H C on October 12, 2006, 08:07:04 AM
You ask what amounts to a 4 year college degree.  Go to the Analog Devices or Texas Instruments web site, get a DSP kit they sell pretty cheap with instructions and go to town.
Title: Re: DSP theory and basics
Post by: Transmogrifox on October 13, 2006, 02:27:58 AM
Read up on FIR and IIR filters.  FIR means "Finite Impulse Response", while, you guessed it, IIR stands for "Infinite Impulse Response".

If you feed a single-sample pulse to an FIR filter, it will output a sequence of bits that defines the time domain response of the filter.  The bit sequence for an FIR filter is finite, meaning after some prescribed number of bits it comes to an end.

If you feed a single-sample pulse to an IIR filter, the output will in theory be infinite in duration.  Typically this is done via feedback where the filter's output is added to the input.  By nature, such a filter's impulse response decreases in magnitude each time through, so practically speaking, the impulse response doesn't actually last forever because it fades to a level below the resolution of the digital processor similarly to how an analog filter's impulse response fades below the noise floor and becomes indistinguishable as part of an impulse response in relatively short order.

A flanger would normally be some form of an FIR all-pass delay filter summed with the input before being dropped into the D/A converter transmit buffer., though you may want to add a feedback function that would turn it into an IIR filter.

A phaser would normally be an IIR all-pass filter summed with the input before being dropped into the D/A converter transmit buffer.

The cut-off frequencies on these filters are modulated by changing filter coefficients in real time.  The flanger can be done by brute-force:   Just establish a circular delay buffer and modulate the pointer to the sample for output in this buffer.

The phaser is most easily done using digital filter theory more directly.

Either way, the LFO used to modify the filter coefficients is generated separately from the filter.  You could even build an analog LFO and input it to an A/D converter and use the result from the A/D converter to modulate the filter.  This is similar to how a digital wah wah or volume/expression pedal works (though the "A/D" conversion is generally a digital rotary encoder instead of reading a voltage off a pot)

Those are questions that cannot be answered in a single post.  For the questions you have had, mark phaser, I recommend you enroll in an electrical engineering program at a nearby university.  There's a lot of background you need before you can even fully comprehend the relationship between an impulse response and a filter's frequency response--let alone what an impulse response is and why we characterize filters in this way.  Actually building some filters and playing through them with your guitar will then help you answer the questions of "what does one of these 8th order elliptical filter things sound like on a guitar?"
Title: Re: DSP theory and basics
Post by: markphaser on October 13, 2006, 07:37:29 PM

What DSP books do u have or how did u learn about DSP?

Would getting a DSP kit help me out to make a flanger and phaser and LFO programming it in DSP? and which DSP kit would be able to do this please?

On amazon.com i see DSP books but which ones should i buy so i can understand about using DSP like how roland,korg,zoom,digitech,line 6 uses DSP to get tremolos,delays,reverbs,phasers,flangers,etc how do i learn about DSP programming like how these DSP guru's ?

Title: Re: DSP theory and basics
Post by: Transmogrifox on October 13, 2006, 09:24:45 PM
I'll have to check the author and name at home on my text.  I have a bachelor's in electrical engineering and took a DSP class as an elective during that time.  I think it would have been very difficult for me to understand the theory without previous classes covering signal processing theory and feedback control systems.  I wouldn't have had an easy time with signal processing and controls if I hadn't first completed differential and integral calculus, and differential equations.

That's why I think a college education in this field is one of the fastest ways to learn this stuff.  There are so many fundamentals that need to be second nature to you before you can understand the answers to your questions.

All the same, programming an LFO doesn't take much technical knowlege in terms of math and signal processing theory.  A tremolo does not require advance signal processing theory, nor does a delay.  Reverbs may take some understanding of acoustics to program a good sounding reverb, but not much signal processing theory.  Filters, such as phasers and envelope filters, vocoders, and FFT-based applications are much easier with a background in DSP theory.  Amp modeling is a place you could really apply a lot of DSP theory.

Getting a DSP kit could help you if you are willing to invest the time in figuring it out.  The datasheets are scary for a first timer, but you would eventually start to get the idea.  You just need to really understand what it is you want to do, and how it can be done before you go trying to make a DSP do it.  It'll do exactly what you tell it to do, and if you don't know exactly what you want it to do, then it doesn't either.
Title: Re: DSP theory and basics
Post by: markphaser on October 13, 2006, 11:25:16 PM

programming an LFO doesn't take much technical knowlege in terms of math and signal processing theory.

Can u please explain how u or a DSP programmer would do this i just want to get the concepts down and block diagrams

A tremolo does not require advance signal processing theory, nor does a delay.  Reverbs may take some understanding of acoustics to program a good sounding reverb, but not much signal processing theory.

Filters, such as phasers and envelope filters, vocoders, and FFT-based applications are much easier with a background in DSP theory.

Digital oscilloscope have FFT functions to look at how many harmonics are in a waveform how does DSP use FFT?

Amp modeling is a place you could really apply a lot of DSP theory.

Can u please explain more detail about DSP tremolos,LFO's,vibratos,reverbs,delays,amp modeling,phasers,flangers, for DSP concepts and block diagrams

where is there samples of DSP guitar effects? does the DSP kits have examples and samples so u can data entry the algorithms ?

Title: Re: DSP theory and basics
Post by: Sir H C on October 14, 2006, 02:12:14 PM
Go to the TI and Analog Devices web sites.  That is where you will find information about their kits.  I could tell you they do everything you ask and more.  I could be lying, I might be telling the truth but if you go to their websites and see for yourself then boom you know authoritatively what they have and what they can do.

You say that it doesn't take much signal processing theory to do this stuff, I say it does.  If you don't know the S and Z transforms, then you are not going to have the foundation to build on.

Oppenheim and Schafer's "Discrete Signal Processing" is often used by universities to teach this stuff.
Title: Re: DSP theory and basics
Post by: markphaser on October 15, 2006, 12:18:12 AM
What kind of math formulas or math subject is good for programming DSP and algorthims for phasers,flangers? What do i need to know on how to program a phasers filters is it FFT? differential and integral calculus, and differential equations? vector phase equations? Time domain and frequency domain equations?

If i know C++ programming language what am i missing as for as DSP programming?

DSP chips have FFT math calculators built in to do the FFT formulas. There is 4 FFT cores processors so more clock cycles,multiplexing buss lines,pipelining

C++ is IF THEN statements,Loops,structures,unions,expressions,variables,floating point,intergal programming,pointers variable moveable,local or global memory,For Next loop,branches,link list, array,memory data basing registers

What does DSP have for functions and code instructions that C++ doesn't have or do please?

Title: Re: DSP theory and basics
Post by: Peter Snowberg on October 15, 2006, 11:57:21 AM
Markphaser,

If you want to know the answers to these questions, you need to follow the advice above and start studying.

DSP is COMPLEX and you need years of study to understand the questions as well as the answers. If you truly want to know, you need to stop asking questions here and to start studying.
Title: Re: DSP theory and basics
Post by: toneman on October 15, 2006, 02:31:11 PM
Here's a semester's worth of reading......

http://www.dspguide.com/pdfbook.htm

T
Title: Re: DSP theory and basics
Post by: SeanCostello on October 15, 2006, 11:34:55 PM
Go to Julius Smith's website at CCRMA. It should have answers to a lot of your questions, as well as giving you some idea of the math involved.

Sean Costello
Title: Re: DSP theory and basics
Post by: David on October 15, 2006, 11:36:14 PM
Markphaser,

If you want to know the answers to these questions, you need to follow the advice above and start studying.

DSP is COMPLEX and you need years of study to understand the questions as well as the answers. If you truly want to know, you need to stop asking questions here and to start studying.

Title: Re: DSP theory and basics
Post by: markphaser on October 16, 2006, 02:02:29 AM
Thanks guys for the help

What DSP books are good that apply DSP for guitar effects like zoom,digitech,roland,line 6 etc.

Is digital filters the main thing to know about DSP? for chorus,phases,flangers

How do u do DSP feedbacking positive or negative feedback loop like in a phaser,flangers?
I was thinking Nesting loops like subrountes inside a loop would make a feedback loop in a body of a algorithm right?

I know operators are like summing amps in software and if then statements are like comparators circuits

For the preamp and output stage circuit i guess a algorithms for gain structure or amplifing the digital signal in DSP and then
the DSP digital filters with DSP LFO would be the main core of DSP programming im guessing here

Title: Re: DSP theory and basics
Post by: markphaser on October 16, 2006, 03:17:54 AM
DSP Phase shifter
1.)   notches that are non periodical
2.)  IIR comb filters

DSP Flanging
1.)  notches of the comb filter which are periodical in frequency
2.) FIR comb filters

DSP vibrato
1.) IIR comb filter

Reverbs
1.) IIR comb filter
2.) Acoustical Cylinder
3.) frequency dependant feedback coefficient

DSP filters
1.) sequence of multiplication's and additions
2.) utterworth, Chebyshev, Inverse Chebyshev, Elliptic, Kaiser Window, Dolph-Chebyshev, and Equi-Ripple
4.) "Windowed" filters
5.) filter complexity number of taps
6.) vector of polynomial coefficients
7.) Recursive and non-recursive filters
8.) transfer function of a digital filter this sets the frequency response
9.) output sequence for the filter
10.) Coefficients of recursive (IIR) digital filters
11.) filter coefficients-values of these coefficients determine the characteristics of a particular filter

FIR (Finite Impulse Response) filters
1.) can create transfers functions
2.) Calculation coefficients
3.) symmetric FIR filters
4.) NON-Recursive filters
5.) Fixed point math processing
6.) FIR comb filter feedback

IIR (or Infinite Impulse Response) filter
1.) Recursive filters
2.) Floating-Point math processing
3.) IIR comb filter feedback

Software programs to make DSP IIR or FIR digital filters:
1.) Matlab graphical user interface (GUI)
2.) LabVIEW Digital Filter
A recursive filter is one which in addition to input values also uses previous output values. These, like the previous input values, are stored in the processor's memory.recursive literally means "running back", and refers to the fact that previously-calculated output values go back into the calculation of the latest output. The expression for a recursive filter therefore contains not only terms involving the input values
non-recursive filter is known as an FIR (or Finite Impulse Response) filter, and a recursive filter as an IIR (or Infinite Impulse Response) filter. These terms refer to the differing "impulse responses" of the two types of filter
The impulse response of a digital filter is the output sequence from the filter when a unit impulse is applied at its input. (A unit impulse is a very simple input sequence consisting of a single value of 1 at time t = 0, followed by zeros at all subsequent sampling instants). An FIR filter is one whose impulse response is of finite duration. An IIR filter is one whose impulse response (theoretically) continues for ever, because the recursive (previous output) terms feed back energy into the filter input and keep it going. The term IIR is not very accurate, because the actual impulse responses of nearly all IIR filters reduce virtually to zero in a finite time. Nevertheless, these two terms are widely used
Title: Re: DSP theory and basics
Post by: Rob Strand on October 16, 2006, 05:22:56 AM

> DSP chips have FFT math calculators built in to do the FFT formulas. There is 4 FFT cores processors so more clock cycles,multiplexing buss lines,pipelining

>  How do u do DSP feedbacking positive or negative feedback loop like in a phaser,flangers?

I can see when you make comments like this you are missing something!

DSP isn't a programming language it's a way of processing signals digitally.  DSP is largely mathematical.  You have input variables/signals/numbers and it produces output variables/signals/numbers.    You can do DSP with C++.

On the other side there are processors which are optimized for DSP.  That doesn't make other processors incapable of DSP processing it just means they might not be as fast, or as neat", doing the same job.   Like all processor they have a low level programming in assembler - this is very efficient in terms of processor time.  However you can also get C compilers for these processors so you can write DSP in C - this very efficient in terms of getting programs running quicker.

Feedback is simply a matter of taking one of the output variables and adding it or subtracting it from an input variable before feeding it back into a "digital system".  If you can draw a block diagram you basically follow that diagram.  At each functional unit you will have some a related equation for example,

input_with_feedback  =  input  + k * feedback

where k would be the  amount of feedback.

This equation can be treated as a mathematic statement, or as a statement in a programming language.

The thing is you have to convert every thing into a digital representation with some sort of calculation.

Digital filters for example is one whole world of doing filtering in using digital processing.  The filters are generally *discrete time* in that your signal are  at equally spaced intervals in time eg. CD is 44.1kHz.

An LFO is simply an equation, table, or whatever, that generates another waveform eg Sine, Triangle.  IF you can write a program to generate such a waveform in C or C++ that that's all there is to it.  When it comes to a phaser you have to modulate the filters charactersitic with the LFO waveform.  So you would take the number produced by the LFO code and then calculate the filter coefficients to correspond to the sweeping of the filter.  This behaviour is going on in an analogue circuit - it's up to you how to bend things around and calculate the digital version of this - there's more than one way to do this.

I'm not trying to teach you DSP here you have to study that in your own time.  What I trying to do is bridge what I see as the gap between what you want to do and the DSP world.

Title: Re: DSP theory and basics
Post by: Sir H C on October 16, 2006, 09:52:52 AM
What kind of math formulas or math subject is good for programming DSP and algorthims for phasers,flangers? What do i need to know on how to program a phasers filters is it FFT? differential and integral calculus, and differential equations? vector phase equations? Time domain and frequency domain equations?

Title: Re: DSP theory and basics
Post by: markphaser on October 16, 2006, 01:05:29 PM
Thanks for the help

What I trying to do is bridge what I see as the gap between what you want to do and the DSP world

Yes i just want the concepts not the actuall detail really instruction code just knowing about DSP and how the mechanics of how it works

So the LFO is sweeping the filters coefficients values?

An LFO is simply an equation, table? This is my problem of understand how to do or make LFO waveforms in C++ i still don't see and understand how they do them are they operations,expressions, math calculations i don't get it i have my C++ book out and i don't have any chapter on how to make a LFO , LFO's waveforms are not digital filters so what are they in DSP please? are they link lists,arrays,structures like a data base and then u loop function them in cycles or something? because a array is a table or rows and columns like excel or access is this what u mean?

Feedback is simply a matter of taking one of the output variables and adding it or subtracting it from an input variable before feeding it back into a "digital system".

LIke Passing values,passing pointers,passing arrays,passing arguments,passing to functions,passing to subrounties? to manipulate the variable right?

Title: Re: DSP theory and basics
Post by: Rob Strand on October 17, 2006, 12:03:47 AM
>  LFO is sweeping the filters coefficients

Yes.

> problem of understand how to do or make LFO waveforms

It's some form of equation, for example for a sine wave LFO,

LFO_output  = sin(2 * pi * f_lfo * t)
t   = t + T_sample

where f_lfo is the  LFO Frequency and  T_sample is the sample time.

LFO_output is used to generate the filter coefficients

The above generates one LFO output at time, t.  Every time you get a new sample the time is updated and the LFO output changes with time.

That's basic the idea.

Another alternative is to fill out an array before you start, this results fairly large array but is faster to calculate (you only have to calculate it once).  As each sample goes by you step through the array.  Because the LFO is periodic you only need to store one period in the table.  I haven't tried to optimize anything as it will only confuse the point I'm making.

Title: Re: DSP theory and basics
Post by: Transmogrifox on October 18, 2006, 02:51:46 AM
mark phaser, I think you have not yet come to understand what an LFO is.  First let's start with the acronym:
LFO = Low Frequency Oscillator

That's all.  An analog oscillator is a circuit that produces a voltage that changes with time and repeats itself in a periodic and predictable manner (usually).  An LFO is a circuit that does this at a low enough frequency that we can watch the LED blink on every positive half cycle of the periodic fluctuation.  I don't know if you have ever watched an oil well pump in wyoming or North Dakota or Eastern Montana, but you could call the oil well pump an LFO.  It periodically modifies the position of the plunger at a visible rate.

A digital LFO is a program that generates a sequence of numbers that repeat periodically, and the period of repetition of the cycle is measured typically in units of seconds as opposed to milliseconds or microseconds such as would be considered an audio waveform generator.  In the case of the oil well pump, you could interpret the numbers as feet the end of the arm is to be elevated above the ground.

If you turn your function generator on the test bench down to 10 Hz, you have an LFO.

If you plug that into a speaker you won't hear anything.  You won't even hear a sweeping swooshing sound.  You'll probably hear a crackling sound from the electrical current burning up your speaker coil, if anything.

A filter on its own is not as exciting to hear on an audio signal as a filter that can move its center frequency up and down in the audio spectrum.

We can identify a filter's resonance, gain, and resonant frequency from the characteristic differential equation that describes its output with respect to time and input.  This is called a transfer function.  The coefficients on each term in the differential equation define the parameters mentioned above.  We typically perform a Fourier transform on this characteristic equation to express the filter in terms of frequency response as opposed to its time-domain response to inputs.

That last paragraph fits under the broad category of signal processing.  Notice, no circuits, no code, no electricity.  These concepts can apply to mechanical devices in terms of striking devices.  For example, a guitar string can be thought of as a highly resonant comb filter, where the peak frequencies of the filter are harmonically related.  The input to the filter is a pulse, which is the action of plucking the string.  Since a pulse is rich in frequency content, it is likely that there will be some content within the string's resonant bands.

Now for circuits.  Circuits can be configured to behave in similar manners.  And even further, a digital SIGNAL PROCESSOR can be programmed to do the filter thing.  In digital land, we don't have differential equations, we have difference equations.  We like to think frequency response, so we perform a z-transform on the difference equation to get frequency response information more directly than can be obtained from the time domain response.   The coefficients on the difference equation (and thus on the z-transformed equation as well) define filter properties in a like manner, such as resonance and cut-off frequency and gain and such.

Without an LFO, you simply have a filter that has a fixed resonance, center frequency, gain, and phase response.  Now if you can modify one of these coefficients over time, then the filter's nature will change with time.  If you do it gradually with time, it will typically result in a nice sweeping or swooshing sensation.  Ah!  Let's write a program that automatically changes a few coefficients in a certain pattern with respect to time.  That's what we would call an LFO.

The LFO itself doesn't do anything special on its own.  Each number it outputs is interpreted as either an amplitude for a signal (in the case of a tremolo), or a certain filter coefficient, or an amount of delay, etc.

Does that help?
Title: Re: DSP theory and basics
Post by: SeanCostello on October 18, 2006, 01:13:30 PM
The explanation from Transformix is good. A LFO is an O that runs at LF.

One further note: In some cases, low frequency oscillators in digital systems run at a lower rate than the sampling rate. Many DSP systems work with blocks of samples at a time, as this can result in higher efficiency (VST and Audio Units, for example, work on blocks of samples at a time). If an oscillator is intended for low frequencies, it can run once per block, as opposed to once per sample, without much loss in audio quality. This may introduce some some quantization error for certain apps (where the "stairstep" waveform comes out as noise), so the low frequency oscillator may be interpolated at the sample rate. As long as the interpolation is cheaper than the LFO generation, this is a good idea.

Sean Costello
Title: Re: DSP theory and basics
Post by: R.G. on October 18, 2006, 11:54:18 PM
Gentlemen - you are trying to shovel sand against the tide.
Title: Re: DSP theory and basics
Post by: Rob Strand on October 19, 2006, 04:31:19 AM
> Gentlemen - you are trying to shovel sand against the tide.

Forums tend to have a strong tide at the best of times, but you can only hope a few grains stick.   I don't know what sticks when you try to do something into the wind.

Title: Re: DSP theory and basics
Post by: Arno van der Heijden on October 19, 2006, 08:29:23 AM
> Gentlemen - you are trying to shovel sand against the tide.

I have to disagree.

Apart from Markphaser, this kind of posts can really help other people to get a better understanding of DSP.
I, for myself, find them very interesting at least. It helps me to get a better understanding of the whole picture.

So, thanks for the effort and keep 'm coming!
Title: Re: DSP theory and basics
Post by: markphaser on October 20, 2006, 05:51:07 PM
Thanks alot Transmogrifox for your information and time

An analog oscillator is a circuit that produces a voltage that changes with time and repeats itself in a periodic and predictable manner (usually).

When programming a LFO in DSP or in C++ what instruction code do u use to make voltage changes with time?

LIke how do i put in the instantaneous values for voltages/amplitude,phase degree,time interval of the waveform and its waveshape?

Do i just put in instantaneous values inside a loop? but in my C++ book i can't find where u can set a voltage instantaneous value and then sets its phase degree,time duration there must be a instrunction code i just don't know the names to sets these C++

When i put my oscilloscope probe on the output of a DSP chip i should see the voltage/amplitude,phase degree value,time duration
sweeping up and down so the instructions codes has to be linked to the D/A converters output

repeats itself in a periodic:
This is a Loop function to repeat a LFO waveform periodic?

If you turn your function generator on the test bench down to 10 Hz, you have an LFO:

But thats not sweeping up and down its just a fixed manual LFO not a oscillating LFO it would have to have a start Frequency and a stop frequency points and sweep in the range of like 8hz-12hz or 10hz-15hz its sweeping the start frequency and stop frequency

If u put in a square waveform into a filter network with a LFO set a 10hz its going to output a squarewave with a fixed duty cycle duration. If u sweep the frequency to 8hz-12hz or 10hz-15hz the squarewaves on time/off time durations changes the duty cycle percetages

A LFO is not a oscillator its a sweeping oscillator in my electronics books all they talk about is just fixed oscillators at one frequency. A LFO modulates the frequency up and down, in a analog LFO circuit what component or network makes the oscillator SWEEP up and down?

A univibe uses a Phase shifter oscillator which is different than a regular oscillator so the instantaneous values for voltages/amplitude,phase degree,time interval of the waveform and its waveshape are way different. If u put your oscilloscope probe down on the output of the univibes LFO the waveshape is different than a regular oscillator like in a MXR phase90 i think its the
instantaneous values for voltages/amplitude,phase degree,time interval. I'm trying to stress that the instantaneous values make the LFO's waveshape because in a univibes LFO its very Hyperbolic waveform close to a sine waveform. Hyperbolic means a sinewaveform but with rounded top and bottom "EXCURSIONS"

LED blink on every positive half cycle of the periodic fluctuation:

Most Lamps,LDR's,LED's have sag time would this be setting the LED duration time in C++ to get a "sag time" because most LDR's have a Sag time internally built in? set a Delay value so the resistances changes the filters coefficient values.

The LFO is sweeping faster than the LDR's slew rate resistance changes from a resistance start point to a resistance stop point and these range its sweeps the resistance. But a LDR's has a internal built in slew rate called sag time so in DSP u have to program the LFO to be faster than the LDR resistance changing the IIR or FIR filters coefficient values so there is a lead and lag timing

How can a IIR or FIR function like a phase spiltter filter to have a inphase output and a out of phase output?

DSP Phaser "MXR phase90"
1.)   notches that are non periodical
2.)  IIR comb filters only 1 output in phase mostly
3.) regular sweeping oscillator triangle waveform output
4.) LFO interfaces with FETs get harmonic distortion

DSP univibe phase shifter is different
1.) notches are non-periodical depending on the Phaseshift LFO oscillator wa
2.) IIR comb filter is set to phase splitter mode having a inphase and a out of phase , 2 outputs
3.) LFO is a phase shifter oscillator 360 degrees hyperbolic waveform
4.) LDR/lamps sag time

phaser:notches that are non periodical:
1.) When a MXR phase 90's LFO sweeps the notches they are moving "One set" of non-periodical
each stage notches out the "same" non periodical frequencys in the spectrum so u get deeper notches but
only at the fixed non-periodical frequencys set fixed by the phase filters time constances R/C networks
2.) A univibe has "4 different sets" of non-periodical notches up and down
each stage in the univibe is notching "different" non periodical frequencys in the spectrum
having 4 different time constants R/C networks

Differential op-amp phasers VS transitor univibe phase spiltter 2 output
1.) If u look at a schematic at most phaser pedals than use op-amps for the phase filters. They mostly use 2 inputs which is
using the inverting and non-inverting pins which is a differential function. Their is only ONE output which the op-amp internally
combines the frequency non-periodical notches,frequencys,suming,reinforcing in a differential inverting , non inverting INPUTs
not outputs

2.) Each stage in the univibe is a phase spiltter which is different than a differential operation. A phase spiltter has one input
and 2 outputs which is inphase and a out of phase output so u get 2 different outputs.

3.) The way the LFO sweeps/modulates the non-periodical notches in a differential filter operations having 2 inputs
is different VS how the LFO sweeps/modulates the non-periodical notches in a phase spiltter filter because it has
2 lead/lad outputs u get more swooshing slushy with the phase spiltter.

4.) The way to think about differential filters Vs Phase spiltter filters is they are like frequency dependant summing mixers
and amplitude dependant also.

5.) Differential filter LFO sweep/modulation VS phase spiltter filter LFO sweep/modulation

6.) Differential filters sums two different inputs inphase and out of phase signal degrees into a summed MONO signal
7.) Phase spiltter filters takes one input and mirrors two different phase angle/degrees,lead,lag timing so its more like
a stereo output than a summed mono output

Differentation- the rate of change of variable quantities
measured differences between successive values
Integal- inverse of differenations, rate of change of instantaneous quantities
Integal is the sum or added sucessive values

DSP programming
1.) Waveform symmetry
2.) Time Constants: intergation time constants or differentation time constants
3.) rounded Top and Bottom "excursions"
4.) Tangential slope
5.) waveform Tilt: positive squarewave top tilted/slanted, or negative squarewave bottom tilted/slanted
6.) Linearity
7.) Duty cycle time durations ratios and percentages
8.) rise time and fall time, leading or falling edges
9.) crossover distortion points can be symmetrical or asymmetrical or offsets at different amplitude instantaneous values
What i mean is that the crossover distortion points for the rise cycle is at a different amplitude instantaneous value than
the fall cycle of a waveform
Aymmetrical waveforms is when the positive cycle has a waveform shape different than the negative cycles waveshape
Symmetrical waveforms is when both positive cycle and negative cycles have the same waveform shapes

DSP LFO waveform trigonometrys
1.) Sine value
2.) Cosine value
3.) Tangent value
4.) Contangent value
5.) Secant value
6.) Cosecant value

Title: Re: DSP theory and basics
Post by: markphaser on October 20, 2006, 05:56:50 PM
A LFO is not a oscillator its a sweeping oscillator in my electronics books all they talk about is just fixed oscillators at one frequency. A LFO modulates the frequency up and down, in a analog LFO circuit what component or network makes the oscillator SWEEP up and down?

YOu have to have a oscillator and a intergator circuit/network after the oscillator or in the feedback loop. The intergator is what sweeps up and down the oscillators frequency. The Answer is a intergator circuit

The univibes LFO has a hyperbolic sinewave output so its a oscillator with not a intergator circuit because when a intergator network u will get a triangle waveform output i think even if u put in a hyperbolic or sinewaveform into a intergator network/circuit the output is not going to change the waveshape but it does ""intergate"" the output sweeping it

Title: Re: DSP theory and basics
Post by: Transmogrifox on October 24, 2006, 01:56:32 AM
Quote
A LFO is not a oscillator its a sweeping oscillator in my electronics books all they talk about is just fixed oscillators at one frequency. A LFO modulates the frequency up and down, in a analog LFO circuit what component or network makes the oscillator SWEEP up and down?

Ummm...You really really badly misunderstand the LFO's function in a guitar FX circuit.  It's that knob on the function generator that allows you to change the rate on the LFO, just like the rate knob on your phaser.  Exactly the same thing.  The wave shape is irrelevant in understanding a voltage that varies periodically with time.   That's ALL an LFO is.

How it relates to Tremolo:
The LFO voltage modulates an LED/LDR set-up configured like a volume knob.  It's like turning the volume up and down at a periodic interval.  We make mechanical pots to modulate it manually with our hands.  We make voltage dependent resistors or voltage controlled variable gain amplifiers to modulate the volume automatically with a voltage level.  The LFO is an electrical analogy to the motion of twisting your hand left and right.  Your hand does not effect the signal in any way.  The resistor divider created by the pot changes the amplitude.  Your hand just modifies the properties of the resistor divider.

How it relates to a phaser:
A phaser is just a comb filter that can be tuned to a certain center frequency.  You could put pots in it and control it with a knob, or VCA's to control it with a voltage.  All the LFO does is provide this control voltage in the pattern you want to hear the filter sweep.
!

Quote
Do i just put in instantaneous values inside a loop? but in my C++ book i can't find where u can set a voltage instantaneous value and then sets its phase degree,time duration there must be a instrunction code i just don't know the names to sets these C++

You need to be smarter than a C++ book to program DSP.  C++ is not a programming language that holds your hand.  It offers you the ability to tell the hardware in the computer to do whatever you want.  Only libraries that other people have written in C++ can give you a sine function where you can pass frequency, phase, blah blah blah parameters...or you can write your own.

There is no C++ command called "Tremolo LFO", or "Phaser LFO".  or "Flanger LFO".  An LFO is an LFO is an LFO and the computer doesn't give a damn what you use it for.   You can use it to modulate a phaser, or you could write it directly to the DAC and use it as a function generator.  You have to understand simple signal processing theory better before you can program DSP.  C++ has nothing to do with DSP.  It's just one language that you can use to program a computer to do DSP.  DSP from a computer's point of view is just addition, subtraction, multiplication and sometimes division....millions of times a second.  Can you write C++ code to add, subtract, multiply and divide?  You can do DSP as long as you know what it is that you want to add, subtract, multiply and divide.  The compiler won't think for you, you have to know what you want the computer to do before you can tell it to do it.

Can you write C++ code that will add 1 to a register (memory location) every time through a loop?  Can you make it exit the loop when the register equals a certain number, then enter another loop that subtracts 1 from the register?  When it goes back to 0 can you make it go to the first loop?

If you can do that, then congratulations! You have written your first triangle wave oscillator.  Now, can you write your code to set the time in between adding 1 (or subtracting 1)?  Make it long enough and you have made your first triangle LFO.

C++ is not Wal-Mart.  You don't just go down to the C++ store and find your handy "Tremolo in a box" kit.  C++ is more like a hardware store selling lumber, nails, hammer, saws, etc.  The hardware store owners don't know or care what their customers are making with the stuff they sell.  You come up with a plan of first what you want to make, then what you need to use to make it, and how it needs to go together to make it work.  You are in control of the outcome.  If you want to make a sine wave generator, you don't just go "y=sin(x)" like you do in MATLAB.  You have to either write the sine function yourself, or find a library that contains a sine function that somebody else has written, but C++ doesn't do it on it's own.   Forget about trying to find a chapter in a C++ book about making an LFO for a phaser.    If you want to model a Phase 90's LFO waveform, then you need to figure out the mathematical function that describes that waveform, then define the sequence of addition, subtraction, multiplication and division for the DSP to do in order to generate that outcome.  You can't just look in your C++ book for a "model phase 90" command.

So...You can probably find in a book somewhere about a C++ library that contains the sine/cosine function, and find info about how to include the file, and how to use it (such as what variables are passed to it and how).

You can go to a DSP theory book and find out how to make an FIR or IIR all-pass filter.

You can probably go to a National Semi or Analog Devices tech resource site and even find source code for such a filter.  You may also find info about how to get samples from the ADC, and also how to write them to the DAC.

You call the sine function, generating a sine at a low frequency.  You take the most recent value in its output buffer and calculate filter coefficients with it.

Then you pass the coefficients to your filter and direct it to the signal to be processed.

Store the signal current sample in a filter output buffer.

Move number to DAC Tx buffer.

Digital phaser.
Title: Re: DSP theory and basics
Post by: David on October 24, 2006, 10:31:16 AM
Gentlemen - you are trying to shovel sand against the tide.

...with a sugar spoon.
Title: Re: DSP theory and basics
Post by: Transmogrifox on October 24, 2006, 03:01:24 PM
Gentlemen - you are trying to shovel sand against the tide.

...with a sugar spoon.

I'm more in agreement with Arno van der Heijden on this.  I'm personally pretty well convinced markphaser is not going to understand until he takes the time to read and study on his own.  However, others who read through the replies can learn a few things.  I am personally learning just from having to break it down to present it.  I think we're digging up treasures in the process of shoveling sand into the tide, making it well worth the trouble.
Title: Re: DSP theory and basics
Post by: Peter Snowberg on October 24, 2006, 04:40:14 PM
Thank you Transmogrifox.

I concur.
Title: Re: DSP theory and basics
Post by: bwanasonic on October 25, 2006, 01:42:48 AM
I think we're digging up treasures in the process of shoveling sand into the tide, making it well worth the trouble.

Next to "F*ck 'em if they can't take a joke", this may become my favorite saying! Sure beats "Same shit, different day".

Kerry M
Title: Re: DSP theory and basics
Post by: markphaser on October 25, 2006, 04:41:01 AM
Thanks alot Transmogrifox for your information and time on DSP

LFO is a voltage that varies periodically with time
LFO is a oscillator network + intergator network which varys up and down the voltage periodically
in time without the intergator circuit op-amp the oscillator will not vary/sweep up and down
the voltage periodically it would be a "steady voltage" like a battery with a frequency
from the oscillator oscillation freq.

A manual switch LFO shuts off the intergator which sweeps the oscillation frequency
so it just puts a "steady voltage" like a battery not varying or sweeping the filter

LFO voltage modulates an LED/LDR

Rotation turns VS voltage or resistance values

When the LED/lamp blinks/flashes , the LED is On/off a Lamp is more variable inbetween
the "dimming values" of the lamp light is a factor. The LDR sweep resistance curve characterists( linear or log,exponental, how fast does it change resistance characterists slew rate/sag time of the LDR

In DSP code what is the Lamp or LED?
(because i would like to enter in the "dimming values" or light values)

In DSP code what is the LDR?
(because i would like to enter in the resistance curve of the LDR)

The LDR has a lagging time because the Lamp is flashing light faster than the LDR can change so im trying to
also enter in the "Lag time of the LDR"
What would this Lag time of the LDR be in DSP please?

The LFO sweeps/modulates the filter coefficients in DSP
But where is the Lamp/LDR how do i enter in this in DSP so i can sweep/modulate the filters coefficient values
with the Lamp dimming values,LDR lag time,LDR resistance curve in DSP

DSP LFO is from a sine/cosine function

The Sine/cosine function needs to be linked to a DSP phaser lamp dimming values,LDR lag time,LDR resistance curve
in a subrountine in DSP code before it links to the filters coefficient value
Title: Re: DSP theory and basics
Post by: Transmogrifox on October 25, 2006, 03:21:29 PM
Quote
The LFO sweeps/modulates the filter coefficients in DSP
But where is the Lamp/LDR how do i enter in this in DSP so i can sweep/modulate the filters coefficient values
with the Lamp dimming values,LDR lag time,LDR resistance curve in DSP

You make a hard case, markphaser.

In analog land, the LDR is a resistor that changes the filter coefficients in the equation that describes the analog filter.  Since we can't just type keys on a keyboard and say, "Analog filter, have these coefficients", we have to physically change the value of a resistor (or multiple) that are found in the characteristic equation for the filter.  Thus, we use an LDR, because its resistance varies with respect to light.  We are able to change the amount of light incident to the LDR by the magnitude of current through a lamp or LED.  If you apply a voltage to a lamp or LED, current will flow, light will be emitted, and the resistance of the LDR will change.  That's how we can change filter's coefficients with analog circuits.

The beauty of the DSP is we don't have to play "conversion tricks" to modify a filter's behavior.  We can directly define the filter's characteristics simply by changing numbers in the characteristic equation and then re-running the calculation.  A DSP can do millions of arithmetic operations in a second, so we can re-calculate the filter every sample period if we want.

I side-stepped you question about "what is the LED/LDR in DSP code" because it's not necessary to digitally model this to make a DSP phaser.  If you want to do analog modeling, where you digitally model an analog filter and every parameter in the physical circuit, then you're reaching far beyond the scope of simply getting started with DSP.

Please try to understand the basic principles of what a signal is and what a signal processor can do before you try to do signal processing.  The nature of questions makes it look like you're trying to eat an entire pumpkin with one bite.

Frequency is not a mystical word.  It's simply a unit of measurement.  If there's a pattern that repeats itself over and over, then frequency is a measurment of how often the patern repeats.  The frequency that I down a cup of coffee, begin to feel an urge, go to the bathroom and refill my coffee mug is about once an hour.  This pattern repeats itself all morning long.  This is 1 cycle per hour.  It is (1/60) cycles per second.  Thus my coffee-bathroom pattern can be said to repeat at a frequency of (1/60) Hertz (Hz).

Another example of frequency:  Sampling.  You can sample a lower frequency pattern at a much much higher frequency.  For audio, a popular DSP sampling frequency is 48 kHz.  That means that the A/D converter takes a snapshot of the voltage on its input every (1/48,000) second interval, thus it collects 48 thousand samples per second.  Each of these samples is now a binary number and can be stored in a memory location.  It is no longer thought of as a literal voltage, but just as a number, typically normalized to between 0 and 1.

The signal it is sampling is just a voltage that varies with time at a much slower rate that you sample.  During a sampling interval, it more or less looks like a DC level to the ADC, since it samples it for a duration of a few nanoseconds.  An audio signal voltage will not change appreciably during the duration of 10 nanoseconds.  It WILL change appreciably over the duration of 100 microseconds.  It may repeat the same pattern multiple times (or approximately same pattern) over a duration of 10 milliseconds....

chew on that for a while.

Title: Re: DSP theory and basics
Post by: amz-fx on October 31, 2006, 08:33:13 AM
I'm personally pretty well convinced markphaser is not going to understand until he takes the time to read and study on his own.

What they are hinting at without saying is that markphaser is Walters, who some believe to be a bot program, but many others believe to be just a misguided person likes to gum up message boards with nonsense posts.  He has been banned from countless electronic forums for this type of intentional mumbo-jumbo bandwidth-stealing rubbish.

http://www.firebottle.com/fireforum/ff.cgi?cmd=vt&fid=gt&tid=1136965521yhrGomF

http://www.electro-tech-online.com/general-electronics-chat/17094-analog-frequency-dividers.html

Carry on...

Title: Re: DSP theory and basics
Post by: Sir H C on October 31, 2006, 11:24:29 AM
I'm personally pretty well convinced markphaser is not going to understand until he takes the time to read and study on his own.

What they are hinting at without saying is that markphaser is Walters, who some believe to be a bot program, but many others believe to be just a misguided person likes to gum up message boards with nonsense posts.  He has been banned from countless electronic forums for this type of intentional mumbo-jumbo bandwidth-stealing rubbish.

http://www.firebottle.com/fireforum/ff.cgi?cmd=vt&fid=gt&tid=1136965521yhrGomF

http://www.electro-tech-online.com/general-electronics-chat/17094-analog-frequency-dividers.html

Carry on...

He also goes by brent and brentwalters too.
Title: Re: DSP theory and basics
Post by: R.G. on October 31, 2006, 10:33:04 PM
Real person or bot, there is no amount of explaining that will ever get any concept across to walters/brent/markphaser. There seems to be no reception of the information behind the words.

It's like shoveling sand against the tide. If you want to, do it - but do it because you enjoy it, not because you expect to make a difference in the distribution of sand.
Title: Re: DSP theory and basics
Post by: Gabriel Simoes on November 10, 2006, 06:41:01 PM
Well, if the intentions are really good, here my thoughts go ...

What most people doesn't understand is that the MAJORITY of the DSP concepts are not direct related to Audio processing, computer music or anything else straight related to sound. They are applied to signals! (dahhhh obvious but somepeople's vision get's blurred sometimes).
If you really want to learn about dsp, start by reading some theorical concepts, and I can tell you to read Simon Haykin signals and sistems book, and efechor's digital signal processing a pratical approach as you get some of the theory behind continue and discret systems and signals.

After that, you may try to start relating the topics like periodic functions to generate oscilators, filters to generate eqs and effects, lms and rls to start trying to simulate/modelate equipment, etc.

And about equipment, since this is a damn hard to stay market and hobby, I think it's best to start developing plug-ins using vst or directx before spending cash on dsp kits .... it's easier, cleaner, cheaper and more clarifying.

I have already worked on automatic transcription of audio signals, some effects and I'm right now doing my mastery in digital signal processing focusing on audio processing, and damn ... it's just the beggining of the beginning ... dsp is such a wide area that you can study your whole life and still there will be some gaps ...
Title: Re: DSP theory and basics
Post by: markphaser on November 10, 2006, 07:24:28 PM
periodic functions to generate oscilators, filters to generate eqs and effects, lms and rls to start trying to simulate/modelate equipment

Can u please give me some examples of periodic functions using DSP ?
Title: Re: DSP theory and basics
Post by: Sir H C on November 14, 2006, 09:36:27 AM
sine wave -> table 0, .717, 1, .717, 0, -.717, -1, -.717

square wave -> table 1, -1, 1, -1

triangle wave -> table -1, -.5, 0, .5, 1, .5, 0, -.5