Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
step value to variable (via mapping)
#1
Hello friends, I'm trying to make a mapping but I can't find a way to save the value of a step of a pattern in a variable.

I have pattern 01 with a duration of 8 steps. I want variable A to be the value (note) from step 1, variable B to be step 2 and so on

how can I do this?
Reply
#2
(07-16-2024, 08:40 AM)baikul Wrote: Hello friends, I'm trying to make a mapping but I can't find a way to save the value of a step of a pattern in a variable.

I have pattern 01 with a duration of 8 steps. I want variable A to be the value (note) from step 1, variable B to be step 2 and so on

how can I do this?

It is possible, however there is no direct command for it so it has to do that in some sort of algorithm:

Code:
00 TRCK   TRK1   PTRW                               :Get the current row of track 1 (scaled to 0 - 4095)
01 CALC   RNGE   =0VP                               :Scale (range) ROW00 between 0 and 64 (Variable P has been set to 64 before once)
02                                                  :Just an empty spot
03 GLOB   CLKO   ----                               :The next 2 rows 03 and 04 are neccessary *see below
04 SKIP   16 =   03=0                               :Skip the next 16 rows if the clock output (result of ROW03) is low (zero)
05 SKIP   01<>   01=0                               :Skip the next row if ROW01 is not 0 (as in pattern step 0)
06 CV     CV1          >  SETV    V A    SRC        :Get the CV value and put in Variable A.
07 SKIP   01<>   01=1                               :Skip the next row if ROW01 is not 1 (as in pattern step 1)
08 CV     CV1    ----  >  SETV    V B    SRC         :Get the CV value and put in Variable A.
.. repeat these 2 rules for your amount of steps and take care that the SKIP in ROW04 covers all the rows you use. I filled in 16 rows which should be enough for 8 pattern steps as you need 2 mapping rows for each check
* the remark on Rows 03 and 04:
The Track Row pointer points already to the next step once the last step has been finished.  It is possible that the result of the CV generation might still be the result of the step before then (pointer points already to the next step, mapping for the new step gets already executed but the pattern didn't execute the new step yet). But when the clock goes high, then the pattern step is definitely valid and so there is the check around which allows the updates only when the clock comes up.
PLEASE use the search function if something have been asked or discussed before.
Every (unnessesary) forum support means less time to develop! But of course, i am here to help!  Smile
Reply
#3
Yeah!! It works perfect. Now I can have variable banks to retrieve values and do calculations. Thank you very much, I wouldn't have done it without your help.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)