Wednesday, November 30, 2011

On Performance of Two-Sensor Sound Separation Methods Including Binaural Processors

Human beings have binaural inputs to separate and localize sound sources. Those two functions of binaural hearing can not be easily transformed to the computational methods. In this paper, three conventional methods to separate target signal from interfering noise are compared. Those methods include a binaural model, an independent component analysis (ICA) and a time-frequency masking applied to ICA. Performances were compared by means of spectrograms as well as coherence.

Above is abstract of my paper presented in ASJ Kyushu Chapter, November 25, 2011, in Oita - Japan. You can see the poster below (click to enlarge).

Full paper is available by request.

Solve Save Figure Problem On Octave (Ubuntu and Mac)

When I use the "print" command on GNU Octave to save figure/plot I got the following error. The errors were occurred in both Ubuntu 11.10 and Mac OS X.

Warning: query
error: value on right hand side of assignment is undefined
error: tmp' undefined near line 57 column 11
error: evaluating argument list element number 1
error: evaluating argument list element number 1
error: called from:
error:   /usr/share/octave/3.2.4/m/strings/cstrcat.m at line 57, column 2
error:   /usr/share/octave/3.2.4/m/plot/print.m at line 707, column 7
The, I ask my friend and he give me the solution. The solution is to comment two lines in cstrcat.m according to the error.
sudo nano /usr/share/octave/3.2.4/m/strings/cstrcat.m
Find the following line,

Wednesday, November 16, 2011

Solving Zekr Problem in Ubuntu 11.10 Oneiric Ocelot

An upgrading Ubuntu from 11.04 Natty to 11.10 Oneiric Ocelot remains a problem on Zekr launching. Zekr is Quranic study tool, it is available in www.zekr.org. When I update my Ubuntu 11.04 to 11.10, I got the following problem;

at org.eclipse.swt.SWT.error(SWT.java:4308)
at org.eclipse.swt.browser.Mozilla.create(Mozilla.java:683)
at org.eclipse.swt.browser.Browser.(Browser.java:96)
at net.sf.zekr.ui.QuranForm.makeFrame(QuranForm.java:475)
at net.sf.zekr.ui.QuranForm.init(QuranForm.java:300)
at net.sf.zekr.ui.QuranForm.(QuranForm.java:278)
at net.sf.zekr.ZekrMain.startZekr(ZekrMain.java:51)
at net.sf.zekr.ZekrMain.main(ZekrMain.java:91)

Then, I search how to solve this problem and find a solution of this problem. The problem can be solved by editing file ~/.zekr/config/config.properties.

Just type in the terminal
sudo nano ~/.zekr/config/config.properties
and find the following,
options.browser.useMozilla = true
Then, change to:
options.browser.useMozilla = false
Let's try, it works for me!

Monday, November 14, 2011

Find Local Peak of Signal in GNU Octave

The finding or searching the local peak is needed for some application such as fundamental frequency estimation, finding time delay or timelag or others. The following is a simple program to find the local peak of signal. The example of .wav sound signal

octave:1> [signal, fs] =wavread('signal.wav');    % read signal

octave:2> threshold=0.1;                          % limit the min. peak amplitude

octave for sig_ind = 1:4000
> if signal(sig_ind) > threshold
> x=sig_ind;
> break;
> endif
> endfor
octave:3> x
x = 3822


To give the display and find the rough peak of signal you can see from the figures of signal. The picture below comparing whole signal and the local signal from 1 to 4000 samples. To find the coordinate of local peak, just simply type

