Audio Click Xubuntu 14.04.1 LTS

I had finally had enough of a very annoying clicking noise through the headphones on my HP Pavilion dm1 Netbook. I love this machine because of its compact size and long lasting battery. The system originally had Windows 7 witch was a struggle with just an Atom processor. I fell in love with Xubuntu on this machine immediately with one slight annoyance. Every 10 seconds there was a click in the audio. This only happened when there was no audio playing. It also went away when the audio mixer was open but why waste the ram keeping it open?

Solution was simple enough. Power save kept switching the Intel sound card on and off every 10 seconds causing the click. Solution? Turn it on and leave it on! Here are the steps.

First, open a terminal window.

sudo nano /usr/lib/pm-utils/power.d/intel-audio-powersave

Comment out the following line with a #.

# INTEL_AUDIO_POWERSAVE=${INTEL_AUDIO_POWERSAVE:-true}

And then add the following line below the pervious line.

INTEL_AUDIO_POWERSAVE=false

Save the file and reboot the computer. That is it, no more click!

TeamSpeak start up Ubuntu 14.04.1 LTS

This problem stumpt me for a while. I run a TeamSpeak damon on my VPS linux box. The issue with this application, is they do not create startup script in the /etc/init.d folder.

There are many TeamSpeak startup scripts but the following seems to work best for me.

#!/bin/sh
 
case "$1" in
start)
/etc/teamspeak3/ts3server_startscript.sh start
;;
stop)
/etc/teamspeak3/ts3server_startscript.sh stop
;;
status)
/etc/teamspeak3/ts3server_startscript.sh status
;;
*)
  echo "Usage: `basename $0` {start|stop|status}" >&2
  exit 1
  ;;
esac
exit 0

Now that the bash script has been created in the /ete/init.d directory we can now use “service teamspeak3 start” to start the damon but every time the server restarts we have to run this manually. We need to add Teamspeak to the system start up. The following command will add this.

update-rc.d teamspeak3 defaults

That is it. Next time your server reboots Teamspeak will start.

The Audio Chain

As most of you know I am a huge audio file. The other day I was having a discussion with a friend of mine concerning audio chain and what he did in the studio vs what I do on live setups

As a bed room DJ I don’t see very many large venues. Most of the time I am playing house party’s. I do like to have a proper balanced setup for any gig I am performing wither it’s from my bed room to the internet or to 50 people in a house.

House parties can be tricky because audio maybe required in other rooms or outside on a patio. Some houses have built in home audio system. Most will have the power amps for each room in one location. I normally patch into this to provide listening experience in all room but also have it adjustable for each room. Not every room has to be the dance floors. Be sure to discuss this with the host of the party before tearing apart there house.

On the output side I like to have a few key peaces of gear either on the master effects chain or between the main mix and the power amplifier gear.

  1. Compressor / limiter / gate
  2. Equalizer

I normally run light compression just to normalize the audio some. I then set the gate to eliminate any added noise from the mixer (normally set low). The limiter I set appropriately to the venue and the sound system I will powering. If the venue is small but you have a powerful sound system, you might want to consider setting the limiter high to prevent deafening your crowd.

The limiter is when I save myself during DJ events. With the limiter in the chain I find I am more aware of the audio levels of the room. Have to remember, people do not want you driving the audio to the max all night. I find myself adjusting the master output just slightly. Play the good songs loud and the less popular quieter. You do want to avoid abrupt volume changes. Be sure to practice this before hand. I often use this when I want to emphasize the first drop in a song. Using this technique is where the limiter can save you from blowing speakers.

The last device in the chain is the equalizer. Some engineers would say well that’s stupid, shouldn’t it be before the compressor? Well yes and no. In my case I am running a set of vintage Rotel speakers when I’m DJing house parties. I know these speakers have bad low end without the help of an EQ. This comes back to the idea of knowing your equipment before taking it out. My equalizer is normally set to bring 30 – 60Hz up by about 1 or 2 db.

During bigger gigs, I will run the compressor through the master effects loop then the output into a crossover then out to the proper amps for that venue. The reason I run all effects through the master effects loop is so I can monitor levels using the mixers VU meters. I am able to listen to a song, set its gain based on the PPL VU and then know exactly where it will end up on the master output meter. This guarantees clean audio output to the power amplifier section.

