1MIDICOPY(1) General Commands Manual MIDICOPY(1)
2
3
4
6 midicopy - Copy selected track, channel, time interval of a MIDI file
7 to another MIDI file
8
10 midicopy [-ver] [-trks n1,n2,..] [-xtrks n1,n2,..] [-xchns
11 n1,n2,..] [-chans n1,n2,...] [-from n (in midi ticks)] [-to n (in
12 midi ticks)] [-fromsec %f n (in seconds)] [-tosec n (in seconds)]
13 [-frombeat %f n (in beats)] [-tobeat n (in beats)] [-replace
14 trk,loc,val] [-tempo %n] [-speed %f] [-drumfocus n m] [-mutenodrum
15 [%d]] [-setdrumloudness n m] [-focusontrack n1,n2,... (from 1)]
16 [-focusonchannel n1,n2,... (from 1)] [-attenuation n] [-nobends]
17 [-indrums n1,n2,...] [-xdrums n1,n2,...] [-onlydrums]
18 [-nodrums] input.mid output.mid
19
21 midicopy is used to copy part of a MIDI file to another MIDI file. You
22 can select a particular time interval, particular channels, and partic‐
23 ular tracks or any combinations. If one or both of the run time parame‐
24 ters -from or -to are included, the program returns the playing time in
25 seconds of the output file. Midicopy was developed by Seymour Shlien
26 from the midifilelib distribution available from http://www.harmony-
27 central.com/MIDI/midifilelib.tar.gz.
28
30 -ver prints version number and then exits
31
32 -trks n1,n2, etc
33 Selects the tracks to be copied where the track numbers start
34 from 1. If more than one track is specified, they should be
35 separated by commas. You should always copy track 1 since by
36 convention it contains information pertinent to all the other
37 tracks. By default all tracks are copied unless you specify par‐
38 ticular tracks using this run time parameter.
39
40 -xtrks n1,n2, etc
41 Lists the tracks to exclude from copying. All other tracks are
42 copied. This option does not work in combination with -trks.
43
44 -xchns n1,n2, etc
45 Lists the channels to exclude from copying. All other channels
46 are copied. This option does not work in combination with
47 -chns.
48
49 -chns n
50 Like above, it specifies the MIDI channels to be copied. By
51 default all channels are copied. Channel numbers also start from
52 1.
53
54 -from n
55 The program will copy all MIDI commands starting from midi pulse
56 number n. By default it will start from time zero or the begin‐
57 ning of the MIDI file.
58
59 -to n Stops copying all events after midi pulse number n. By default
60 the file is copied to the end.
61
62 -frombeat n
63 The program will copy all MIDI commands starting from quarter
64 beat number n. By default it will start from time zero or the
65 beginning of the MIDI file.
66
67 -tobeat n
68 Stops copying all events after quarter beat number n. By default
69 the file is copied to the end.
70
71 -fromsec n
72 The program will copy all MIDI commands starting from time n in
73 seconds.
74
75 -tosec n
76 Stops copying all events after time n in seconds. These two
77 options (-fromsec and -tosec) do not work accurately if the MIDI
78 file has more than one tempo command. Only the first one is used
79 for converting seconds into MIDI pulse units. It is therefore
80 preferable to use the -from and -to options.
81
82 -replace trk,loc,val
83 This option should be used alone. Midicopy will copy the entire
84 file verbatim except it will replace a byte by val, where the
85 byte is located in the specified track (trk) and specified posi‐
86 tion (loc). Commonly this function is used for changing a par‐
87 ticular MIDI program number (instrument) associated with a chan‐
88 nel. You need to know the byte count in the track of that
89 parameter in order to use this function,
90
91 -tempo quarter notes/minute
92 All tempo indications in the midi file will be replaced with the
93 above value.
94
95 -speed factor
96 All tempo indications in the midi file will be multiplied with
97 this factor. Values greater than 1.0 will speed up the music
98 while lower values slow the music. The factor is a floating
99 point value.
100
101 -drumfocus drum-code excluded_drum_velocities
102 The selected drum line (specified by the drum-code pitch value)
103 is highlighted by reducing the loudness of all other drum lines
104 to the excluded_drum_velocities value. The drum-code value must
105 be in the range of 35 to 81 inclusive.
106
107 -mutenodrum [level]
108 All channels which are not 9 (drum channel) are attenuated to
109 the given level. If level is not specified, it is assumed to be
110 zero.
111
112 -setdrumloudness n m
113 where n is between 35 to 81 inclusive and m is the loudness
114 between 0 and 127. The loudness of all instances of drum n are
115 changed to m.
116
117 -focusontrack n1,n2,...
118 The velocities of notes in all tracks except n are attenuated.
119
120 -focusonchannel n1,n2,...
121 The velocities of notes in all channels except n are attenuated.
122
123 -attenuation n
124 Specifies the amount the note velocities are reduced by either
125 -focusontracks or -focusonchannels. Current default is 70.
126
127 -nobends
128 Suppresses all channel pitchbend commands.
129
130 -indrums n1,n2,...
131 Only allow percussions with codes n1,n2,...
132
133 -xdrums n1,n2,...
134 Exclude the percussions with codes n1,n2,...
135
136 -onlydrums
137 Only copy the percussion channel.
138
139 -nodrums
140 Copy all channels except the percussion channel.
141
142
144 midicopy.exe -trks 1,5 -from 2669 -to 8634 uzicko.mid fragment.mid
145 Midicopy will copy tracks 1 and 5 starting from midi pulse position
146 2669 and ending at MIDI pulse position 8634.
147
148
150 abcmtex(1), abc2abc(1), abc2midi(1), midi2abc(1) ,yaps[4m(1)
151
153 This manual page was written by Seymour Shlien.
154
156 This man page describes midicopy version 1.33 from December 22 2019.
157
158
159
160 MIDICOPY(1)