You could break it up into two loops.
for rfile in *.txt; do
echo $rfile is a text file
# do stuff
for rfile in *.mp3; do
echo $rfile is an mp3 file
Another thing you could do is use the find command.
find . -type f -iname "*.txt" -exec <command> \;
find . -type f -iname "*.mp3" -exec <command> \;
Be sure to read through the bash info manual. In particular the section on "test" & "[[" and the section on variable expansion.
also enter "help test" in the shell.