HI all .....
Sorry for the last minute rush ....!!
After facing several types of roadblocks and errors finally we succeeded .... Here we designed a complete offline karaoke maker with the superb combination of wolfson card and Raspberry pi that will convert the given mp3 to karaoke using audacity with music mixer. we used cross compiled audacity here https://drive.google.com/file/d/0BzIaxMH3N5O1Q0dsOC1qY2h1azg/edit?usp=sharing from Ragnar jensen. Finally we have made huge changes that converts the mp3 into karaoke with more special effects.The user can also add their own special effects for more fun and to entertain the audience.
Here we put lot of effort to automate the audacity and we scripted these 3 shell scripts that will automate the audacity progress which will import ----> Adding Effect---->Export karoake.
you can download it from here https://drive.google.com/file/d/0B9rdOLp3dLQIWDduSXQxeFByWXc/edit?usp=sharing.
Suku.sh --->> This script acts as a main script that will ask the user to select the song that is previously added into the target folder. The image given below shows that once the script gets executed it will ask for the option to be entered and it will select the song and finally pass it to the audacity automatically for further process (kindly refer the attachment screenshots for more information).
#Main_script HOME_DIR=/home/pi echo=$HOME_DIR ####################################################################### # # The required music files are present under the music directory. # Checking for availability of music files under the music directory. # To print the no of files for user readibility. # if [ -d ${HOME_DIR}/music/ ];then echo "no of files" $(find ${HOME_DIR}/music/ -type f | wc -l ) >t.txt i=1 for f in $( ls ${HOME_DIR}/music/ ) do echo "$i $f">>t.txt i=$(($i + 1)) done cat t.txt ######################################################################## # # User's choice of song is obtained. # read -p "Enter the song to be converted:" fil res=`sed -n "${fil}p" t.txt | awk '{print$2}';` echo "$res" fi ############################################################################# # # To call the make_karoke.sh script by passing the song as an input. # make_karoke.sh converts the input song to a karoke. # if [ -f ${HOME_DIR}/music/$res ];then /home/pi/make_karoake.sh $res else echo "invalid choice" fi
Make_karaoke.sh--->> This file makes the necessary changes to remove the vocals by applying the chains(predefined step by step procedure applied by the user)available in the audacity.
#!/bin/bash # NOTE: File names with spaces in them will probably break this script! # Make sure that we got a file name as argument on the command line. [ -z "$1" ] && echo Usage: $0 '<filename>' && exit 1 set -x # echo all commands EXPORTS_FOLDER=/home/pi/exports # Folder where we put the processed files. CHANGE THIS!! mkdir -p $EXPORTS_FOLDER # Make sure that the exports folder exists. # Find out the user id of the owner of the named pipes. USER_ID=$(ls /tmp/audacity_script_pipe.to.* | awk -F'.' '{print $NF}') FileName=$(basename $1) # Base filename without path. # If the file already exists in the exports folder, delete it. To avoid warning dialogs in Audacity when we export. rm -f ${EXPORTS_FOLDER}/${FileName} # Send command to Audacity's named-pipe plugin... echo 'Import: Filename='$1 > /tmp/audacity_script_pipe.to.${USER_ID} & # ... and read response from the command. cat /tmp/audacity_script_pipe.from.${USER_ID} sleep 2 # Send more commands and read their responses... # Select All echo 'Select: Mode=All' > /tmp/audacity_script_pipe.to.${USER_ID} & cat /tmp/audacity_script_pipe.from.${USER_ID} sleep 2 # Run the MakeKaraoke chain echo 'BatchCommand: ChainName=MakeKaraoke' > /tmp/audacity_script_pipe.to.${USER_ID} & cat /tmp/audacity_script_pipe.from.${USER_ID} sleep 2 # Export the file echo 'Export: Mode=All Filename='${EXPORTS_FOLDER}/${FileName}' Channels=2' > /tmp/audacity_script_pipe.to.${USER_ID} & cat /tmp/audacity_script_pipe.from.${USER_ID} sleep 2 # Close the sound tracks, leaving an empty Audacity ready for a new batch of commands. echo 'MenuCommand: CommandName=Undo' > /tmp/audacity_script_pipe.to.${USER_ID} & cat /tmp/audacity_script_pipe.from.${USER_ID} sleep 2 echo 'MenuCommand: CommandName=Undo' > /tmp/audacity_script_pipe.to.${USER_ID} & cat /tmp/audacity_script_pipe.from.${USER_ID} sleep 2 echo 'MenuCommand: CommandName=Undo' > /tmp/audacity_script_pipe.to.${USER_ID} & cat /tmp/audacity_script_pipe.from.${USER_ID} sleep 2 echo 'MenuCommand: CommandName=Undo' > /tmp/audacity_script_pipe.to.${USER_ID} & cat /tmp/audacity_script_pipe.from.${USER_ID} sleep 2 echo 'MenuCommand: CommandName=Undo' > /tmp/audacity_script_pipe.to.${USER_ID} & cat /tmp/audacity_script_pipe.from.${USER_ID} sleep 2 echo 'MenuCommand: CommandName=Undo' > /tmp/audacity_script_pipe.to.${USER_ID} & cat /tmp/audacity_script_pipe.from.${USER_ID} sleep 2
After spending plenty hours of time we have found 3 different methods to remove the vocal from the given mp3 file for better output, And it can be downloaded from here
https://drive.google.com/file/d/0B9rdOLp3dLQIa0ZhOVBsOFVSVWc/edit?usp=sharing
effect.sh--->> This script will give special touch to the karaoke based on the user's taste of music the instrumental effects can be added accordingly, from a specific folder containing various Instrumental effects such as solo drum, piano,etc,.
########################################################################################## # effects.sh script helps the user to key in any quality effects of their choice. # # HOME_DIR=/home/pi echo=$HOME_DIR if [ -d ${HOME_DIR}/effects/ ];then echo "no of files" $(find ${HOME_DIR}/effects/ -type f | wc -l ) >ef.txt i=1 for f in $( ls ${HOME_DIR}/effects/ ) do echo "$i $f">>ef.txt i=$(($i + 1)) done cat ef.txt read -p "Enter the effect to be added with ur track:" fil res=`sed -n "${fil}p" ef.txt | awk '{print$2}';` echo "$res" fi if [ -f ${HOME_DIR}/effects/$res ];then /home/pi/make_karoake.sh $res else echo "invalid choice" fi
HIGHLIGHTS OF THIS OFFLINE KARAOKE MAKER
1. An instant karaoke can be obtained for user's choice of Songs.
2. Anytime anywhere a good quality karaoke can be obtained .. without internet.
3. Our own dashing effects can be selected for sound mixing.
4. And finally a special instrumental touch can be given to the exported karaoke for more entertainment.
REFERENCE
kindly refer the step by step screenshot for more detailed usage of this project . https://drive.google.com/file/d/0B9rdOLp3dLQITHNURE5vc0Z4REk/edit?usp=sharing