AminetAminet
Search:
84475 packages online
About
Recent
Browse
Search
Upload
Setup
Services

misc/emu/trimgym-os4.lha

Mirror:Random
Showing:m68k-amigaosppc-amigaosppc-morphosi386-arosi386-amithlonppc-warpupppc-powerupgeneric
No screenshot available
Short:Trims SEGA Genesis gym music files
Author:Shay Green, AmigaOS 4.0 compile by Spot / Up Rough
Uploader:Varthall / Up Rough <varti02 hotpop com>
Type:misc/emu
Version:0.1
Architecture:ppc-amigaos >= 4.0.5
Date:2008-02-06
Download:http://aminet.net/misc/emu/trimgym-os4.lha - View contents
Readme:http://aminet.net/misc/emu/trimgym-os4.readme
Downloads:898

trim_gym 0.1
------------

Trim_gym trims SEGA Genesis gym music files. It can perform four
actions: remove frames from beginning, merge frames at beginning, set
loop point, trim frames from end. I wrote it to clean up some SEGA
Genesis gym music recordings.

Basic operation
---------------

    trim_gym [-r n] [-m n] [-l n] [-t n] filename [output filename]

If output filename isn't specified, modify the file in-place. Compressed
files aren't supported (decompress them before trimming them).

The options specify the actions to perform. All points in the file are
specified as an offset in 1/60 second frames, where offset 0 is the
beginning of the file and offset n is the end of a file that has n
frames total.

    -r offset       remove frame data up to offset
    -m offset       merge frame data up to offset
    -l offset       set loop start to offset
    -t offset       trim all frames after offset

Offsets refer to the unmodified file; they are properly adjusted
internally when an action shortens the file. For example -r 1 -l 10
removes the first frame and sets the loop point to 9 in the resulting
file (which is the same point that 10 referred to before the removal).

The merge action removes PCM setting commands, since a player may choke
on the accumulation of them, and merge will only be used on silence
anyway.


Trimming song files
-------------------

Use a GYM player and output to a PCM sound file. Open it in a sound
editor and set the time unit to 1/60 second frames (735 samples each at
44.1 kHz sampling rate). The player may add extra silence at the
beginning, so you may want to subtract a few frames from the offsets you
specify for remove and merge (it won't really matter for the loop and
trim points).

Use the remove option only when the song has some unwanted sound at the
beginning. Remove as little as possible from the song, since seemingly
silent sections might contain important sound chip commands for the
song.

Use the merge option to remove silence from the beginning. Leave at
least a frame of silence after the merge before the song starts, since
sometimes sound chip commands need a frame to settle. If the merge
offset is set right at the beginning of the frame where sound starts, it
may affect the sound.

Setting the loop is a little involved. Set the loop point past what you
really need, so that the sound chip will be in the correct state. If the
loop point is set as early as possible, the first time the song plays
the sound chip might be in a different state than after it loops. If the
point is set further, the original song data will have already started
looping before the player jumps back to the loop point, ensuring the
sound chip is in the same state.

To set the loop point, find where the song repeats then go further
several notes. Choose a point one frame before a note starts, preferably
one that has low volume before it. Set the trim point here, then find
the corresponding point early in the song and set the loop point there.
This ensures that the sound chip is in a similar state when the player
loops, and that any differences will be of low volume and masked by the
new note that starts.

After changing a file, verify that it came out right.


Misc
----

With the included test.gym file,

    trim_gym -r 1 -m 2 -l 2 -t 3 test.gym test.gym.out

should generate test.gym.out which matches test.gym.out.correct

trim_gym Copyright (c) 2004 Shay Green. trim_gym 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.
trim_gym 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 trim_gym; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

-- 
Shay Green <blargg()mail.com>

     .___________________________________________________________.
     |                                                           |
     |       A M I G A   O S   4 . 0   C O M P I L E   B Y       |
    ._______                                        .______.     |
    |  ____/________________________________________|      |__   .
  ._|____._         |      ._       |      ._       |       _/______.
  |      |/         |      |/       |      |/       |      |/       |
  |                 |      _________|               |               |
  |_________________|______|spt/up  |_______________|_______________| 
     .                                                           .
     |                                                           | 
     |   I am in a shitty economical situation, so if you feel   | 
     |  that what I do is  worth anything, use paypal to donate  |  
     |         to my email addy, spotATtriadDOTse, thanx!        | 
     |                                                           | 
     |                    Spot / Up Rough 2006                   | 
     |___________________________________________________________|


Contents of misc/emu/trimgym-os4.lha
 PERMSSN    UID  GID    PACKED    SIZE  RATIO METHOD CRC     STAMP          NAME
---------- ----------- ------- ------- ------ ---------- ------------ -------------
[generic]                 2271    6233  36.4% -lh5- a390 Jul 28  2004 TrimGYM-0.1/Source/trim_gym.c
[generic]                   52     448  11.6% -lh5- 84bc Jul 28  2004 TrimGYM-0.1/Test/test.gym
[generic]                   42     437   9.6% -lh5- 4e1e Jul 28  2004 TrimGYM-0.1/Test/test.gym.out.correct
[generic]                 4268    9840  43.4% -lh5- 9d45 Nov 24  2006 TrimGYM-0.1/TrimGYM
[generic]                 2106    5290  39.8% -lh5- 8ebf Nov 24  2006 TrimGYM-0.1/TrimGYM.readme
---------- ----------- ------- ------- ------ ---------- ------------ -------------
 Total         5 files    8739   22248  39.3%            Feb  6 09:53

Aminet © 1992-2024 Urban Müller and the Aminet team. Aminet contact address: <aminetaminet net>