[a b]=max(signal(1:4000)

 Full length signal and signal from 1 to 4000 samples

Tuesday, November 08, 2011

Enable SSH File Sharing in Mac OS X

Sometimes, we need to communicate or transfer data among our laptops/PCs. Instead of using storage media such as removable disk, the use of network connection is better and faster. This article will briefly explain, how to share your file in Mac OS to other PCs like Ubuntu Linux and Windows. Let's start.
The Apple Mac OS X has SSH by default has installed. Nevertheless, the SSH daemon is not enabled by default. It means you can not login remotely or do remote copies from another PC until you enable the SSH.
So, to enable SSH, just go to System Preferences in your Mac. Under Internet & Networking there is a Sharing icon. Please, click that icon. In the list appears on screen you can check the Remote Login and File Sharing option.
 Sharing Menu on Mac OS X
This steps begins the SSH daemon immediately. Now, you can remotely login using your username and password. The Sharing screen at the bottom shows the name and IP address to use. You can also find this out using whoami and ifconfig from the Mac Unix Terminal.

Now, you can access your Mac from another PC. Just, install the required program in another PC such as openssh. In ubuntu, you can use the following commant (in terminal) to install openssh.

sudo apt-get install openssh
That enables ubuntu to access your Mac from terminal or nautilus file management.

Monday, November 07, 2011

Play Sound/Audio File such as .wav in GNU / Octave

In octave, there is not function like wavplay or sound such in Matlab. Octave has own function to play audiofile i.e playaudio, but it is never work for me. Instead of repair the playaudio function in Octave, below is simple script function to play sound file in Octave.

Please copy the code below and paste to your PC (work on Ubuntu Linux) as playsound.m

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% This function play the singal x as a sound.
% playsound(x, fs, bits)
%  x : a signal vector
%  fs: sampling frequency in Hz
%  bits: quantization bits
%
% If encounter a error, try to transpose a signal vector,
% like playsound(x',fs,bits)

function playsound(x,fs,bits)
if (nargin != 3)
usage("playsound(x,fs,bits)");
endif

file= strcat(tmpnam(),".wav");
wavwrite(file,x,fs,bits);
system(sprintf("/usr/bin/paplay %s ; rm -f %s",file,file));
endfunction
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Calculate Time Lag from Cross-correlation in Octave - Matlab

Calculation of time lag or time delay between two identical signal is very important in many areas, especially in system identification. By knowing time delay or time lag, we can analysis the signal such as subtract the output signal length according to the time lag. This problem usually appears in signal processing, control system, process, acoustic (determine time lag between sound sources and microphone) or other systems with input and output data.

In the other side, cross-corelation is useful tools. Using cross-correlation we can find the strongest point of correlation between two signal, and then shift the signal according to distance of strongest point to zero position. But the problem is the x-axis in cross-correlation not the time or sampled time (length), it is index. Let's solve by bringing the problem to computation methods such as GNU/Octave or Matlab.

Suppose, we have two signal in case of signal enhancement process. The first signal is true target signal, and the second is enhanced signal. We want to know, the time lag between true target signal and enhanced signal. The time lag can be resulted because of algorithm processing and others.

First, we read sound data in Octave or Matlab. We type,

[signal, fs]=wavread('signal.wav');

[enhance,fs]=wavread('enhance.wav');`

And then, calculate the cross-correlation between signal and enhanced signal using the following command,

Enable Japanese Language Keyboard Input in Ubuntu

The latest and newest Ubuntu such as Oneiric Ocelot version makes setting and tweaking the OS simple. One of the simple way offered by Ubuntu OS is its customization to your language both as display window and keyboard input. This article will review step-by-step to make Japanese characters: Kanji, Hiragana and Katakana are enabled in your Ubuntu. So, you can write in Kanji or Hiragana to your friends via email, chat and other.

First, open the dash home (in Unity) and type : Language. What you need is both Language Support Option and Keyboard Input. Please see figure below, to have more detail.

In the Language Support, press the Install / Remove Languages… button.

In the Installed Languages screen, scroll down to Japanese and check Input methods and Extra fonts, and press Apply Changes.

Wednesday, November 02, 2011

Life is competition, Let's do the best to be the winner..

That is my favorite words, my goal in my life, to do the best, even be the winner...

Because we live in a very competitive world. Everybody seems to be competing with someone at some level. Each week we spend hours playing or watching others compete in sporting activities all over the world. We cannot help being impressed by the level of excellence that these people achieve.

In all aspect, for example in sport and business, competition encourages excellence in performance. Where there is no competition, improvement in performance is less likely. We have lived through an era where governments have held monopolies in business. With no competition from free enterprise, services deteriorate. Monopolies create sloppy business practices, less innovation and higher prices. Business performs better with competition. Costs and prices decrease. Some level of competition is necessary in all aspects of life.

We are not in competition with any other person

The God creates us different each other. But, every one has the same chance to be success in his or her world. So we do not have to compare ourselves with others. We do not have to become discouraged because we think that someone else is better than we are in a particular area. The essence of our being is equal to that of any other person.There is only one person that can fulfill our role and that is us. This means that others cannot beat us to the finish line because there is no race. This is not to say that others do not have a similar role to us, but it is never the same. This is important to understand if we are going to enjoy life. Every human being is unique and cannot be duplicated. In this, I am not referring to the body, only to the spirit, soul, or the essence of a person.

Tuesday, November 01, 2011

Autologin Ubuntu 2d on Oneiric Ocelot

The new Ubuntu 11.10 Oneiric Ocelot used Unity or Ubuntu 3D as default windows manager. For low-powered computer or laptop, it will be run slowly. The alternative is change the default Ubuntu Unity 3d (in the login screen it is called "ubuntu" only) windows manager to ubuntu-2d. But, each login you must set this setting. Just try this method to make ubuntu-2d be default your windows manager,

in the file /etc/lightdm/lightdm.conf you have to change the user-session to ubuntu-2d. In ther terminal, just type,
sudo nano /etc/lightdm/lightdm.conf
and fill the blank user-session to ubuntu-2 like this,
user-session=ubuntu-2d

and leave other options as default. Just for your information, The ubuntu-2d is implemented using Qt/QML for the UI portions of Unity, while utilizing the existing Unity core components, like indicators, bamf, dee, uTouch and places.

This screenshot show you the lightdm.conf in which you must change the setting of user-session as I mentioned above.
 Screenshot of lightdm.conf

Pemisahan Banyak Sumber Suara Mesin Menggunakan Analisis Komponen Independen (ICA) Untuk Deteksi Kerusakan

Pemeliharaan kondisi mesin di industri membutuhkan kecepatan dan kemudahan, salah satu metodenya adalah dengan analisis getaran. Getaran mesin menyebabkan pola suara yang diemisikan mesin, di mana suara mesin satu bercampur dengan mesin lainnya. Blind Source Separation (BSS) merupakan teknik memisahkan sinyal campuran berdasarkan sifat kebebasan statistik antar sumber. Melalui simulasi dengan beberapa motor dan susunan mikrofon sebagai sensor didapatkan data suara campuran dari beberapa motor yang terekam melalui tiap mikrofon, di mana intensitas sinyal yang diterima mikrofon berbeda satu sama lain, tergantung pada jarak dan sudut datangnya. Tujuan penelitian ini adalah untuk memisahkan sinyal campuran dari tiap mikrofon sehingga didapatkan sinyal estimasi sumber untuk mendeteksi kerusakan motor. Berdasarkan hasil penelitian diperoleh pemisahan sinyal terbaik dalam Time-Domain ICA. Sinyal estimasi tersebut dianalisis untuk menentukan kondisi kerusakan mesin berdasarkan pola frekuensi sesaatnya.