electro-music.com   Dedicated to experimental electro-acoustic
and electronic music
 
    Front Page  |  Radio
 |  Media  |  Forum  |  Wiki  |  Links
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 
 Forum index » Clavia Nord Modular » Nord Modular G2 Discussion
Sawtooth Phase Shift w. offsets?
Post new topic   Reply to topic Moderators: Nord Modular Editors
Page 1 of 1 [3 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Author Message
jamos



Joined: Jun 01, 2004
Posts: 514
Location: Eugene, Oregon, USA
Audio files: 4
G2 patch files: 41

PostPosted: Mon Feb 21, 2005 6:21 pm    Post subject: Sawtooth Phase Shift w. offsets? Reply with quote  Mark this post and the followings unread

Hey all;

I'd like to generate 8 sawtooth waves that are integral multiples of 45 degrees apart in phase. Currently I'm using LFO B; I'd like to use the Shape LFO (for the Dir input), but that puts me over 100%. So I'd like to use a single shape LFO, and generate the other phases through offsets and comparators.

Does anyone have this patched up and lying around, to save me the hassle?

TIA if so
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Kassen
Janitor
Janitor


Joined: Jul 06, 2004
Posts: 7678
Location: The Hague, NL
G2 patch files: 3

PostPosted: Wed Feb 23, 2005 5:11 pm    Post subject: Reply with quote  Mark this post and the followings unread

Nobody?

then I´ll give it a go. What you need is a modulus function. The fun with saw waves is that if you perform a mod operation on them the output will still be a saw. This means that mod[amplitude] will make a saw delayed by adding constant values to it (like we are going to do) and that mod[factor of the amplitude] will pitch shift saw waves (at the expense of volume).

First of all, a normal oscilator has a amplitude of 2·64=128 units. 45° is a 1/8 of that so we need 16 units of offset (and multiples thereoff), provided we can get the modulus to work.

Ok, because we aren´t going to go more than 360° out of phase our mod function does not need to be recursive. Also, if we can keep all phase offsets positive it can be quite simple;

"If the input is larger then 64, substract 128 from it."

Asuming we are only adding to the signal of the original osc, this will nicely wrap it round since it can never get below -64 and itll never be further out of range than +128.

However, because of the finite (and realy quite small) headroom of the G2 this will get us in trouble. The largest offset we´ll need will be +112 which will sometimes be added to values as large as 64 and so will cause clipping.

There are two things you can do about this.

*You can define your offsets on either side of your input signal, then use a mod function that will add 128 for input values below -64 in adition to what the sugestion above already does. This is mathematically nice and will keep your sound quality but it´ll make your mod function -of which you´ll need 7 copies- twice as expensive.

*You can also devide all values, including your original osc´s volume by two, then amp up the end result again. Since we are only adding and substracting it´s perfectly legal to multiply everything involved by .5, then amp up the result to compensate. This will cost you a bit of sound quality (litterally).

Either ought to do the trick, I´d grab the second one.


All together now, to the tune of Queen´s We will rock you;

We.... need,
We need,
More Math!

*boom, boom clack*
*boom, boom clack*

We..... need,
We need,
More Math!

_________________
Kassen
Back to top
View user's profile Send private message Send e-mail Visit poster's website
jamos



Joined: Jun 01, 2004
Posts: 514
Location: Eugene, Oregon, USA
Audio files: 4
G2 patch files: 41

PostPosted: Fri Feb 25, 2005 9:19 am    Post subject: Reply with quote  Mark this post and the followings unread

I figured out how to do it; I'll post it as a building block in a few days (I'm on the road now.. love that G2 demo!)
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic Moderators: Nord Modular Editors
Page 1 of 1 [3 Posts]
View unread posts
View new posts in the last week
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


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