Thursday, March 30, 2006

SciTE for Nokia770

UPDATED AGAIN (3/31/2006) !!!













Simply install scite_1.68-N770v0.2_arm.deb.
This is an updated package. It uses the most recent sources 1.68. According to the release notes, it'll also fix the issue with crashes on browsing certain folders.

In case of trouble, run scite manually from xterm to see the error messages:
/var/lib/install/usr/share/scite/scite.sh

Modifications against original 1.63 / 1.68
  • Installs underneath /var/lib/install; had a taskbar icon, a menu entry, etc.
  • Toggle Fullscreen mode, starting fullscreen.

Todos:
  • For now I'm quite happy; maybe change the default settings file to use a larger font.

Wednesday, March 29, 2006

Timidity770 is progress

Just some remarks.
Meanwhile, I was successful in modifying the older, perfomant version of timidity such that one could use it with the GTK2 interface. Furthermore, I started hildonization of the GUI.
As the original layout is not very useful on the Nokia770 (the buttons were way too small), I've
changed the button layout and size as well.

Here is how it currently looks like:



As you can see, the 64x64 pixel buttons are
rather primitive, as I was busy with other things.
So, if you want to contribute, just let me know.

JPilot Package for N770

As posted earlier this month, I started a minimalistic port of the JPilot PIM application
to the N770.

The most important stuff first:
Features
  • Same look-and-feel as in the Linux desktop edition
  • About 1MB installed on device
  • Print to Postscript files possible (cat > calendar.ps)
  • Fullscreen- and Minimize enabled (basic hildonization) of main windows.
  • Import/Export functionality, as already included in original Jpilot
  • includes the pilot support libraries, maybe sync will even work if you configure (let me know)
Known Limitations
  • Several, probably :)
  • Some windows not Hildonized so far, i.e. Month-View won't fullscreen.
  • Just realized, the screen does not always refresh automatically when toggling fullscreen. Not a real problem though, just switch to another view (e.g. calendar to notes) and back.
I have to make a few more current screenshots.
Here is an older one from the previous post as a placeholder:



Hope you'll like it, let me know and post comments.
Cheers,
Michael

Sunday, March 12, 2006

MIDI on Nokia770 with Timidity


While recent Nokia phones handle Midi-Files quite well, so far the support on N770 was missing.
Here is how to get them played.

Requirements
  • get my binaries for Timidity timidity-2.10.4_N770bin.tar.gz [This is an older version of timidity, but runs much faster than 2.13.0, see here:
    timidity++2.13.0_N770bin.tar.gz ]

  • you need some Instruments to play your MIDIs, definitely NOT a huge footprint, so I recommend 2MBGMGS.SF2 (usually shipped with some soundcards) or take some small .pat files for single instruments (see timidity.cfg)
  • and of course: some midi-Files of your choice.
  • xterm ... as there is no GUI so far (besides "ncurses")

Installing
Unpack the binary (tar -zxvf timidity++2.13.0_N770bin.tar.gz) to for example /user/home. This will create a subfolder timidity.
Place 2MBGMGS.SF2 and you MIDI-Files in the same folder for the moment.
As timidity will look for its config in /etc/timitidy.cfg , place there
a link: ln -s /home/user/timidity/timidity.cfg /etc/timidity.cfg
For convenience, you may also want to place a link to timidity somewhere to your path.

Using
In the timidity-folder enter ./timidity -in *.mid
After a few seconds, it will start playing. Otherwise, check the path in timitity.cfg.

With the ncurses interface (-in) you can use the hardkey arrows for midi volume, etc.
Use 'q' to quit, 'n' for the next song. Sufficient interfacing and nostalgic as using timidity first time back in the 90th.

Why MIDI?
Well, there is already a text editor and python on the N770... So, if you want to create ringtones on the road, have a look at MMA (Musical MIDI Accompaniment). You can basically script some tunes, it has more than 50 presets for auto accompaniment.
Well, rather "Band in the Pocket" than "Band in a Box" ;-)
In brief: Download and extract (tar -zxvf mma-bin-0.20.tar.gz) , no need to install it, simply
cd mma-bin-0.20 and run /var/lib/install/usr/bin/python2.4/python mma -g
This takes a while as it updates the MMA library. Now you can "re-compile" any of the demo songs in order to verify it works: python mma ./egs/lyrics/twinkle.mma




UPDATE...
After just finishing with the first version of this post (2.13.0 of Timidity++), I decided to give an older version a try (2.10.4). This was a complete success. Some options had a different format, so the timidity.cfg also incorporates some slight changes. Additionally, I changed timidity.h in order to use some slow CPU defaults and removed some Tracker-Formats. The binary is now way smaller. The part below the line is for later reference - maybe the newer Timidity will improve.




Performance issue...
Latest versions of Timidity seem to be a bit slow due to higher standards in playback quality. However, I remembered that I was using it back in the old times on a 100MHz system.
It is crucial for playback on the N770 to disable many of the new features, see timidity.cfg for this:



opt EFresamp=d #disable resampling
opt EFvlpf=d #disable VLPF
opt EFreverb=d #disable reverb
opt EFchorus=d #disable chorus
opt EFdelay=d #disable delay
#opt no-anti-alias #disable sample anti-aliasing
opt EWPVSETOZ #disable all Midi Controls
opt p16a #default to 32 voices with auto reduction
opt s32kHz #default sample frequency to 32kHz
opt fast-decay #fast decay notes
opt output-mono # MM: Speaker of N770...



