electro-music.com   Dedicated to experimental electro-acoustic
and electronic music
 
    Front Page  |  Articles  |  Radio
 |  Media  |  Forum  |  Wiki  |  Links  |  Store
Forum with support of Syndicator RSS
 FAQFAQ   CalendarCalendar   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   LinksLinks
 RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in  Chat RoomChat Room 
Live streaming at radio.electro-music.com

  host / artist show at your time
<on air> PHANToS presents: Ghouls & Ghosts (various EM Halloween performances from previous years)
  PHANToS presents: The Monstrous Modulator (Modulator ESP's 2010/2011 halloween performances mix)
Please visit the chat
 Forum index » Clavia Nord Modular » Nord Modular G2 Discussion
math operators on G2
Post new topic   Reply to topic Moderators: Nord Modular Editors
Page 2 of 2 [43 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Goto page: Previous 1, 2
Author Message
cristian



Joined: Jul 15, 2004
Posts: 24
Location: Barcelona
G2 patch files: 1

PostPosted: Mon Aug 23, 2004 2:00 pm    Post subject: Reply with quote  Mark this post and the followings unread

well, mosc

I was playing with your FIR patch and i made this set of variations.

i like the way the filter sounds when modulated in this speaking way, sounds like a deep space signal?

well, its something isn't it...


FIR speak.pch2
 Description:

Download
 Filename:  FIR speak.pch2
 Filesize:  1.87 KB
 Downloaded:  755 Time(s)


_________________
www.no-future.com
Back to top
View user's profile Send private message Visit poster's website
jksuperstar



Joined: Aug 20, 2004
Posts: 2489
Location: Denver
Audio files: 1
G2 patch files: 18

PostPosted: Mon Aug 23, 2004 2:26 pm    Post subject: Reply with quote  Mark this post and the followings unread

oh- If you integrated a bipolar oscillator that had a 50% duty cycle (sine, etc) you should get a zero output over time (might vary as the oscillator swings up & down). But if that osc. had a dc-offset, you'd get an output related to that offset (depeding on the rate of the signal, and your rate of integration, it could be a constant)...so it could also be used to detect how much DC-offset a signal has...much like a low pass filter would do Smile (where a hi-pass would reject the dc-offset) (hence the reason it's an approximation...the lower you can make the LP cutoff, the "slower" your integration rate and the better the approximation...but it all depends on what you want!).

A true integration is instantaneous, meaning you're not calculating the area under a curve, since that involves a second dimension (time) to create a x*y=area situation. As x (time) approaches 0 (remember all those damn limits as x->0?), then the approximation is better...but you can get "close enough" if you choose the integration rate (sample rate & cutoff of a lowpass) appropriately for the function to be integrated.

So, a true integration isn't really possible, unless you're sample rate is infintely faster than your signal rate.
Back to top
View user's profile Send private message Visit poster's website
mosc
Site Admin


Joined: Jan 31, 2003
Posts: 17618
Location: Allentown, PA
Audio files: 125
G2 patch files: 60

PostPosted: Mon Aug 23, 2004 2:28 pm    Post subject: Reply with quote  Mark this post and the followings unread

Ha ha... that's not what I expected, but it's cool anyway... (talking about the patch)
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address
mosc
Site Admin


Joined: Jan 31, 2003
Posts: 17618
Location: Allentown, PA
Audio files: 125
G2 patch files: 60

PostPosted: Mon Aug 23, 2004 2:37 pm    Post subject: Reply with quote  Mark this post and the followings unread

[quote="jSo, a true integration isn't really possible, unless you're sample rate is infintely faster than your signal rate.[/quote]

Well, it's good we have avoided the analog/digital debate. Those discussions we've had enough of, and they seem to never cease.

This does bring up, "what it truth?". Rolling Eyes
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address
Blue Hell
Site Admin


Joined: Apr 03, 2004
Posts: 20626
Location: The Netherlands, Enschede
Audio files: 150
G2 patch files: 318

PostPosted: Mon Aug 23, 2004 3:01 pm    Post subject: Reply with quote  Mark this post and the followings unread

mosc wrote:
An impulse implies that the single goes up and then down. The Integrator would return to zero after N clock ticks.


You're wrong Howard, not for the running average algorithm you described, but calculating a running average is not true integration.

Ok a little fresh up, just the basics :

http://www.sosmath.com/calculus/integ/integ01/integ01.html

The integral over time of the impulse is simply the area between it and the horizontal axis (presuming the bounds off the integral lay outside the impulse, and presuming the impulse is infinitesimally short).

This area will not change with time, the integral won't drop to zero again. The running average will, the low pass filter will (all FIR filters will) those are not true integrators they are leaky.

The integral of a constant positive value over time is a ramp up (until it hits the ceiling, hence the attenuation I mentioned in a previous post).

So for a pulse that is not short the integral starts at zero, during the impulse it rises and at the end of the impulse it will freeze.

Jan.
Back to top
View user's profile Send private message Visit poster's website
Blue Hell
Site Admin


Joined: Apr 03, 2004
Posts: 20626
Location: The Netherlands, Enschede
Audio files: 150
G2 patch files: 318

PostPosted: Mon Aug 23, 2004 4:47 pm    Post subject: Reply with quote  Mark this post and the followings unread

Now for differentiation, it is defined as:

Posted Image, might have been reduced in size. Click Image to view fullscreen.

Hmm we can't divide, but luckily we don't have to as we can't truly differentiate anyway (as it's a continues operation that we can't perform, we can only perform the difference operation, a time discrete variation) delta-x will be a small constant so we just have to amplify.

So what does it say, well we have to calculate the difference between a value at x and a value at x + delta-x. Then we have to divide by delta-x, which is a constant value so we can multiply by it's reciprocal.

So my original circuit idea was not quite right.

Ok a patch & a picture to illustrate, I'm not able to connect a scope (as my NM's are boxed into the radio thingy) but on theoretical grounds I believe the output signals should be phase shifted by 90 degrees with respect to each other.

The integrator should phase shift into the other direction than the differentiator does. The original signal is always on the left channel, the red switch selects either the i or the d signal for the right channel. I think I got amplifications and attenuations set to reasonable values, but it all depends upon the frequency.

Jan.

The web site the picture comes from is http://web.mit.edu/wwmath/calculus/differentiation/definition.html


dif-int.jpg
 Description:
An exaple for integration and differentiation
 Filesize:  59.87 KB
 Viewed:  8054 Time(s)

dif-int.jpg



dif-int.pch2
 Description:
example for integration and differentiation

Download
 Filename:  dif-int.pch2
 Filesize:  1.3 KB
 Downloaded:  983 Time(s)

Back to top
View user's profile Send private message Visit poster's website
ManuMontevideo



Joined: May 07, 2004
Posts: 46
Location: Sevilla, Spain
G2 patch files: 1

PostPosted: Tue Aug 24, 2004 2:13 am    Post subject: Reply with quote  Mark this post and the followings unread

Shocked Shocked wow, cristian vogel is here Shocked
Back to top
View user's profile Send private message Visit poster's website
Tim Kleinert



Joined: Mar 12, 2004
Posts: 1038
Location: Zürich, Switzerland
Audio files: 6
G2 patch files: 213

PostPosted: Tue Aug 24, 2004 2:49 am    Post subject: Reply with quote  Mark this post and the followings unread

Wow! Yes, this is indeed educational! I've just now finally understood FIRs and IIRs by looking at these patches.

I just wonder how fast one could clock such a circuit on the G2. I'd guess 48kHz, by some logic toggling circuit.

_________________
beer
Back to top
View user's profile Send private message
mosc
Site Admin


Joined: Jan 31, 2003
Posts: 17618
Location: Allentown, PA
Audio files: 125
G2 patch files: 60

PostPosted: Tue Aug 24, 2004 11:17 am    Post subject: Reply with quote  Mark this post and the followings unread

Well, Jan. If you were integrating over infinite time, then you would be right, but in synthesizers we integrate over finite time. So, maybe it is technically impossible to integrate over infinite time, but over finite time we can.

The most common place an integrator is used in an analog synthesizer is in the envelope generators. Integrators provide the ramps up and down. When we reduce the time constant of the integrator - the time over which we integrate - then we change the attack and decay times.

Integrators in analog synths are built with an operational amplifier and with a capacitor in the feedback loop. These are called integrators in electrical engineering parlance, I assure you, and they are in effect running averages over some finite time.

Sometimes in engineering, the pure math is bent a little in order to make wonderful things practical.


int-diff2.jpg
 Description:
From "IC Op-Amp Cookbook" by Walter G Jung, Howard Sams, 1974
 Filesize:  167.42 KB
 Viewed:  8028 Time(s)

int-diff2.jpg



Int-diff.jpg
 Description:
From "IC Op-Amp Cookbook" by Walter G Jung, Howard Sams, 1974
 Filesize:  116.24 KB
 Viewed:  8027 Time(s)

Int-diff.jpg


Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address
mosc
Site Admin


Joined: Jan 31, 2003
Posts: 17618
Location: Allentown, PA
Audio files: 125
G2 patch files: 60

PostPosted: Tue Aug 24, 2004 11:26 am    Post subject: Reply with quote  Mark this post and the followings unread

In discrete time sampled systems, the best we can do for differentiation is to take the difference between this sample and the previous one. The limit is fixed at one sample. Delta Y over Delta X, is just that simple.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address
Blue Hell
Site Admin


Joined: Apr 03, 2004
Posts: 20626
Location: The Netherlands, Enschede
Audio files: 150
G2 patch files: 318

PostPosted: Tue Aug 24, 2004 1:17 pm    Post subject: Reply with quote  Mark this post and the followings unread

mosc wrote:
Well, Jan. If you were integrating over infinite time, then you would be right, but in synthesizers we integrate over finite time.


? ... integration of an impulse over any finite or infinite period time containing the duration of the impulse will yield the area under the impulse as the result of that integration.

To not be able to integrate over infinite time is not a problem, as long as it is assumed that the signal to integrate was zero before the integration started the results will be correct. If it was not zero during that time a constant can be added or subtracted to compensate, in practice though it is reasonable to consider the signals to have been zero before the machine was switched on.

That we are dealing here with a time disctrete system is not really important, there will only be a very small error in the integration as long as the signals are reasonably smooth over the period of the system clock, which to me seems to be safe to assume.

Now the funny thing is that, although you seem not to agree with me, you are presenting examples using perfect opamps (En=0, In=0), which will in fact yield perfect integrators and differentiators (when driven with a voltage source). So I don't quite see your point here.

Example, for the integrator :

The document states that :

delta-Eo = -Ein / RC

which implies that when

Ein = 0

it will be the case that

delta-Eo = 0

which means that Eo will not change.

And so, when an impulse is fed into this hypothetical circuit the output will make a DC jump and not return to zero.

I said hypothetical, as I'm well aware that the (En=0, In=0) criterium is an approximation and that the circuits in reality will be leaky.

My point was that its possible on the G2 to come up with something better than that. Please prove me to be wrong there.

There is a point in trying to do better, with good integrators it is possible to make state variable filters which is not so easy to do with low pass filters (I tried that on the NM 'Classic').

Considering differentiation on a time discrete system we seem to agree. That is, I see no light between your statement and mine (I only added the notion that delta-X is a constant, and I assume you will agree with that).

Jan.
Back to top
View user's profile Send private message Visit poster's website
mosc
Site Admin


Joined: Jan 31, 2003
Posts: 17618
Location: Allentown, PA
Audio files: 125
G2 patch files: 60

PostPosted: Tue Aug 24, 2004 2:09 pm    Post subject: Reply with quote  Mark this post and the followings unread

Yes, delta-x = delta-time = 1 sample.

Well, if we are argueing and agreeing at the same time, then no sense in continuing this discussion...

Is there an easier way to get a signal conditioner than I have used. A control that when straight up give zero signal. When turned to the right it give increasingly stronger signal. When turned to the left it give increasingly stronger inverted signal. I used a multiplier and a bipolar constant. It would be nice to have a single module to do that. Even on the Moog Modular there are modules for that commonly used functions. Very usefull when controlling a filter frequency with an envelope for example.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address
Blue Hell
Site Admin


Joined: Apr 03, 2004
Posts: 20626
Location: The Netherlands, Enschede
Audio files: 150
G2 patch files: 318

PostPosted: Tue Aug 24, 2004 2:39 pm    Post subject: Reply with quote  Mark this post and the followings unread

mosc wrote:
Well, if we are argueing and agreeing at the same time, then no sense in continuing this discussion...


Ok.

Quote:

Is there an easier way to get a signal conditioner than I have used.


One module ... if you've got a spare morph I can see some trickery with a mix2-1b (the one with the inverter buttons) module to work, not really ideal.

Otherwise it would be a wish list item I think, maybe the LevAmp could be generalized a bit to allow for bipolar mode. I'd vote yes ...

Jan.
Back to top
View user's profile Send private message Visit poster's website
mosc
Site Admin


Joined: Jan 31, 2003
Posts: 17618
Location: Allentown, PA
Audio files: 125
G2 patch files: 60

PostPosted: Tue Aug 24, 2004 3:10 pm    Post subject: Reply with quote  Mark this post and the followings unread

I think I'm starting to understand what your are saying. The area under the curve for an impule over an infinite amount of time will be constant because the area never changes, and the impulse is always there.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address
Blue Hell
Site Admin


Joined: Apr 03, 2004
Posts: 20626
Location: The Netherlands, Enschede
Audio files: 150
G2 patch files: 318

PostPosted: Tue Aug 24, 2004 3:23 pm    Post subject: Reply with quote  Mark this post and the followings unread

Yes .... that's a property of the system ... an integrator does not forget ... it's an IIR filter .... and indeed, it can blow up ....

glad things can be said informal again, my brain hurts, we would need a math MOD to continue ...

Jan.
Back to top
View user's profile Send private message Visit poster's website
mosc
Site Admin


Joined: Jan 31, 2003
Posts: 17618
Location: Allentown, PA
Audio files: 125
G2 patch files: 60

PostPosted: Tue Aug 24, 2004 3:40 pm    Post subject: Reply with quote  Mark this post and the followings unread

All you have to do to fix that infinity problem is scale the coefficents by 1/T. Now all we need is a divider... Laughing
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address
pstnotpd



Joined: Apr 09, 2004
Posts: 31

G2 patch files: 3

PostPosted: Wed Aug 25, 2004 11:11 am    Post subject: Reply with quote  Mark this post and the followings unread

Well, I must admit it's rather academic, or 'des keizers baard' (dutch).
I remember way back we had an analog computer at school which did integration and differentiation using discrete components. I've always thought it would be fun to try and use such a device on an analog modular to experiment and was wondering if it could be done using the red monster. I'm trying to dig back in the books, but obviously get stuck in Laplace transformations and stuff which I haven't done in ages.

Anyway. my feeling was that if we'd have a true integrator or differentiator it would mean a pure sine is transformed to a cosine and my gut feeling says a LP or HP filter can't do that by itself as it by definition reduces gain at higher frequencies.
Also I remember somethink like a 1st order system (i.e. filter) would be a feedback loop over an integrator, which is not an integrator.
So the question would be how to eliminate the feedback component in a filter I suppose.

I probably will get back to this when I've had a few less Duvels......
Back to top
View user's profile Send private message
pstnotpd



Joined: Apr 09, 2004
Posts: 31

G2 patch files: 3

PostPosted: Wed Aug 25, 2004 11:20 am    Post subject: Reply with quote  Mark this post and the followings unread

Wow! I just noticed that we already got on page 2 for this one!
Ignore my last post (I think) I'll have to read through all this first Very Happy
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Moderators: Nord Modular Editors
Page 2 of 2 [43 Posts]
View unread posts
View new posts in the last week
Goto page: Previous 1, 2
Mark the topic unread :: View previous topic :: View next topic
 Forum index » Clavia Nord Modular » Nord Modular G2 Discussion
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum
e-m mkii

Please support our site. If you click through and buy from
our affiliate partners, we earn a small commission.


Forum with support of Syndicator RSS
Powered by phpBB © 2001, 2005 phpBB Group
Copyright © 2003 through 2009 by electro-music.com - Conditions Of Use