Friday, July 25, 2008

Wind generation from Audacity-Nyquist

Audacity is a free audio editor for Windows, Linux and Mac OS X. What I found the interesting thing is -- it support writing plugins with Nyquist. Well, Nyquist is a Lisp enhancement for audio/synth based on a common language -- XLISP. XLISP is a very old Lisp Language with support of object-oriented concept such as "class", I print the manual, and the date for the manual is 1988.

So I have the platform to do the following:
1. Experiment writing in Lisp.
2. To Learn the two most common parts in DSP (DFT and Digital filters)
3. Learn audio processing (gain, db etc)

Wow, in my life I am eager to learn all these three parts, but I have not get any benefits even I have put years of time. I just could not understand. I think it may take more years. I am just not smart enough. But any way it is my direction.

Below you will hear wind, I generate it based on David R. Sky's Wind plugin. I am using Audacity 1.3.5, and the wind is a mono audio. It fails when I set it to stereo, not sure what is wrong with it.

note 20080818: I have removed the wind flash link.

Monday, July 21, 2008

audacity - build & install on FC5

The default audacity package does not have mp3 built as default on FC5. So I spend some time to build my own audacity on FC5.

1. Install libmad. This is the mp3 decoder library. I directly found a previous build at here.

2. Install libsndfile. (It is already there).

3. Build wxGTK. Since the default wxGTK is 2.4.2 (audacity 1.2.5) and I am try to build audacity 1.3.5 which needs wxGTK 2.6.1 plus, I have to uninstall the default install package.

Also, make sure gtk is installed. (FC5 default contains these libs). Following is the script to build wxGTK (2.6.4).

./configure --with-gtk --enable-gtk2
make
make install


And "wx-config --list" is a useful command to list how wxGTK is configured.

4. Build audacity.

./configure
make
make install


5. Fix libwx_gtk shared libary with ldconfig. Since my build shared library is installed at /usr/local/lib. So I have to do some fix with "/etc/ld.so.conf". I creat and edit a file named "audacity-i386.conf" in /etc/ld.so.conf.d directory of FC5, just add a line "/usr/local/lib", and do "/sbin/ldconfig". To check result use "/sbin/ldconfig -v".

6. Launch audacity to open a mp3 file to see is it work.

MISC.

To query a package (for example wxgtk) on FC5. I want to know what the package name is, is it installed on the system, and the version number etc.
I use "yum info wxgtk" to get the package information, but some times I have no idea with the package name, so I use the following command to find out:

rpm -q -a | grep -i wxgtk

Monday, June 30, 2008

use shell variables in sed


input=abc.wav
i=0
while test $i != 10
do
echo "run case $i
tag=`expr output-foo-$i`
output=`echo $input | sed -e "s/^\(.*\)\.wav$/\1-$tag\.wav"`
./foo.bin -v -e -E $i -o $output $input
done


Here instead of

sed -e 's/^\(.*\)\.wav$/\1-$tag\.wav'


Use


sed -e "s/^\(.*\)\.wav$/\1-$tag\.wav"

Friday, June 20, 2008

Set up for recording audio with Windows

Here is some set up for recording audio.

0. Use blue line-in jack and green line-out jack

1. Set playback control, especially Volume Control, Wave and Line In, it is ok to mute CDPlayer, PC Beep or SW Synth.


2. Set recording control, select "WaveOut Mix", then we are ready to go.

Tuesday, June 17, 2008

nfs client

I got an error when mount NFS disks with my OMAP linux box.

rpcbind: server localhost not responding, timed out
RPC: failed to contact local rpcbind server (errno 5).


Here is the result. (The reason is I don't have portmap running in the box)

mount -t nfs -o nolock 192.168.0.9:/tmp /mnt/mmc


And then, I got another panic message, when I run a program.

nfs: server 192.168.0.9 not responding, still trying


Here is the result.

mount -t nfs 192.168.0.9:/tmp /mnt/mmc -o nolock,hard,rsize=1024,wsize=1024

Monday, June 16, 2008

setup dhcp, nfs on FC5

setup dhcp server
I need to setup dhcp server under my router.
Here is the configuration file (/etc/dhcpd.conf)


ddns-updates on;
subnet 192.168.2.0 netmask 255.255.255.0 {
option routers 192.168.2.1;
option subnet-mask 255.255.255.0;
option domain-name "local.net";
option domain-name-servers ns.local.net;
host trgt {
hardware ethernet 08:00:28:01:15:F7;
fixed-address 192.168.2.110;
option root-path "/opt/eldk/ppc_8xx";
option host-name "trgt";
next-server 192.168.2.151;
filename "tftpboot/pImage";
}
}
ddns-update-style ad-hoc;

Here "trgt" is a linux device which has fixed ip address, and need boot image through NFS from linux host with ip "192.168.2.151".

Start dhcp-server with: `/etc/rc.d/init.d/dhcpd start`

Setup nfs

Edit /etc/exports

/tftp 192.168.2.110(rw,no_root_squash,sync)


Edit /etc/hosts.allow

portmap: 10.10.10.20
lockd: 10.10.10.20
mountd: 10.10.10.20
rquotad: 10.10.10.20
statd: 10.10.10.20


And edit /etc/hosts.deny

portmap: ALL
lockd: ALL
mountd: ALL
statd: ALL



run: `exportfs -ra`




scripts on start nfs

/etc/init.d/portmap start
/etc/init.d/nfslock start
/etc/init.d/nfs start
/etc/init.d/netnfs start


Check nfs status with: `/sbin/service nfs status`

rpc.mountd (pid 4181) is running...
nfsd (pid 4183 4182 4181 4180) is running
rpc.rquotead (pid 4170) is running


You may need to "/sbin/service iptables stop" sometimes if you can the ip but can not mount while getting "no route and host" message.

Tuesday, June 10, 2008

use cu

1. install uucp "sudo apt-get install uucp"
2. edit /etc/uucp/sys

system S0@115200
port serial0_115200
time any

3. edit /etc/uucp/port to add serial0_115200

port serial0_115200
type direct
device /dev/ttyS0
speed 115200
hardflow false

4. Add serial port to VM, otherwise it will not show up.
5. run `cu S0@115200` and get a response "Connected."
To terminate, type `~.`