-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathappend_song.rexx
executable file
·59 lines (45 loc) · 1.01 KB
/
append_song.rexx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
/* Append song 2 in song 1 */
address OCTAMED_REXX
options results
block_name = "CIPPA";
spacing_factor=8
ED_GETNUMBLOCKS VAR BLOCK_OFFSET
ED_GETNUMBLOCKS VAR BLOCK_COUNTER
ED_GOTO BLOCK FIRST
SG_GOTOSONG FIRST
SG_GOTOSONG NEXT
ED_GOTO BLOCK FIRST
ED_GETNUMBLOCKS VAR bl
START = 0
STOP = bl-1
OP_UPDATE OFF
DO loop = START TO STOP
ED_GOTO BLOCK loop
ED_GETBLOCKNAME; block_name = result
wi_showstring block_name
RN_COPY BLOCK
SG_GOTOSONG PREV
ED_NEWBLOCK LAST
ED_GOTO BLOCK BLOCK_COUNTER
BLOCK_COUNTER=BLOCK_COUNTER+1
RN_PASTE BLOCK
ED_SETBLOCKNAME block_name
DO i = 0 to spacing_factor -1
ED_HIGHLIGHTLINE l i*spacing_factor ON
END
SG_GOTOSONG NEXT
END
SG_GOTOSONG FIRST
SG_GOTOSONG NEXT
ED_GETNUMPLAYSEQ var total_sequence_blocks
DO seq_pos = 1 to total_sequence_blocks
wi_showstring seq_pos
ED_GETPLAYSEQBLOCK seq_pos; cur_block=result
SG_GOTOSONG PREV
ED_GOTOPLAYSEQ BOTTOM
ED_NEWPLAYSEQ cur_block+BLOCK_OFFSET
SG_GOTOSONG NEXT
END
SG_GOTOSONG FIRST
OP_UPDATE ON
wi_showstring 'SONG APPENDED!'