Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Bouncing Ball V1
Here is the bouncing ball. Started by executing Row 01 (SHIFT+OK on 01) or the XMAP FX. Works with V2.0C

.map   BOUNCE1.MAP (Size: 1,47 KB / Downloads: 25)

Variable A: Width = Amount of notes
Variable B: Helpcounter to create the 'timebase'
Variable C: Tempo
Variable D: Note Offset
Variable E: Helpcounter
Variable F: Type of Trigger

00 SKIP     01 =     =0=0     >                            //always skip 1 row
01 VAR      #  A     #025     >                            //set variable A to 25 (amount of notes)
02 --              //upper part is to allow the start of the bouncing ball only from the XMAP FX command
03 CALC     INC      VBVB     >     SETV     V  B     SRC  //Increment Variable B  (B=B+1)
04 SKIP     02 >     VCVB     >                            //SKIP 2 rows if Variable C is bigger than Variable B
05 VAR      #  B     #000     >                            //Reset Variable B
06 CALC     INC      VEVE     >     SETV     V  E     SRC  //Increment Variable E (E=E+1)
07 --              //upper part generates a timebase/ tempo defined by variable C
08 SKIP     05 >     =1VA     >                            //Skip the next 5 rows if Variable A is 0 (or Var A < 1)
09 SKIP     04 <     VEVA     >                            //Skip the next 4 rows is Variable E is smaller then Variable A
0A VAR      #  E     #000     >                            //Reset Variable E again.
0B CALC     DEC      VAVA     >     SETV     V  A     SRC  //Decrement Variable A  (A=A-1)
0C VAR      #  F     #0E1     >     TRIG     VAL*     TR 1 // Generate a Trigger E1 on Trigger 1
0D CALC     ADD      VAVD     >     CV       NOTE     CV 1 // VA holds a note number, added offset defined by Variable D
                                                           //Output the Note on CV 1

So generally, 03 - 06 is a simple timebase and decrements E.
08 Skips always if A hasn't been 'executed / initialized'.
09 Skips until E reaches A and gets reset again on 0A
On 0B Var A is decremented. That repeats and gets faster as A is getting smaller and E reaches it faster until A is 0 and 08 will skip it again.
And VA is also being used to play a note and because it is getting smaller each time it will also play each time a lower note. D is just an offset to the Note you can add to have it in a range you like.
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

Forum Jump:

Users browsing this thread: 1 Guest(s)