Eringson v0.4.2

Copyright (C) 1999 by Martin von Weissenberg,

March 15, 1999


Eringson is a small, free program for transferring ring melodies to and from an Ericsson mobile phone. The program is not completed yet and various features will be added in possible future releases. However, Eringson can already be used to fetch, edit, install and play melodies. Eringson is distributed under the GNU Public License. The included source code demonstrates how to use gadgets and serial communications.

1. Description

Eringson was written because I wanted to learn to program the Pilot. At about the same time as I figured out how to install the development tools, I got the idea of creating a program that could transfer melodies from my newly upgraded Palm to my SH888 by infrared. I wanted a program that could hold a database of melodies, I wanted to edit melodies faster and quicker on my Palm. This is it. Or rather; this will be it. Eringson is very much a work in progress. Loads of intended features are still missing, but the program is already usable.

1.1 Requirements

To use the program you need a Palm device running PalmOS 2.0 or greater (i.e. anything newer than the original Pilot 1000 or 5000), an Ericsson mobile phone that supports user-programmable melodies, and some kind of data connection between these two.

If you have a PalmPilot, you probably need the Option modem adapter and a 7xx-series phone. If you have an IR-equipped Palm device, you're better off with an IR-equipped 6xx-, 7xx- or 8xx-series Ericsson phone --- for now the SH888 is the only Ericsson phone with built-in IR, the others require the Ericsson DI-27 infrared modem. Be sure to install the 3Com enhanced infrared uptade, available from http://www.palm.com/custsupp/downloads/irenhanc.html.

Specifically, I've tested the program using an SH888 and an upgraded PalmPilot Personal, transferring the melodies by IR.

1.2 License information

Eringson v0.4.2 is copyright Martin von Weissenberg 1999 and released with source under the GNU Public License. The full text of the license can be found in the included file license.txt. You can also find the license at http://www.gnu.org/copyleft/gpl.html. Eringson comes with ABSOLUTELY NO WARRANTY. Use at your own risk.

The main reason for making Eringson available under the GNU Public License is that there was very little sample source code available for serial communications. I also hope to see more programs for the SH888 in the future.

1.3 Where to get it

Eringson is available from most Palm-related archives. Try www.pilotgear.com, www.download.com and www.eurocool.com.

The latest version of Eringson can always be downloaded from http://www.iki.fi/~mvw/eringson.zip and http://www.iki.fi/~mvw/eringson.prc.

1.4 Feedback

Please send all kinds of comments to me, Martin von Weissenberg, . I'm especially interested in hearing from people who have tried the Option adapter, the DI-27, the new PalmIIIx and PalmV models, and actually just about any Palm/phone combination except the PalmIII and the SH888. I'd be happy to receive new ideas, patches and source code.

If you find cosmetical glitches, let me know. If you manage to crash the program, please mail me and tell me exactly what you did to induce the crash. I can't fix bugs if I don't know about them.

1.5 Changes by version number

v0.4.2

A standard edit menu (undo, cut, copy, paste) is now available in text mode.

v0.4.1

Some bug fixes; the length of the first visible note in the staff can now be changed.

v0.4

New features include an easy-to-use graphical melody editor. The former "Install" and "Play" buttons have now been rolled into one "Install & Play" button, which --- you never guessed it --- installs and plays the melody.

v0.2

First release. Can fetch, edit, install and play back melodies.

2. Usage

When you start Eringson you will see a window with a large text field and some buttons below. The text field contains a copy of whatever is currently on the clipboard, regardless of if this is a syntactically correct melody or not. Note that when you exit Eringson, the current song will always be copied back to the clipboard as text. This auto-copy feature allows you to quickly move songs to and from the memo pad.

The "Install & Play" button is used to install and play back the current song on the mobile phone. If you're in text mode and the song is incorrectly notated you will get an error (the phone is very picky). If the install succeeded the phone will play back the melody.

Conversely, the "Fetch" button is used to transfer the current song from the phone to the Palm. The connection is a bit slow at the moment; it might well take up to 10 seconds for the phone to react. There is no progress meter either, but after a little while you will get a dialog box saying whether the command succeeded or failed.

You get the best IR connection if the IR windows of your Palm device and your phone are aligned with each other, about 10cm (4in) apart. Lighting conditions and reflective surfaces may affect the data transfer. Make sure you have installed the enhanced IR driver from 3Com and selected "Infrared" in the Serial/IR preferences panel on your Pilot, and that IR is activated on the phone.

2.1 Editing melodies as text

