You are not logged in.

#1 2005-06-18 03:07:31

punkrockguy318
Member
From: New Jersey
Registered: 2004-02-15
Posts: 707
Website

Easy Phone Ringtone Creation

Hey, I wrote a script that I thought other Arch linux users might enjoy.  I'd also like some feedback and some improvements!  It's qutie immature right now.
This script will walk the user through renaming and cutting a mp3/wav file.  Next, it will convert the ringtone to a format that phones like.
NOTE:  I'm not sure what phones like what format.  My phone (lg vx 7000) seems to like 32kbps mono with the "fast" setting saved a .mid file.  This should work for other phones as well, but I'm not sure.
Please, tell me what you think!

#!/bin/bash
# maketonez.sh 0.03
# Lukas Sabota <punkrockguy318@comcast.net>

#TODO spaces support
#TODO email automatically
#TODO check if bitpim is install and run it
#TODO check if cutapp and lame work
#TODO customize encoding command
#TODO what phoesn like what lame settings
cutapp=audacity

filename=$1

if [[ $filename == * * ]]; then
    echo "This script does not support filenames with spaces.  Please rename the file without spaces."
    exit 1
fi

# check to see if it's an mp3.
# if it's a wav convert it to a mp3
# if it's an mp3, leave it be
# if it's something else, screw it
if [[ $filename == *.mp3 ]]; then
    ls > /dev/null    
elif [[ $filename == *.wav ]]; then
    #TODO does this even work?
    newname="${filename%.*}.mp3"i
    echo $newname
    lame -m m -b 32 -f $filename $newname
    filename=$newname
    echo $newname
else
    echo "not an mp3. dammit."
    exit 1
fi

echo "Please input what you would like the ringtone to be named as.  Keep the name short and simple.  Do not include an extension, or any spaces."
read newname
if [[ $newname == *.* ]]; then
    #TODO give user a chance to do it over
    echo "Please do not include a file extension."
    exit 1
fi
newname=$newname.mp3
cp $filename ./$newname
filename=$newname

echo "Your mp3 cutting application (default: audacity) will now be launched."
echo "Cut down the mp3 to less than 30 seconds, and export it to $filename in $PWD"
echo "Press any key to launch cutting application."
read Key
$cutapp $filename

#time to convert
lame -m m -b 32 -f $filename "${filename%.*}.mid"
echo "Your ringtone has successfully been converted to a format that will be compatible with your phone."
echo "There are two ways to transfer your rigntone to your phone."
echo "1) Attatch it to a blank email to "yournumer@vzwpix.com"."
echo "2) Use a data cable and upload the ringtone to your phone using BitPim."
echo "     (http://bitpim.sf.net)"

# End of file

You can find the newest version at http://punkrockguy318.no-ip.org/maketonez

Also:  I need a new name.  I hadn't really put to much thought into this, this was meant for my personal use.  But, I want to share this with other people.


If I have the gift of prophecy and can fathom all mysteries and all knowledge, and if I have a faith that can move mountains, but have not love, I am nothing.   1 Corinthians 13:2

Offline

#2 2005-06-18 03:52:02

iBertus
Member
From: Greenville, NC
Registered: 2004-11-04
Posts: 2,228

Re: Easy Phone Ringtone Creation

Nice script! I'll probably get lots of use from this.

Just a note:

LG phones like 32kbps mono renamed to .mid but some Motos can play mp3s without renaming. Not sure about Nokia or Samsungs. The problem is that carriers like verizon won't allow .mp3s to be attached to messages and these have to be added with a data cable.

Offline

#3 2005-06-18 08:12:02

Cam
Member
From: Brisbane, Aus
Registered: 2004-12-21
Posts: 658
Website

Re: Easy Phone Ringtone Creation

Another note, newer Sony Ericsson phones don't seem to be picky about filename or bitrate, mine has never had an issue with a file I've thrown at it before...

Offline

#4 2005-06-18 18:47:41

punkrockguy318
Member
From: New Jersey
Registered: 2004-02-15
Posts: 707
Website

Re: Easy Phone Ringtone Creation

I'm glad someone else has found a use for this!  There's a couple questions I have, though.

1)  What other software is available for transfering files between phones?  I'd like to find something for nextel motorolla phones or something.  The only software I've found which is webjal for windows.  Webjal is terrible, and a PITA to install.
2)  Is there any good GTK2 programs that will cut mp3s?  Audacity is nice, but I'd like to find something a little more lightweight.
3) Let's see: what formats should I support?  Wav, ogg, flac, and mp3.  Anything else that comes to mind?

I will put some more work into this script the next late night that i have where I am bored.
Probably tonight.
Thanks for your comments!


If I have the gift of prophecy and can fathom all mysteries and all knowledge, and if I have a faith that can move mountains, but have not love, I am nothing.   1 Corinthians 13:2

Offline

#5 2005-06-18 18:56:28

iBertus
Member
From: Greenville, NC
Registered: 2004-11-04
Posts: 2,228

Re: Easy Phone Ringtone Creation

bitpim can transfer files to phones using a qualcomm chipset, which is most LG and Moto phones, but it is designed for LG. It requires you to overwrite an existing file when used with a non-LG phone, IIRC.

Offline

#6 2005-06-19 08:11:18

Cam
Member
From: Brisbane, Aus
Registered: 2004-12-21
Posts: 658
Website

Re: Easy Phone Ringtone Creation

I use obexftp to transfer file to my phone using Bluetooth.

Offline

#7 2005-06-21 22:28:58

Krzysiek_W
Member
From: Poland, Bialystok - tam gdzie
Registered: 2004-12-08
Posts: 45
Website

Re: Easy Phone Ringtone Creation

punkrockguy318 wrote:

2)  Is there any good GTK2 programs that will cut mp3s?  Audacity is nice, but I'd like to find something a little more lightweight.

try this:
http://aur.archlinux.org/packages.php?d … SB=n&PP=25


Greetings
Krzysiek Wojszko

Offline

Board footer

Powered by FluxBB