Version 2, June 1991
Copyright © 1989, 1991 Free Software Foundation, Inc. 675 Mass Ave, Cambridge, MA 02139, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow.
Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does.
You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.
These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program.
In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.
The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.
If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code.
If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice.
This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.
Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation.
If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found.
one line to give the program's name and an idea of what it does. Copyright (C) 19yy name of author This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) 19yy name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details.The hypothetical commands
show w
and show c
should show
the appropriate parts of the General Public License. Of course, the
commands you use may be called something other than show w
and
show c
; they could even be mouse-clicks or menu items--whatever
suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. signature of Ty Coon, 1 April 1989 Ty Coon, President of ViceThis General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License.
quelcom tools
is a set of command line tools to manipulate .wav
and .mp3
files.
with these tools you can do a set of operations (get info, join, cut, delete fragments, detect silence, check, fade, ...) on maybe the most popular sound file formats (wave and mpeg layer 3) without the need of a grafical interface (xwindow) nor these or those grafical libraries.
since they are build as command line apps, they can be easily included in scripts to do automatically some job.
the quelcom tools
package is written by david manyé and you may find the package sources in http://www.etse.urv.es/~dmanye/quelcom/quelcom.html.
the quelcom tools
package is being developed on an old intel p133 with suse linux 6.3. other configurations may work also.
a c++ compiler is needed. currently are used gcc-2.95.2 and egcs-2.91.66. you can get the compiler name and version issuing the command gcc --version
.
and of course, you also need que quelcom tools
package. you may find it at http://www.etse.urv.es/~dmanye/quelcom/quelcom.html. using the latest available version is recommended.
tar xzf quelcom-0.4.0.tar.gz
. this creates a directory named quelcom-0.4.0
and expands there all the files.
cd quelcom-0.4.0
make
to build the sources. some compiler messages may appear, but it should compile successfully.
make install
.
by default, the executables are installed under /usr/local/bin
, the libraries under /usr/local/lib
, the translation .mo
files under /usr/local/share/locale
and the info manual file under /usr/local/info
.
to activate the automatic translation to catalan or to spanish (the only languages supported at this moment), it should be enough (if there haven't been no problem until now), setting the environment variable LANG
this way (with bash
shell): export LANG=ca
or export LANG=es
respectively. otherwise, the messages will appear in english.
if you have problems configuring or building the package, or if you find a bug in any of the tools, please update to the latest release. if the problem remains, please send electronic mail to dmanye@etse.urv.es
including the version number and a detailed description of the problem.
tests has been done only with 44100 Hz 16 bit stereo files, though it may work with mono/stereo 8/16 bits files.
the tools to handle wav files are the following:
qwavcut
extracts and/or deletes parts of a wav file
qwavcut option... file
qwavcut
allows to extract and/or delete a fragment of a wav file. some parameters must be supplied in order to define the start/size/end cut points and what to do then: either the fragment must be copied to another file or erased from the file (or both)
-d
--delete
--delete
is used, deletion is always done after fragment extraction.
-h
--help
-o outfile
--output=outfile
-V
--version
cut options are used to specify where the fragment begins and ends. there are two ways to do it: with time slices (easier) and with cut points (more complex but also more powerful). cut options are mandatory (which way is used is matter of your choice).
if time slices are used, cut points options are automatically ignored.
there is only one option:
-S timeslice
--slice timeslice
there are several options with cut points. cut points are used to specify at which sample the fragment begins (--begin
and --Begin
), ends (--end
and --End
), or which size it has (--size
). at least, one cut option must be specified (non specified options take its default values). neither the options --begin
and --Begin
, and the options --end
and --End
can be used together; also, a begin, end and size option cannot be used at the same time.
by default, the fragment begins at the first sample and ends at the last sample; there's no default value for size.
-b cutpoint
--set-begin-from-eof=cutpoint
-B cutpoint
--set-begin=cutpoint
-e cutpoint
--set-end-from-eof=cutpoint
-E cutpoint
--set-end=cutpoint
-s cutpoint
--size=cutpoint
qwavcut -b 10s -o outfile.wav infile.wav
qwavcut -S -1:0 -o outfile.wav infile.wav qwavcut -S -60 -o outfile.wav infile.wav qwavcut -E 1m -o outfile.wav infile.wav qwavcut -s 1m -o outfile.wav infile.wav
qwavcut -S 15:0-30:0 -o outfile.wav infile.wav qwavcut -B 15m -E 30m -o outfile.wav infile.wav qwavcut -s 15m -E 30m -o outfile.wav infile.wav qwavcut -B 15m -s 15m -o outfile.wav infile.wav
qwavfade
fade in/out wav files
qwavfade option... file...
qwavfade
modifies a wav file applying on it a fade in or a fade out or both.
a fade consists in modifying progressively the level of the wav as if you were slowly increasing or decreasing the volume. a fade in consists in increasing the volume starting from a low level at the beginning of the wav. a fade out consists in decreasing the volume to a low level at the end of the wav.
-d cutpoint
--duration=cutpoint
--length
option explained below.
-h
--help
-i
--in
-l time
--length=time
--duration
option above. it's easier to use though not as powerful than the previous one. the default value is five seconds. this option overrides --duration
option explained above.
-o
--out
-t
--test
fadein.file
or fadeout.file
. the duration of the test files is the fade duration plus five seconds.
-v
--verbose
-V
--version
suppose you want to fade in and out the fantastic song live.in.concert.wav
using a fade duration of 3.5 seconds:
first we are going to test:
qwavfade --test --length 3.5 live.in.concert.wav
hear the test fades:
my-wav-player fadein.live.in.concert.wav fadeout.live.in.concert.wav
if you want to try with another duration, jump to the first step and change the length
(or --duration
) argument.
if you're happy with the tests (omit --test
):
qwavfade --length 3.5 live.in.concert.wav
qwavfade
doesn't allow both types of fades (in and out) to overlap. if you want to fade in and out a wav file, and the two regions to fade overlap, then probably you made a mistake (maybe you selected a too large fade). in any case, you'll have to fade separately.
qwavheaderdump
dumps (and fixes) wav headers
qwavheaderdump option... file...
qwavheaderdump
reads a list of wav files and prints on standard output all its header values in text (no binary) form. also, it has ability to fix some of the headers in case they'd be incorrect.
-F
--fix
-h
--help
-q
--quiet
-V
--version
qwavinfo
show info from wav files.
qwavinfo option... file...
qwavinfo
reads a list of wav files and prints on standard output some of its parameters: sample rate, bits per sample, mono/stereo and duration. a duration summary is appended at the end of the list.
-h
--help
-s
--summary-only
-v
--verbose
-V
--version
qwavjoin
joins wav files
qwavjoin option... file1 file2...
qwavjoin
reads a list of wav files and joins them in the specified order in one wav file. the files must have the same parameters (i.e. sampling rate, bytes per sample, ...) in order that the joining can be done.
-h
--help
-o outfile
--output=outfile
-v
--verbose
-V
--version
qwavsilence
detects and shrinks silence sequences in wav files
qwavsilence option... file...
qwavsilence
reads a list of wav files looking for silence sequences longer than a given value, possibly shrinking them.
-d cutpoint
--duration=cutpoint
--length
explained below.
-h
--help
-l time
--length=time
--duration
option above. it's easier to use though not as powerful than the previous one. the default value is one second. this option overrides the --duration
option explained above.
-S
--shrink
--duration
option will be shrinked down to duration and the file size truncated accordingly.
-t threshold
--threshold=threshold
-v
--verbose
-V
--version
tests have been done only with mpeg version 1 layer iii streams, though it may (or not) work with other versions or layers.
the tools to handle mp3 files are the following:
qmp3check
checks and cleans mp3 streams
qmp3check option... file...
qmp3check
reads mp3 streams looking for invalid frames or, simply, garbage. it can be used as a mp3 file checker but also as a mp3 file cleaner because it is able to strip garbage bits from the streams.
-D
--delete
-h
--help
-q
--quiet
-T
--delete-tag
--delete
must be set.
-v
--verbose
-V
--version
qmp3cut
extracts and/or deletes parts of a mp3 file
qmp3cut option... file
qmp3cut
allows to extract and/or delete a fragment of a mp3 file. some parameters must be supplied in order to define the start/size/end cut points and what to do then: either the fragment must be copied to another file or erased from the file (or both)
-d
--delete
--output
is used, deletion is always done after fragment extraction.
-h
--help
-o outfile
--output=outfile
-v
--verbose
-V
--version
cut options are used to specify where the fragment begins and ends. there are two ways to do it: with time slices (easier) and with cut points (more complex but also more powerful). cut options are mandatory (which way is used is matter of your choice).
if time slices are used, cut points options are automatically ignored.
there is only one option:
-S timeslice
--slice timeslice
there are several options with cut points. cut points are used to specify at which frame the fragment begins (--begin
and --Begin
), ends (--end
and --End
), or which size it has (--size
). at least, one cut option must be specified (non specified options take its default values). neither the options --begin
and --Begin
, and the options --end
and --End
can be used together; also, a begin, end and size option cannot be used at the same time.
by default, the fragment begins at the first frame and ends at the last frame; there's no default value for size.
-b cutpoint
--set-begin-from-eof=cutpoint
-B cutpoint
--set-begin=cutpoint
-e cutpoint
--set-end-from-eof=cutpoint
-E cutpoint
--set-end=cutpoint
-s cutpoint
--size=cutpoint
qmp3cut -b 10s -o outfile.mp3 infile.mp3
qmp3cut -S -1:0 -o outfile.mp3 infile.mp3 qmp3cut -S -60 -o outfile.mp3 infile.mp3 qmp3cut -E 1m -o outfile.mp3 infile.mp3 qmp3cut -s 1m -o outfile.mp3 infile.mp3
qmp3cut -S 15:0-30:0 -o outfile.mp3 infile.mp3 qmp3cut -B 15m -E 30m -o outfile.mp3 infile.mp3 qmp3cut -s 15m -E 30m -o outfile.mp3 infile.mp3 qmp3cut -B 15m -s 15m -o outfile.mp3 infile.mp3
qmp3info
show info from mp3 files.
qmp3info option... file...
qmp3info
reads a list of mp3 files and prints on standard output some of its parameters: version, layer, sample rate, bit rate, duration and tag. a duration summary is appended at the end of the list.
-c
--check
-h
--help
-s
--summary-only
-v
--verbose
-V
--version
variable bit rate (vbr) streams are detected by reading the initial 5 frames in the stream. if their bit rate field differs, the --check
option is activated automatically.
if vbr is not detected, qmp3info
reads only the first frame in the stream and calculates the duration supposing that (1) the entire stream is composed by valid frames and (2) all the frames have the same bit rate. this is a fast way to compute the duration of the stream, but it is not exact: there's an error of 0.3% aprox. if you want to be accurate, or qmp3info
is unable to detect a vbr stream, use --check
.
qmp3join
joins mp3 files
qmp3join option... file1 file2...
qmp3join
reads a list of mp3 files and joins them in one mp3 file in the specified order. some conditions must be met for the parameters of each of the files (see the notes subsection below).
-f
--force
-h
--help
-o outfile
--output=outfile
-v
--verbose
-V
--version
both mp3 must have the same bit rate or (both) must have a variable bit rate. this restriction can be by-passed with the --force
flag.
before joining, all the streams are tested for validity. this is a time consuming operation. if the streams are not found clean, the join operation is aborted, so if you want to join dirty streams or simply qmp3join detects a clean stream as dirty, please report this as a bug and/or use cat
.
due to the mp3 file format characteristics, qmp3join
can be viewed like a better but restrictive cat
for mp3 files.
qmp3report
reports mp3 files and directories
qmp3report option... file...
qmp3report
reads mp3 files or directories containing mp3 files and gives information about them. qmp3report
can output the reports with plain text or in html format. using the latter format, you can navigate your mp3 directories with a web browser.
-a
--all-files
.mp3
.
-A
--show-all
--dirs
, --files
and --summary
. show report for files and directories and a summary report.
-d
--dirs
--all-files
is not set, only will be reported those directories containing mp3 files.
-f
--files
--all-files
).
-h
--help
-H
--html
-r
--recursive
-s
--summary
-S
--split
qmp3report
leaves in each visited directory a file with the report for that directory, independently of the output format. the name of the report file is the name of the directory with extension .txt
or .html
depending on the selected output format.
-v
--verbose
-V
--version
variable bit rate (vbr) streams are detected by reading the initial 5 frames in the stream. if their bit rate field differs, the entire stream is read to compute the duration time with accuracy (see qmp3info).
if vbr is not detected, qmp3report
reads only the first frame in the stream and calculates the duration supposing that (1) the entire stream is composed by valid frames and (2) all the frames have the same bit rate. this is a fast way to compute the duration of the stream, but it is not exact: there's an error of 0.3% aprox.
the htmlize function, which converts file names in a suitable form for html format (ie. replacing blanks with '%20'), is not bulletproof.
cut points are used to specify point in a sound file. they can also be used to speciy a size or a time duration using the beginning of the file as start reference. a cut point has the following form:
value[format]
in all cases, a positive integer value is required. the wav tools treat this number as a number of samples, whereas the mp3 tools treat this number as a number of frames. since most of the times is hard to specify a point (or size, or duration) in a file in terms of samples or frames, some modifiers are accepted. these modifiers consist in a single letter that must be written behind the number without leaving any blank.
these are the valid modifiers and how they modify the interpretation of value:
j
s
m
b
k
M
in either case, the given values will be rounded to an integer number of samples/frames.
time specifiers are a easier (more human) way than cut options to specify points in a file.
a time specifier has the following form:
[[h:]m:]s[.ms]
where:
h
m
s
ms
as you can see, time specifiers are easier to use but less powerful than cut options (which can also specify a point in a file in terms of bytes or frames/samples).
time slices are composed by two time specifiers designing a range (slice) of time:
begin-end
where begin and end are time specifiers. they can be not specified, meaning, respectively, the beginning and the end of the file.