home *** CD-ROM | disk | FTP | other *** search
/ Chip: Hang es video / CHIP_ZENESZERKESZTO_2005.ISO / audio_1 / softstep / softstep3.msi / Data1.cab / pattern.ufn < prev    next >
Text File  |  2002-08-18  |  7KB  |  144 lines

  1. 11
  2. 0
  3. 0
  4. 0
  5. COMBINECODE=768
  6. FILTERCODE=17
  7. FRAME_H=0
  8. FRAME_W=0
  9. FRAME_X=200
  10. FRAME_Y=600
  11. S_FRAME_H=0
  12. S_FRAME_W=0
  13. SAVEFILE="pattern"
  14. SAVEFORMAT="bmp"
  15. SWATCH="leaf"
  16. 0. 
  17. 1. 
  18. 2. 
  19. 3. 
  20. 4. Pattern: description = ; Algorithmic Visual Pattern Generator~;
  21. 5. Pattern: setup tooltips = nLed(8),                         ;Set # of inputs and define tooltips~ToolTip(,                        ;No clock tip~   "Filter swatch",              ;IN1~   "# of swatches",              ;IN2~   "Rotation per step  [*3]",    ;IN3~   "X increment",                ;IN4~   "X jitter",                   ;IN5~   "Y jitter",                   ;IN6~   "Gamma  [/6]",                ;IN7~   "Soften  [*10]"),             ;IN8~V0.(-1),                         ;Initialize step counter (0 based)~NumLabel(Combinecode),           ;Show combine code in label area~PixNumFrames(4),                 ;Set number of buffer-image frames:~                                 ;1=swatch buffer, 2=swatch, 3=pattern buffer, 4=pattern~Ex(Me+1),                        ;Setup swatch frames~Ex(Me+2),                        ;Calculate pattern frame sizes~Ex(Me+3),                        ;Setup pattern frames~Goto(Me+4)                       ;Exit initialization section
  22. 6. Pattern: setup swatch frames = PixActive(1),                                   ;Set swatch buffer frame active~PixLoad(-1,Swatch,"","bmp",1),                  ;Load swatch buffer frame from file~PixOff,                                         ;Make swatch buffer frame invisible~Let(S_Frame_W,PixFrameWidth),                   ;Get swatch frame width~Let(S_Frame_H,PixFrameHeight),                  ;Get swatch frame height~PixActive(2),                                   ;Set swatch frame active~PixCopy(1),                                     ;Initialize swatch frame~PixOff                                          ;Make swatch frame invisible~
  23. 7. Pattern: calculate pattern frame sizes = Let(Frame_W,S_Frame_W+(IN2*IN4)+IN5),           ;Calc pattern frame width~Let(Frame_H,(S_Frame_H*2)+IN6),                 ;Calc pattern frame height~Let(Frame_X,(PixScreenWidth/2)-(Frame_W/2)),    ;Calc pattern frame X position~Let(Frame_Y,(PixScreenHeight-Frame_H-200))      ;Calc pattern frame Y position
  24. 8. Pattern: setup pattern frames = PixActive(3),                                   ;Set pattern buffer frame active~PixFill(0),                                     ;Fill pattern buffer frame with black~PixSize(Frame_W,Frame_H),                       ;Set pattern buffer frame size~PixOff,                                         ;Set pattern buffer frame invisible~PixActive(4),                                   ;Set pattern frame active~PixFill(0),                                     ;Fill pattern frame with black~PixSize(Frame_W,Frame_H),                       ;Set pattern frame size~PixMove(Frame_X,Frame_Y),                       ;Place pattern frame on screen~PixShow(1),                                     ;Make pattern frame visible~PixOnTop(1)                                     ;Make pattern frame stay on top of other frames
  25. 9. Pattern: test if draw swatch = Switch(V0<(IN2-1),Me+1,0)                       ;If step count is < 0 based steps, add swatch to pattern
  26. 10. Pattern: build pattern = V0.(V0+1),                                      ;Increment step counter~Ex(Me+1),                                       ;Process swatch~Ex(Me+2),                                       ;Process pattern part 1~Ex(Me+3)                                        ;Process pattern part 2
  27. 11. Pattern: process swatch = PixActive(2),                                   ;Set swatch frame active~PixRotate((IN3*3) Mod 360),                     ;Rotate frame~Switch(IN1,0,Me+3)                              ;If button false, filter swatch
  28. 12. Pattern: process pattern part 1 = PixActive(3),                    ;Set pattern buffer frame active~PixFill(0),                      ;Fill pattern buffer frame with black~V1.(IN5*Ran),                    ;Calculate X position using jitter~V2.(IN6*Ran),                    ;Calculate Y position using jitter~PixCombine(2,512,(((V0*(IN4-1))+(V1)) Mod Frame_W),((Frame_H/2)-(S_Frame_H/2)-IN6/2)+(V2)),~                                 ;Combine swatch into pattern buffer at appropriate X,Y location~V3.(IN3 Mod 15),                 ;Calculate portion of note value based on rotation~V4.(IN4 Mod 8),                  ;Calculate portion of note based on step size~V5.((V1+V2) Mod 10),             ;Calculate portion of note based on jitter~Out(V0+V3+V4+V5)                 ;Output note value
  29. 13. Pattern: process pattern part 2 = PixActive(4),                    ;Set pattern frame active~PixAutoRepaint(0),               ;Turn off auto repainting to stop flicker~PixGamma(IN7/6),                 ;Apply gamma effect to existing elements~PixSharpen(-(IN8*10)),           ;Apply sharpen effect, actually soften~PixCombine(3,Combinecode),       ;Combine pattern buffer into pattern frame~PixRepaint,                      ;Repaint~PixAutoRepaint(1)                ;Turn on auto repainting~
  30. 14. Pattern: filter swatch = PixFilter(Filtercode)                           ;Apply filter to swatch frame
  31. 15. 
  32. 16. 
  33. 17. 
  34. 18. 
  35. 19. Save: description = ; Pattern State (Frame) Saver~;
  36. 20. Save: setup tooltips = nLed(2),                         ;Set # of inputs and define tooltips~ToolTip(,                        ;No clock tip~   "Hold",                       ;IN1~   "# of swatches"),             ;IN2~V0.(0),                          ;Initialize file index counter (1 based)~NumLabel(V0),                    ;Display file index counter in module label~Goto(Me+1)                       ;Exit initialization section
  37. 21. Save: test if save pattern = Switch(IN1,0,Me+1)                              ;If hold button is off, save file on each clock tick
  38. 22. Save: test if save complete = Switch(V0<(IN2),Me+1,0)                        ;If step count is < 0 based steps, save state of pattern
  39. 23. Save: save pattern = V0.(V0+1),                                      ;Increment file index counter~NumLabel(V0),                                   ;Display file index counter in module label~PixActive(4),                                   ;Set pattern frame active~PixSave(V0,Savefile,"",Saveformat)              ;Save current state of current pattern into pattern<V0>.bmp
  40. 24. 
  41. 25. 
  42. 26. 
  43. 27. 
  44. 28. 
  45. 29. 
  46. 30. 
  47. 31. 
  48. 32. 
  49. 33. 
  50. 34. 
  51. 35. 
  52. 36. 
  53. 37. 
  54. 38. 
  55. 39. 
  56. 40. 
  57. 41. 
  58. 42. 
  59. 43. 
  60. 44. 
  61. 45. 
  62. 46. 
  63. 47. 
  64. 48. 
  65. 49. 
  66. 50. 
  67. 51. 
  68. 52. 
  69. 53. 
  70. 54. 
  71. 55. 
  72. 56. 
  73. 57. 
  74. 58. 
  75. 59. 
  76. 60. 
  77. 61. 
  78. 62. 
  79. 63. 
  80. 64. 
  81. 65. 
  82. 66. 
  83. 67. 
  84. 68. 
  85. 69. 
  86. 70. 
  87. 71. 
  88. 72. 
  89. 73. 
  90. 74. 
  91. 75. 
  92. 76. 
  93. 77. 
  94. 78. 
  95. 79. 
  96. 80. 
  97. 81. 
  98. 82. 
  99. 83. 
  100. 84. 
  101. 85. 
  102. 86. 
  103. 87. 
  104. 88. 
  105. 89. 
  106. 90. 
  107. 91. 
  108. 92. 
  109. 93. 
  110. 94. 
  111. 95. 
  112. 96. 
  113. 97. 
  114. 98. 
  115. 99. 
  116. 100. 
  117. 101. 
  118. 102. 
  119. 103. 
  120. 104. 
  121. 105. 
  122. 106. 
  123. 107. 
  124. 108. 
  125. 109. 
  126. 110. 
  127. 111. 
  128. 112. 
  129. 113. 
  130. 114. 
  131. 115. 
  132. 116. 
  133. 117. 
  134. 118. 
  135. 119. 
  136. 120. 
  137. 121. 
  138. 122. 
  139. 123. 
  140. 124. 
  141. 125. 
  142. 126. 
  143. 127.
  144.