I hope this has helped you understand what a DJ can do with out bored equipment. Remember none of that is set in stone, so experiment and let me know what you do in the comment section below.

Apache VirtualHosts

The following tutorial will explain how to configure one Apache server to resolve for multiple domain names. We assume you already have install Apache on you Linux based server. Check your distribution for where the configuration files are stored. For this example I am using Ubuntu 12.04.1 LTS.

Make sure you have the DNS A records pointing to the external IP of your server.
We will setup the following domains:

  • example1.com
  • example2.ca

First step is to create separate directory’s for each website. Apaches default web folder is /var/www so we will make the folders in there.

cd /var/www
mkdir example1.com
mkdir example2.ca

Now that the directory’s are made you can upload the sites into each of them.

Next step is to make some configuration files for each of the websites. For that we are going to switch to the /etc/apache2/sites-enabled and create a new file. You can use another text editor if you wish.

cd /etc/apache2/sites-enabled
nano example1.com

Inside this file, you will want to insert the following config.

<VirtualHost *:80>
        ServerAdmin webmaster@example1.com
        ServerName example1.com
        ServerAlias www.example1.com

        DocumentRoot /var/www/example1.com

        <Directory /var/www/example1.com>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride All
                allow from all
        </Directory>

        ErrorLog ${APACHE_LOG_DIR}/example1.com-error.log

        # Possible values include: debug, info, notice, warn, error, crit,
        # alert, emerg.
        LogLevel warn

        CustomLog ${APACHE_LOG_DIR}/example1.com-access_log.log common

</VirtualHost>

You could keep the logs in there default directory, but I like to know if one site has an issue that others are not. In this configuration we have not included CGI for security reasons.

The next configuration file is simple. Just need to replace example1.com with example2.ca.

<VirtualHost *:80>
        ServerAdmin webmaster@example2.ca
        ServerName example2.ca
        ServerAlias www.example2.ca

        DocumentRoot /var/www/example2.ca

        <Directory /var/www/example2.ca>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride All
                allow from all
        </Directory>

        ErrorLog ${APACHE_LOG_DIR}/example2.ca-error.log

        # Possible values include: debug, info, notice, warn, error, crit,
        # alert, emerg.
        LogLevel warn

        CustomLog ${APACHE_LOG_DIR}/example2.ca-access_log.log common

</VirtualHost>

After you have created all your configs, it’s time to restart Apache.

sudo service apache2 reload

That is it. You have now configured multiple domains on Apache.

IIS7: What a change

In the next few weeks, I am required to use one of my most scariest server products I have used. IIS. I use to manage a small network that used IIS for hosting internal mail interface and other web based products our company used. Back then, we were running IIS6 on Server 2003 R2, and what a scary machine that was. IIS6 wasn’t very intuitive compared to other Microsoft server products at that time. When you needed to add a site or add a CGI extension, it always felt you had to hack it to get something to work and you never went back to it after it was working.

I was required to install it for a programming class and what a change. For someone that never had proper training on IIS, the new interface has defiantly been improved and is now very intuitive.

To install IIS7 was open Control Panel -> Programs and Features -> “Turn Windows feature on or off”. I checked the “Internet Information Service” in the list and that was it. Windows installed the service without needing the disks.

It was that easy to get the new web server up and running on my local development machine.

IIS7 Main screen
Browsed to http://localhost to make sure my new IIS server was running.

I remember spending hours in the server room trying to get PHP installed on the old IIS6 machine we were running. I thought, I wonder how easy it will be on IIS7? Turns out very easy! Microsoft now has an installation you can download that installs PHP 5.3.13 into your IIS.

A few things need to be done first. Make sure you have installed CGI. Windows does not do this by default.

CGI Installation
Be sure “CGI” is checked.

IIS is now ready for the PHP installation. Go to php.iis.net to download the executable. Once you have it download, run it and follow the on screen instruction.

That is it! You have now installed PHP on your IIS server. Create a phpinfo() file on the root of your web-server to make sure everything is working.

My phpinfo().

If you run into the error “Handler “PHP53_via_FastCGI” has a bad module “FastCgiModule” in its module list” it means CGI is not installed. Go back into Windows Features and check “CGI”.