By default, Eringson lets you edit melodies as text. The notation is almost, but not entirely, identical to the notation described in the mobile phone manuals. The Ericsson phones use Swedish music notation internally, and I have chosen to use the same format in Eringson; B should be written as 'H', and B flat as 'bH'.

Otherwise, the notation is the same as in the Ericsson manuals. '#' is used to denote sharp notes and 'b' to denote flat notes. Capitals (uppercase letters) are used to denote long notes and versals (lowercase letters) to denote short notes. 'p' is always small and denotes a short pause. See chapter for some examples.

2.2 Editing melodies graphically

There is also a graphical editor that can be invoked by hitting the "Mode" button. The graphical editor closely follows the limits of the phone and is guaranteed to generate melodies free of syntax errors. Switching into graphical mode removes all syntax-violating characters from the melody. This feature can be used to filter out spaces and other erroneous characters. For example, the string "Hello there" would be filtered to "Hehee".

Tip of the day: if you want a new melody for your phone but ain't in the mood for composing, just fill the clipboard with random text, start Eringson, switch into graphics mode and hit "Install". All irrelevant characters will be weeded out and you'll get a brand new pseudorandom melody with a high jingle factor. Be sure to include some '#':s and '+':s for variety.

Switching back into text mode converts the melody to text again. The insertion point is placed in the vicinity of the first note that was visible in the graphical editor.

In graphics mode, you edit the song by tapping or dragging notes and pauses:

Scrolling happens by tapping the scroll buttons (I kid you not), which may or may not be visible, depending on whether there's more notes to be seen in that direction.

3. Technical stuff

3.1 Compiling the source

Not much here yet, sorry.

Eringson should compile on any Unix system equipped with the GNU gcc v2.7.2.2 m68k crosscompiler. I use RedHat Linux 5.2 with all the PalmOS-related tools installed from tarballs under /usr/palm.

Other tools needed are: make, pilrc 2.0a and build-prc. The documentation was written with LyX and converted using sgml-tools (sgml to html), lynx (html to text) and makedoc (text to pdb).

Note that the communication source code is not very IR-specific. Rather, it can be used in any kind of serial communication. Nor is it very efficient. The serial port is opened only when needed, which takes a few seconds.

3.2 Future development

The development of Eringson will probably slow down. Eringson works very well for me and I probably won't add many features.

For example, the database that I intended to do will probably not be worth the trouble. Building a memo-like system from scratch is not inviting. The simplest way would be to take the sample sources for 3Com's memo pad and just append the graphical editor and the comms code to that. However, the resulting program could probably not be GPL:ed.

3.3 To do

In order of priority:

  1. Clean up the code. Replace all constants with well-#defined values.
  2. Implement a song sanity check.
  3. Implement a song playback function on the Pilot.
  4. Speed up the comms code.
  5. Implement conversion from/to English format and some of the most common Internet formats. (?)
  6. Implement code for transferring songs from/to MemoDB. (?)
  7. Implement a song database. (?)

3.4 Known bugs

4. Sample melodies

Chromatic scale

c#cd#def#fg#ga#ah+chbhabagbgfebedbdc

Thelonius Monk: Bemsha Swing theme

ap+dppppppA+d+cbhapgp#fp#cpd

Pieter Siegmund: "Marschen till Urdsgjallar"

+cH+c bH+cA+c G+ca+ca FpCp pppCc Dd#F#f Aa+C+c bHpde#fG

Wastelands II/Salt Winds

h+#f+eh +h+e+#fh g+#f+dg +a+d+g+a d+g+ed +d+e+a+d #f+a+d#f +a+d+e+a a+e+ca +e+c+g+e

Albéniz: Leyenda

Eh+cahg eh+cahg eh+cahg a#fga#fge

Intro to Beethoven's 6th

+c+d+E+E+F+A +G+f+e+DG +C+D+E+f+e +D+D+D+D +E+E+F+F +d+D+e+F+D +E+E+F+F +d+D+e+F+D

Grieg: Springtime

Hgh +E+d+#c +Dah +C+c+d HH Hga H+D +D+#C +Ca+c +F+e+#d +Eh+c +D+d+e +C+C +Cha HG

Nokia tilt

+h+a+#C+D ppppp +h+a+#C+#D+g ppppppp +h+a+#C+#D +#g+#fAH +#f+e#GH+F+F

More melodies are to be found on the internet. Just search for keywords like ericsson melodies 688 788 on AltaVista. Remember to find-and-replace all 'b':s with 'h' and then replace '(b)' and '*' with 'b', before you copy your new melodies to the memo pad. Here are some URLs for your enjoyment: