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