Please add Comments to this Post if you found out additional options.
Also see http://timidity.sourceforge.net/ for more infos on Timidity.
The ncurses-Interface can in principle be used (add -in to the command line options), but this slows down and your MIDI-files might sound choppy.
The slow startup is probably due to the unpacking of the Soundfonts (.sf2). If you know a 1MB GeneralMIDI set (either .pat-Files or a .sf2), please post here a link. Also, an older and simpler version of timidity might perform better.

Some comments on compiling
The 770 uses the ALSA sound system
Nokia770-51:/home/user/timidity# cat /proc/asound/version
Advanced Linux Sound Architecture Driver Version 1.0.9rc2 (Thu Mar 24 10:33:39 2005 UTC).

However, it returned me finally some errors on the device, probably some version conflict with libasound. The Enlightened sound daemon seems to be available as well, so use the esd-option:

./configure --enable-interface=ncurses --enable-audio=esd

Afterwards, compiling in the scratchbox (ARM/QEMU target) was straightforward.

Friday, March 10, 2006

J-Pilot on the Nokia770?

Remark: This is NOT a How-To description ... so far ;-)



Also check the recent post here





Recently, I found on ApplicationCatalogWishlist an entry about J-Pilot and as I liked Palm as a PIM, I thought this would indeed be nice on the Nokia 770.

Have a look at this:


This screenshot was the result of a few hours experimenting with the JPilot sources in the
sandbox/Maemo development environment on my debian machine.
I had to comment out some stuff from the configure file and change a few lines of the sourcecode elsewhere. As JPilot is GTK-based, it was not a big deal, as expected. I had to reduce the font
sizes, but it seems okay.
Probably, it would even sync, but I had no time for the /dev/pilot setup and stuff.

Unfortunately, the gtk_calendar component (the blue thing on the left side) is to huge.
Here is another shot:


And on the real Nokia 770...

Well, this one was really disappointing first.
Then, I figured out, that the root cause is the themeing of the N770, which uses large fonts.
A workaround would be to use the color schemes, for example ~/.jpilot/jpilotrc.default and
provide there some reasonable settings for _all_ GUI elements. Unfortunately, I don't have more time right now. Here is what I accomplished so far:


And this one:

It uses already a lot of lines like this one so far:
class "GtkButton" style "standard-default"
widget_class "*.GtkButton.GtkLabel" style "buttonFont"

But probably will need much more, especially to get the calendar view nicer.

On the other hand, the Winzig PIM looks very promising to me. Especially, one does not need a separate development environment. With X-Server, sshd, scp, xterm and joe, the N770 is a self contained Python development environment. Easy to tune the code.

Michael
PS: Anyway, if I have a little more time, I will describe the necessary modifications to the source code in more detail. For now, here are two archives to test the stuff:
Feel free to edit the file /home/user/.jpilot/jpilotrc.mini (similar to gtkrc).

PPS: Maybe someone else will like this "appetizer" who has the time to really port jPilot to Maemo. Hey, maybe the 770 could be synced against PalmDesktop one day ;-)

Thursday, March 09, 2006

Screenshots of Winzig on Nokia 770

Winzig is a suite of PIM style applications written in Python/GTK.


It fits perfectly to the screens of small devices as the Nokia 770.

Even though, "winzig" is German for "very small", you will need Python for Maemo in order to set it up. So, you will need several MB on the device. But Python is useful for many other things as well.- Together with a xterm and a text editor, you have everything to develop and modify an application with you.

Winzig runs almost out of the box on N770, however will need some more "hildonization" as soon as I have time for it. So, the screenshots already show some additional scrollbars I've added so far.

Installation (UPDATED on 2006/03/29)

  1. Get PythonForMaemo first. The all-in-one package can simply be installed from the application installer (PyMaemo 1.1 Runtime; pymaemo-runtime_1.1-1_arm.deb)
  2. Install winzig_1.71-N770v0.1_arm.deb
  3. Have a look at /home/user/.winzig after the first start to modify the data files.

As the calendar itself is quite large, you need to use a little trick when entering a new appointment: The little Cal button on the right toggles hide/unhide for the calendar view. See the author's page for further infos: http://www.muth.org/Robert/Winzig/

Recent improvements:

  • Hildonization of the GUI: I managed to get Fullscreen and Minimization working.
  • Packaging of winzig for the Nokia770. Was a little tricky... If you are interested in my minimalistic approach to packaging, untar winzig-1.71_N770_source.tar.gz. It basically makes a packages from the files under ./usr and ./etc ready to deploy to /var/lib/install/...
  • A little startup-wrapper to place the database-files in /home/user/.winzig at startup
Todo:
  • Build a little converter script in Python to import contacts/calendar from Outlook (via .csv) or Phones (via gnokii) to the Database-Format of Winzig.

More Screenshots

I love screenshots (these ones taken with the Nokia770's load utility). Often, you can tell immediately before installing if you like a tool or not. So, here are some more screens.


Editing a contact:

There is also a calculator...

...and an ASCII-Table...

Weather forecast and Google Dictionaries available when online...

Have fun,

Michael