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 » NM Classic (NM1 or G1)
Identifty multiples
Post new topic   Reply to topic Moderators: Nord Modular Editors
Page 1 of 1 [4 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Author Message
torsig1967



Joined: Mar 29, 2006
Posts: 162
Location: Sweden
Audio files: 2
G2 patch files: 1

PostPosted: Mon Sep 01, 2008 1:39 pm    Post subject: Identifty multiples
Subject description: How do I make an economical modulo calculation?
Reply with quote  Mark this post and the followings unread

I wonder if there's some really economical way to do modulo division?

I need that to be able to find multiples of certain values.
Example:
Let's say I have: y=12n (n=0, 1, 2, 3...)
And then I have a bunch of values (x1, x2, x3...)
I want logic HIGH when those x-values satisfies the equation above.
12, 24, 36 would give HIGH
13, 6, 41 would give LOW

And my guess is that the easiest way woud be to use modulo division and compare to 0. When result is zero then I have a multiple.

Hope this question is understandable.
Back to top
View user's profile Send private message
blue hell
Site Admin


Joined: Apr 03, 2004
Posts: 24451
Location: The Netherlands, Enschede
Audio files: 297
G2 patch files: 320

PostPosted: Mon Sep 01, 2008 3:57 pm    Post subject: Reply with quote  Mark this post and the followings unread

When you subtract the real value from the value ran through a note quantizer you'll get a zero result where the note quantizer outputs the same value as is on it's input.

By setting the the note quantizer to 12 (and the range to full, 64) and comparing the difference obtained to zero you should get what you sketched in your example.

But ... IIRC ... some extra trickery was involved for negative numbers ... the quantizer handles those different, and possibly there is a small rounding error ... like half a unit ... that needs to be compensated for ... it needs a bit of experimentation.

Maybe I have a patch somewhere ...

_________________
Jan
also .. could someone please turn down the thermostat a bit.
Posted Image, might have been reduced in size. Click Image to view fullscreen.
Back to top
View user's profile Send private message Visit poster's website
blue hell
Site Admin


Joined: Apr 03, 2004
Posts: 24451
Location: The Netherlands, Enschede
Audio files: 297
G2 patch files: 320

PostPosted: Mon Sep 01, 2008 4:13 pm    Post subject: Reply with quote  Mark this post and the followings unread

I found : http://electro-music.com/forum/viewtopic.php?highlight=modulo&t=5302 - for the G2 though and it may have the errors I mentioned.
_________________
Jan
also .. could someone please turn down the thermostat a bit.
Posted Image, might have been reduced in size. Click Image to view fullscreen.
Back to top
View user's profile Send private message Visit poster's website
torsig1967



Joined: Mar 29, 2006
Posts: 162
Location: Sweden
Audio files: 2
G2 patch files: 1

PostPosted: Wed Sep 10, 2008 12:02 pm    Post subject: Reply with quote  Mark this post and the followings unread

Blue Hell wrote:
When you subtract the real value from the value ran through a note quantizer you'll get a zero result where the note quantizer outputs the same value as is on it's input.

[...]

But ... IIRC ... some extra trickery was involved for negative numbers...


That works just fine, also with negative numbers without any extra tryckery.
Thanks.
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 1 of 1 [4 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 » NM Classic (NM1 or G1)
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