2006-04-24

Why I don't like Dell computers (anymore)

since 2001-06 I'm a happy customer of Dell with an Inspiron 8000. Ordered, pre-payed and delivered within timespan of 10 days.
Three months (2002-03) prior to warranty-end, the backlight of the LCD failed. The repair (collect and return) was handled accurately in a timespan of 4 days, I believe.

I noted:
Dell repaired machine under warranty. New topcover was installed. Machine was returned within 2 working days.


Due to my good experience here, I ordered a new system (august 2002) with Dell: Dell Dimension 8200 with video-capture adapter (Dazzle). After several phonecalls and so on, where Dell explained that the delay was caused by back-order problems for the Dazzle device, It was finaly delivered oktober 2002 (2 months delayed).
During first activities in movie-editing (using Adobe Premiere), I discovered the Dazzle adaptor wouldn't work with Adobe Premiere, but would only work with the Dell-delivered MovieMaker. so first capture through MovieMaker, then use it in Premiere. That was acceptable.
But handling like copying (but also ONLY selecting them in explorer) of files >1G caused the system to require an unusual amount of time. copying a file of 1 GB would take more than 2 hours. (don't make me start about files of 16G).

While this was no problem on the Inspiron, the Dimension blocked on it.
According to Dell helpdesk, this was a software (i.e. Windows) problem. It was never resolved, but for daily purpose (so no movie-editing anymore), the machine worked.

In september 2005 I ordered a new Dell Desktop system. Once again the order wouldn't proceed, causing me to cancel the order october 17.

Now febuary 2006 the aforementioned Dimension machine started to have the display "flicker" (LCD turns off and comes back in a second or so) when a window was redrawn or anything else. This rendered the system inoperable.
After experimenting (discovering that replacing the video adapter didn't solve the problem), I discovered that disabling the Accelleration of the video-adaptor solved the problem (well yes, only prevented the symptoms).
Now april 2006, the system stopped responding altogether.
Replacing motherboard learned me the hard way that Dell powersupply - Dell Motherboard is a combination you don't want to separate (so replace both simultaneously with standard devices, OR buy motherboard with dell (or better for Dell: send in you system for repair (and probably pay the price for it)).
The Power Supply for Dell Dimension LOOKS like a regular ATX Power supply but is twisted to put 12V+ through the MB-Data (and vice versa) thus gladly frying the (newly acquired non-dell) motherboard.

Oh yeah, don't forget: The dell processor plug is non-standard too. It "hovers" over the connector firmly glued to its passive-cooling block, so to re-use the processor, you have to recuperate the holding braces and the passive cooling, or also buy a new processor :(.


So since october 2005 I'm no happy customer of Dell anymore. But note.... The Inspiron 8000 is still running fine (be it that they probably forgot to insert a problem).

2006-04-21

Cool game - puzzle - Professor Fizzwizzle

Grubby Games produced Professor Fizzwizzle.
A nice mixture of "The Incredible Machine" and something like "Sokoban".

The coolest thing I thought was that production was first done for Linux and then ported/adapted to windows and Mac.

My only remark was the missing installation routine for global linux installation (so different users can run the game without all having to install it).




#!/usr/bin/bash
# Filename: INSTALL.SH
# Author: Dieter Demerre
# copyright: GPL (http://www.gnu.org/licenses/)
# Project: Professor Fizwizzle
# Description:
# This bash-script will install Professor Fizzwizzle in global directory
# with user accessable script.

PACKAGE=/tmp/ProfessorFizzwizzleFULL.tar.gz;
TARGET=/usr/local/games;
if [ ! -f ${PACKAGE} ]; then
echo "Install Script cannot find tar-gz file (looking for ${PACKAGE}).">&2;
echo "if tar-file is named or located elsewhere, adjust INSTALL script," >&2;
echo " OR move/rename it to ${PACKAGE}.">&2;
exit 4;
fi
if [ ! -d ${TARGET} ]; then
echo "Install script would extract ${PACKAGE} into ${TARGET}.">&2;
echo "But ${TARGET} is found to be no directory.">&2;
echo "create directory ${TARGET} OR change value TARGET in this script.">&2;
exit 5;
fi

#these if-test instructions will check whether the system is run as user root
# OR should be using sudo system.
#
if [ $UID -ne 0 ]; then
SUDO=`which sudo`;
if [ -z "${SUDO}" ]; then
echo "The install script should be run as user root." >&2;
exit 1;
elif [ ! -x ${SUDO} ]; then
echo "The executable SUDO is not executable." >&2;
echo "reconfigure your system or run this install script as user root." >&2;
exit 2;
else
echo "Following instruction will ask for a password. Enter your USER-password.";
${SUDO} -i which sudo || SUDO="";
if [ -z "${SUDO}" ]; then
cat >&2 <<EOFMSG2
sudo seems to be not well-configured OR you entered your password incorrectly.
configure sudo (read man visudo and run visudo as root) OR run install script as user root.
EOFMSG2
exit 3;
fi
fi
else
SUDO="";
fi

# the next lines will extract the archive and change permissions so all users
# in the group "games" can run the program.
cd ${TARGET};
${SUDO} tar zxf ~user/Desktop/ProfessorFizzwizzleFULL.tar.gz;
${SUDO} chown -R root.games ProfessorFizzwizzleFULL_1.02;
${SUDO} chmod g+r resource.dat;
${SUDO} chmod g+w USERS.DAT;

# Now being root, we'll run the run.sh to configure the game (and produce the
# Professor executable (link it).
${SUDO} bash ./run.sh;

# in the next lines we'll produce a run-instruction professor to launch the game
# provided /usr/local/bin is present in PATH.
sc=/usr/local/bin/professor;
if [ -f ${sc} ]; then
echo "The script ${sc} is already existing.">&2;
echo "No ${sc} shortcut was created.">&2;
else
${SUDO} cat >$sc <<EOSCRIPT
#!/bin/bash
cd /usr/local/games/ProfessorFizzwizzleFULL_1.02;
./Professor $@;
EOSCRIPT
${SUDO} chown root.games ${sc};
${SUDO} chmod 555 ${sc};
echo "Users in group \"games\" now should be able to launch Professor " "Fizzwizzle by executing \"${sc}\" or even only \"`basename ${sc}`\"" " if `dirname ${sc}` makes part of PATH.";
fi

2006-04-13

Creating separate .wav files for different voices in a midi file.

This script will generate .wav files for separate tracks of a midi-file.

Timidity++ is used for this. Timidity should first be configured to be able to play midi files (to be certain your configuration has a working sound-configuration (like using eawpats).

The script uses cat, echo, mkdir, sed and timidity (all but timidity should not be a problem in any posix system).

The script is to be fed with an action-file with lines containing
midi-file-name followed by space-separated voice-directory-names.
e.g. execute
towav.sh --no_all --action config.towav

with config.towav holding:

mymidi/file1.mid solo piano1 piano2 nothing nothing drum
file2.mid sop1 sop2 alt1 alt2 ten bar bas
...


for more info, read the code OR execute
towav.sh --help

Here's the script (I call it towav.sh)

#!/bin/bash
# Filename: towav.sh
# Author: Dieter Demerre
# Revision: $Revision:$
# Project: midi to wav
# Copyright: GPL (http://www.gnu.org/licenses/licenses.html)
# History:
#
# Description:
# The file script will produce single-voice .wav files (from midi files)
#
# Requirements:
# scripts expects cat, echo, mkdir, sed and timidity to be reachable in the path.
#

PROGRAMNAME="MIDI to VOICE WAV"
PROGRAMVERSION="Rel. 1.0 2006-04-13"
# INITIALIZATION SECTION
# This section is NOT in function, to pre-generate global variables.
actionfile=""
traceoption=""
createdirs=0
overwrite=0
createall=1
targetdir="."
usefilevoice=0

CAT="cat"
ECHO="echo"
MKDIR="mkdir -p"
SED="sed"
TIMIDITY="timidity"

# CODE SECTION
# To view or adapt actuall execution, go to end of file to see
# main function call (and just above, the implementation)
function printUsage
{
${CAT} <<END_OF_USAGE

Usage:
------
towav <option>+

where <option> being amongst
------
--action <file>
REQUIRED OPTION
Will read filenames to convert (and corresponding voice-names) from <file>
<file> should have lines with space-separated tokens:
e.g.
<filename1> <voice1> <voice2>
<filename2> <voice1>

--complete
Will create "complete" voice-files. This is, when a track starts with "silence" this silence is also put
in the .wav file. Omit this option to have voice-track start at first note instead.
This option is very usefull if you try to mix the voices afterwards (like with soxmix).

--createdirs
Will try to create required directories.

--help
Will output this display.

--no_all
will prevent the production of a .wav file with ALL voices.

--overwrite
will cause existing (.wav) files to be overwritten.

--targetdir <dir>
<dir> is main output-directory in which directories wherein the output-files are to be created.

--use_filevoice
will create file/voice.wav files i.s.o voice/file.wav

END_OF_USAGE
}

function test_dir
{
# Usage:
# test_dir <dir>
# with <dir> directory to be created if allowed
if [ $# -ne 1 ]; then ${ECHO} "${FUNCNAME} with invalid nr of arguments $#" >&2; exit; fi
if [ ! -d "${1}" -a ! -z "${createdirs}" -a 0 -ne ${createdirs} ]; then
${MKDIR} "${1}"
fi
}

function compose_voicefilename
{
# Usage:
# compose_voicefilename <base> <voice>
if [ $# -ne 2 ]; then ${ECHO} "${FUNCNAME} with invalid nr of arguments $#" >&2; exit; fi
if [ ${usefilevoice} -ne 0 ]; then
dir=${targetdir}/${1};
voicefile=${dir}/${2}.wav;
else
dir=${targetdir}/${2};
voicefile=${dir}/${1}.wav;
fi
}

function allmidi2wav
{
# Usage:
# allmidi2wav <midi-file> <voice>+
# with <voice>+ in order they are in midi-file.
#
if [ $# -lt 2 ]; then ${ECHO} "${FUNCNAME} with invalid nr of arguments $#" >&2; exit; fi
midi_file=$1;
base=`basename ${midi_file}|${SED} 's/\.mid$//;s/\.midi$//;'`
if [ ! -f ${midi_file} ]; then
${ECHO} "Could not find input midi-file ${midi_file}" >&2
else
voicenr=1;
shift 1;
while [ $# -gt 0 ]; do
voice=${1};
compose_voicefilename ${base} ${voice}
options="${traceoption} --mute=0,-${voicenr} "
midi_to_wav ${midi_file} ${voicefile} "${options}"
shift 1;
voicenr=$[ $voicenr + 1 ]
done
if [ ${createall} -ne "0" ]; then
compose_voicefilename ${base} "all"
options=" "
midi_to_wav ${midi_file} ${voicefile} "${options}"
fi
fi
}

function midi_to_wav
{
# Usage:
# midi_to_wav <inputfile> <outputfile> <convertoptions>
local inputfile=$1;
if [ ! -s "${inputfile}" ]; then
${ECHO} "Could not find input-file ${inputfile}." >&2;
return
fi
local outputfile=$2;
dir=`dirname ${outputfile}`
test_dir ${dir}
if [ ! -d ${dir} ]; then
${ECHO} "could not find directory ${dir}." >&2;
elif [ ${overwrite} -eq 0 -a -s ${outputfile} ]; then
${ECHO} "Found already existing ${outputfile}."
else
local options=$3;
${TIMIDITY} ${options} --output-mode=w --output-file=${outputfile} ${inputfile}
fi
}

function EvaluateArguments
{
while [ ${#} -gt 0 ]; do
case "${1}" in
--action)
shift
if [ ${#} -gt 0 -a -f ${1} ]; then
actionfile=${1}
${ECHO} "Will perform actions from ${actionfile}"
else
${ECHO} "Could not find action file"
actionfile=""
fi
;;
--complete)
${ECHO} "Will produce silence-preceded voice-files"
traceoption="--trace"
;;
--createdirs)
${ECHO} "Will try to create required directories"
createdirs=1
;;
--help)
actionfile=""
return
;;
--no_all)
${ECHO} "Will not generate file for all voices"
createall=0
;;
--overwrite)
${ECHO} "Will overwrite existing files"
overwrite=1
;;
--targetdir)
shift
if [ ${#} -gt 0 ]; then
targetdir=${1}
${ECHO} "Will create voice-parts in directory ${targetdir}"
else
${ECHO} "Could not find target directory" >&2
targetdir=""
fi
;;
--use_filevoice)
${ECHO} "Will produce file/voice.wav files i.s.o voice/file.wav"
usefilevoice=1
;;
*)
${ECHO} "Unknown option $1" >&2
;;
esac
shift
done
}

function ExecuteActions
{
if [ -z "${actionfile}" -o ! -f "${actionfile}" ]; then
${ECHO} "no action ${actionfile} file specified or found" >&2
printUsage
else
${ECHO} "Now evaluating ${actionfile}"
3<${actionfile}
read -a line <&3
while [ ! -z "${line}" ]; do
if [ ! -f ${line[0]} ]; then
${ECHO} "input midi file ${line[0]} was not found" >&2
else
allmidi2wav ${line[*]}
fi
read -a line <&3
done
fi
}

function main
{
${ECHO} ${PROGRAMNAME}
${ECHO} ${PROGRAMVERSION}
${ECHO} "----------------------------"
EvaluateArguments $@
test_dir ${targetdir}
if [ ! -d ${targetdir} ]; then
${ECHO} "could not find target directory ${targetdir}" >&2
else
ExecuteActions
fi
}

main $@

Labels: , , ,

2006-04-05

Timidity++ compiling for cygwin

Timidity++
As stated in another thread, Timidity++ is a cool program to play (and convert) midi files. As I'm using it to convert midi files to .wav files (and then burn them to cd), I love to have a similar possibility under windows.

cygwin compilation
So I set out to compile Timidity++ in cygwin:
download the source from http://timidity.sourceforge.net/ and run cygwin for following:
  • tar jxf TiMidity++-2.13.0.tar.bz2
  • cd TiMidity++-2.13.0
  • bash ./configure --enable-interface=ncurses,gtk --enable-network --enable-audio=w32
  • export PATH=$PATH:. && make
  • make install
Configure TiMidity++
To run timidity correctly, you need a timidity.cfg file. Put it in %SystemRoot% (probably c:\windows). You can find one at http://home.swipnet.se/~w-10694/docs/timidity.cfg. This file makes references to directories:
dir /usr/local/lib/timidity

Now you only have to get .pat files and put them in that directory. You can get a copy of eawpats12_full.rar in http://people.fruitsalad.org/lauri/stuff/eawpats12_full.rar, unrar it to /usr/local/lib/timidity (as configured in timidity.cfg).

running timidity
It works:
timidity -int fn039russians.mid

Or if for instance you wanna convert a midi to a wav (which is what I wanted initially)
timidity --output-mode=w --output-file=result.wav fn039russians.mid

But for that look in the thread midi to wav conversion

Labels: , , ,