async modulo arithmetic.

A place for developers to share ideas and assist each other in solving problems.

Moderators: valis, garyb

Post Reply
User avatar
Neutron
Posts: 2274
Joined: Sun Apr 29, 2001 4:00 pm
Location: Great white north eh
Contact:

async modulo arithmetic.

Post by Neutron »

Ok say i had 2 4 way switches, and a 16 position knob which would step through the switches like

11
12
13
14
21
22
23
24
31
32
33
34
41
42
43
44

i can probably do the first switch by (integer) knob value/4 + 1. but how can i get the remainder for the second switch. i would prefer not to make a 16 way switch !
User avatar
Shroomz~>
Posts: 5669
Joined: Wed Feb 23, 2005 4:00 pm
Location: The Blue Shadows

Re: async modulo arithmetic.

Post by Shroomz~> »

You could use a pot & TableTextFader - Connect a pot to the sel count pad. Set the Count var to 16, then enter your desired values into the value array. The output would be the sel value pad. Fold it into a new module, export the pads & call it ArraySwitchEX or something.

Also, you wouldn't need to 'make' a 16-way switch as such, as you already have the SwitchEX, but you probably know that already.
User avatar
Shroomz~>
Posts: 5669
Joined: Wed Feb 23, 2005 4:00 pm
Location: The Blue Shadows

Re: async modulo arithmetic.

Post by Shroomz~> »

Here's an example module. Connect your pot up to the switch input. Val1 output will give you the 16 values that you mentioned. Val2 pad output is a string from the Val2 array that could obviously have various uses.
Attachments
ArraySwitch2.zip
(5.88 KiB) Downloaded 115 times
User avatar
Neutron
Posts: 2274
Joined: Sun Apr 29, 2001 4:00 pm
Location: Great white north eh
Contact:

Re: async modulo arithmetic.

Post by Neutron »

oh thats much simpler. i forgot about how much you can do with the controls themselves.
thanks for the example!
User avatar
Shroomz~>
Posts: 5669
Joined: Wed Feb 23, 2005 4:00 pm
Location: The Blue Shadows

Re: async modulo arithmetic.

Post by Shroomz~> »

Up until now I've been using RangeText & Switch modules to create switching parameter value arrays, but this way should be much better.
User avatar
Neutron
Posts: 2274
Joined: Sun Apr 29, 2001 4:00 pm
Location: Great white north eh
Contact:

Re: async modulo arithmetic.

Post by Neutron »

this worked very well for me. except the editing of the arrays is a bit of a pain. (can i edit in notepad?)
can these arrays be changed to have more columns? or should i add another array to the device, if i do will it work in tandem with the already existing value and text ones?
User avatar
Shroomz~>
Posts: 5669
Joined: Wed Feb 23, 2005 4:00 pm
Location: The Blue Shadows

Re: async modulo arithmetic.

Post by Shroomz~> »

Haven't found a way to make the editing of arrays easier in the normal array edit window. We were working on a way to make editing arrays easier a while back, but it turned out to be quite unstable.

To add more arrays you could just duplicate the array switch module inside the Array Switch2 module, then connect their count & sel count pads.
User avatar
Neutron
Posts: 2274
Joined: Sun Apr 29, 2001 4:00 pm
Location: Great white north eh
Contact:

Re: async modulo arithmetic.

Post by Neutron »

basically thats what i was planning to do. i dont know how much these "pep" arrays use, but i doubt multiplying a switch like that would make a massive DSP hit.
User avatar
Shroomz~>
Posts: 5669
Joined: Wed Feb 23, 2005 4:00 pm
Location: The Blue Shadows

Re: async modulo arithmetic.

Post by Shroomz~> »

Duplicating those shouldn't have any DSP hit at all.
Post Reply