/* cmd19set */ /* calculates and enters the argument for command 19 to get the sample */ /* start as near the range start as possible */ /* Instructions: Copy this macro to OctaMED directory. Create a new shortcut in the Keyboard Shortcut editor. Set the shortcut name and input part as you wish, set Action as Execute ARexx File, Command as cmd19set, and Window as SAMPLEEDITOR. When you want to start a sample not from the beginning, using the command 19xx, open the Sample Editor, point the range cursor where you want to begin playing, and press the key you had set up. The macro calculates the nearest value for command 19, and enters it at the current cursor position. */ address 'OCTAMED_REXX' "sa_getrangestart var rngstart" if (rc = 0) then do cmd19arg = trunc((rngstart + 128) / 256) if (cmd19arg > 255) then "wi_showstring The point is too far from the beginning." else "ed_setdata cmdnum=25 qual="cmd19arg end