element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Rocking Raspberry Pi
  • Challenges & Projects
  • Design Challenges
  • Rocking Raspberry Pi
  • More
  • Cancel
Rocking Raspberry Pi
Blog Rocking Raspberry pi challenge -- Offline Karaoke maker with sound mixing
  • Blog
  • Forum
  • Documents
  • Files
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: indiant3chi3
  • Date Created: 2 May 2014 7:44 PM Date Created
  • Views 668 views
  • Likes 1 like
  • Comments 0 comments
  • rocking-the-rocking-raspberrypi-challenge
  • winners
Related
Recommended

Rocking Raspberry pi challenge -- Offline Karaoke maker with sound mixing

indiant3chi3
indiant3chi3
2 May 2014

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

image

 

 

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

image

 

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

 

Cheers image


 


  • Sign in to reply
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube