Modifying Radial Step Sequencer draw() function

Discuss Lemur and share techniques.
Post Reply
Traxus
Regular
Posts:216
Joined:30 Nov 2012 06:19
Location:Detroit
Contact:
Modifying Radial Step Sequencer draw() function

Post by Traxus » 30 Oct 2014 22:35

I'm re purposing the radial step sequencer factory template, to play like a monophonic pad setup.

I've done all the easy stuff, it tracks multi touch successfully, has a memory bank to revert to the last held pad in order etc... (try holding several pads, then release one finger at a time)

However I'm learning that I can't (yet) draw to save my life.

As it stands, the steps/pads generate starting from the 3 oclock position, going clockwise. So, pad 0 starts at 3 oclock.

I want pad 0 to be at the top, starting from 12 oclock; I can't quite sort how the draw() function decides to start where it does nor how to adjust it 90 degrees counter clockwise...


EDIT, also can't attach the file to the forum, ('Sorry, the board attachment quota has been reached.') do a right click and save link as below:

http://traxusinteractive.com/modded_radial_3.jzml

Macciza
Regular
Posts:1325
Joined:07 Dec 2011 04:57
Location:Sydney, Australia.

Re: Modifying Radial Step Sequencer draw() function

Post by Macciza » 31 Oct 2014 05:50

Hi
I may have a solute somewhere from the ARC stuff i did a while back . .
Or may be able to nut something out . . . Cant recall exactly what i did ...
You can't just rotate the canvas because you also need to rotate the logic...
Will have a look and get back to you . . .
MM
iMac 2.8G i7 12G 10.6.8/10.7.2, Legacy Dexter/Lemur, Liine Lemur/iPad2, KMI SoftStep, 12Step & QuNeo , B-Controls, Mackie C4 etc
MaxMSP, Live Suite, Native Instrument stuff, etc Modified Virtual Guitar System etc All Projects/Modules © CC-BY-NC-SA[*][/b]

Traxus
Regular
Posts:216
Joined:30 Nov 2012 06:19
Location:Detroit
Contact:

Re: Modifying Radial Step Sequencer draw() function

Post by Traxus » 31 Oct 2014 15:53

Yeah i was fooling around with the sin and cos values, ended up with a lot of concave polygons etc...

It is sloppy, but for now I just wrote some parser logic...

I was able to calculate that, regardless of the number of switches, the switch at the 12 oclock position was typically this value:

Code: Select all

offset = floor(Steps.s_switches *.75)
with that in mind using some conditionals and math, I wrote two functions, translateRawToOffset() to change the output such that 12 oclock pad would feed 0, and translateOffsetToRaw() which would do the inverse in case i wanted to set a value from outside the object.

Post Reply