Custom ringtones for your contacts

Yesterday I finished implementing the first release of a new program (ringtoned, i.e. ringtone daemon, i.e. I don’t have any imagination for program names) that allows setting a custom ringtone for specific contacts. Ringtoned tries to integrate nicely with the system:

  • You can select the default ringtone in Settings → Profiles as usual
  • To set a custom ringtone you go to the Contacts application, select the contact and press the new “Set custom ringtone” button in the menu
  • The dialog to set custom ringtones tries to be a perfect copy of the dialog to set the global ringtone
  • It works both for normal phone calls and GTalk/SIP/Skype calls, thanks to Telepathy
  • The ringtone is played only when the normal one would be played and at the same volume, thanks to some PulseAudio magic

Ringtoned also tries not to break your phone, if for any reasons it crashes the default behaviour should be restored. Nevertheless, this is just version 0.1, so it could be full of bugs and could make you miss phone calls. You have been warned! Moreover, replacing the default ringtone components with something more complex could make the ringtone start slightly later in case of heavy load, see my previous blog post. You have been warned again!

If you still want to give it a try, ringtoned is now in Maemo extras-devel under the name “Custom ringtones for your contacts”. If you don’t want to add the extras-devel repository (as it contains a lot of unstable software), you can download ringtoned directly from my personal repository:

Install per-contact-ringtones
Install from my personal repository
(follow the link on the N900 browser)

If you are interested in the source code, it’s in Collabora’s git repositories.

The are two major features that are missing at the moment: the ability to set a custom ringtone for anonymous phone calls and for calls from an unknown number, and the ability to set ringtones for groups and not only for single contacts. The former feature should be easy and it mainly just requires some UI, so it will be hopefully implemented shortly.
Groups are more difficult to implement because they are not supported at all by the Maemo address book; I would first have to implement support for groups and then add ringtones for the groups. I hope to be able to find time for this, but I cannot guarantee anything.

In a future post I will explain the architecture of ringtoned and how to extend it: the code that chooses the custom ringtone is actually just a small plugin of the ringtone daemon and it’s possible to write other similar plugins for different needs.

79 thoughts on “Custom ringtones for your contacts

  1. Hi!

    Great Idea! Unfortunately your application makes the telephony almost unusable.

    A good point it that is working!

    Why unusable? I called myself from another phone. It took me many seconds to my N900 to show me that someone is calling, even the connection was established from about 9-10 seconds. The problem was persistent event the contact who is calling me doesn’t have an assigned ring-tone but the default one!

    The concept is OK! The ring-tone is changed for the desired contact but the phone application is much much much slowed! Do you think that this could be corrected? Otherwise your application is useless!

    Another thing! After I assigned my first personalized ring-tone the contact application was hanged with an error (Strange! Cause I never seen contact application giving any error!)

    Another important thing! Testing I discovered that calling my N900 sometimes I got Busy-Tone! Impossible!

    You can make from this concept a reliable application??

    Thanks for all your efforts until now!

    Like

  2. I understand that it is very hard to programm such things.. And I’m happy that you do it 😉

    There are many reasons, to have custom ringing per contact. I personally have even a more complicated use for it. Not only a special rington, for me there should be some emergency configuration.
    so even if I have all sounds muted, The call of ONE special number should be ringing as loud as possible.

    I think that is even harder to program. (But if you could to that.. WOW 😉 )

    Like

  3. @Capitanu:
    As I said it’s version 0.1, so I’m sure there are bugs. In all of my tests my program works fine, I’m going to mail you instructions on how to help me debug this.

    Which error did the contacts application give you? (Just internal error?)

    For the busy tone it’s almost impossible that it’s my app that causes it.

    @Chris:
    It’s possible, and it’s possible to do many things. I want to keep the UI and code relatively small, I don’t have time to write and maintain something too complex.
    Note that the system is based on plugins just because if people have more specific needs it’s *really* easy to implement it as a plugin.

    Like

  4. @ZachGoldberg:
    I think not incredibly easy, but not impossible.
    I thought about that and decided not to implement is mainly because it’s less needed for SMSes. For a phone call you need to act fast or you will miss the call: if you are on the other side of the room and you already know who is calling you can just decide to ignore the call and not run 🙂 For SMSes this is less needed.

    Like

  5. Thanks for the new plugin.

    It seems to take about 2-3 seconds with the phone completely idle for the phone to ring. It seems there is some software latency somewhere that keeps it from being quicker, which may not even be caused by your app but the phone-app itself.

    Unless you or I can come up with some hard numbers (CPU charts, IO usage charts) showing the hardware being the limiting factor, I still do not believe the N900 is incapable of reliable, per-contact ringtones.

    Like

  6. “It seems to take about 2-3 seconds with the phone…”

    I wish to retract this statement since it is pure speculation. It doesn’t seem to take any more time to ring over the default and I wouldn’t be able to tell correctly without a proper stopwatch (hey, my one-app wonder).

    Like

  7. @Michael Cronenworth, Radu Capitanu:
    If you want to verify if my program makes ringtones start too late you can do it easily.

    Open the terminal and type this:
    cd .local/share/sounds
    cp NokiaTune.aac.wav.ringtoned NokiaTune.aac.wav

    Now call you phone.
    Ringtoned will play the custom ringtone (if you set one for the contact) or the default global ringtone.
    The default ringtone program will try to play the default global ringtone, fail and fallback to play the standard Nokia Tune.
    It means that you should hear 2 ringtones playing at the same time. Do you hear any difference in the starting time?
    In normal condition (or also relatively heavy load) they should start at about the same time. In heavy load with a lot of swapping (really a lot, so much that switching from an app to another is incredibly slow) the default stuff will perform better.

    Like

  8. First of: Very good work Marco; I think people very much spprechiate your work on this! I for sure do!

    Unfortunately, I see quite a delay here as well. Try it out: close all apps, check top that the system is idle, lock the screen. Call your N900. It will lit the display once it registers the incoming call. With ringtoned installed it takes between 5 and 8 seconds until I hear the tune and call-ui shows up 😦 Without ringtoned, this does not take much more than a second or two.

    re comment #10:
    With that test, you assume that ringtoned itself does not add any overhead though. And if it queries e-d-s, loads and decodes an mp3, and so on then it will for sure add to the system load, which also impacts the playing of the stock tune. So ihmo that’s not a good test.

    Lastly, in your last post you said that the stock-ringtone is decoded and stored as .wav to improve performance. Why not do this for custom ringtones as well? /home has 2GB, so space shouldn’t be the problem…

    Like

  9. Awesome! It’s the one feature I’ve been missing in maemo. I’ve installed it and am seeing a < 2 second delay, so I’m happy with it 🙂

    Thanks!

    Like

  10. @Jörgen:
    On my system it’s *much* faster, the delay is < 1 sec. Even with heavy load the delay was still small.
    Of course this needs more investigation and testing, but after all it's version 0.1.
    For the uncompressed ringtone I wrongly thought that ~/.local/share/sounds was a symlink to somewhere in /var/, i.e. small but fast chip. Maybe it was at some point or it was just discussed, or maybe I just dreamt of it. Now that I know more I'm indeed planning to keep a cache of uncompressed files.

    Like

  11. @Marco: Hmm, the decoding does not seem to be my problem: If I set one of the .wav files in ~/.local/share/sounds/ as contact-ringtone it isn’t any faster either. Weird…

    Like

  12. It works perfect. Simple and easy to use. I don’t understand why is so difficult for others to use such friendly applications?
    Anyway, nice job, keep up the good work
    Thanx

    Like

  13. As I said before the concept and integration are really appreciated!
    Yes! THE APPLICATION IS WORKING but the call connection is slowed alot when the application is installed! Without the application the phone reacts as is should be: FASTER!
    I’m sure the author will find the bug at some point!
    For all the people who are not seeing no differences I think they are somehow ignorants!
    One more time: Congratulations to the one who proved that it can be done! The rest is a reliability issue! Let’s see if the reliability problem can be solved!

    Like

  14. Hey Marco, first let me congratulate you for this app. I was waiting for this one since I’ve bought my n900.

    Second, let me tell you some things I noticed can be improoved. The extra seconds everybody is talking about was noted by me as well. However, in my point of view, this is not the biggest problem on this version.

    The biggest problem I’ve noticed is the app disables the vibration for all contacts when the general profile is enabled. Even for those contacts that has personal ringtones associated, the vibration does not work together with the tone. I did lots of tests, disabling the vibration on general profile and enable it again, etc, and noting differente happened.

    Unless I am not doing things right, which is always a possibility :), the vibration is not working with tones anymore. Only when the silent profile is enable the vibration works. Is there something we can do? Or we need to wait for a new version?

    Thanks,
    Sergio

    Like

  15. Good news! I’ll wait for a more polished version before installing, but will be waiting eagerly. And, for the record, ringtoned is a top name; making the ringing process more toned is an outcome to be applauded…

    Like

  16. @Sergio Ramos:
    The extra second can be half a second for some people and several seconds for others, so how annoying it is varies a lot.
    I didn’t notice the vibration problem and I didn’t expect to break it. I will fix it in a future version.

    Like

  17. I’ll remove it and install it again to check for a different behavior. I was also wondering if there is any chance of recaller application being interfering on your app functionality?

    Like

  18. I just got a call from a number I blocked with PyCallBlocker. It took about 15 seconds for the phone to recognize the fact it was on the blocked list. I do like the idea for this program. I’m just going to have to wait for it to be a little faster. Good effort man, just needs more tweaking. I’m looking forward to it.

    Like

  19. I just wanna second post #22.
    and add from myslef, The app is highly appreciated, but the delay of showing the caller-ui made me remove it.
    i called myself from a different phone and and it took 3 ‘beebs’ until the N900 woke up and showed the caller ui.

    Hope you find the bug and can make it faster. Thanks again for this great approache in custom ringtones.
    I love it, anyway. good job so far.

    Like

  20. Hi again…Now that I have used it for some time, I could say that the thing that bothers me the most is the fact that it stopped vibrating, I tried creating new profiles to see if it could fix the problem, but it didn’t. So please, try fixing it quickly cause it is an excellent application!

    Like

  21. If you are working at the second version I beg you to find a way to tweak the application, maybe we will get lost of the delaying bug!

    Thanks! I,m looking forward to test another master piece of your work!

    Like

  22. I have installed the same & found 2 bugs.

    First is the VIBRATION in incoming call is irratic… sometimes vibrates…sometimes not.

    Second is that I have a leather cover on my cell. So as I receive some call, I take my cell’s cover unlocked. So for those few seconds, the screen gets blank as well as the sound of ringtone is off (I think the proximity sensor works here) but again the screen comes alive with distorted text which rearranges itself back to good screen. But during this period, the ringtone MAY OR MAYNOT resume back. So there is break in the sound many a times.

    Like

  23. I released 0.1.1 that fixes a couple of issues related to packaging and resume the normal ringtones if ringtoned fails.
    Now I will start investigating the performance problems.

    Like

  24. @25

    I’ve been testing this (love it) and can confirm the recording application “recaller” seems to break the custom ringtones. With recaller installed I experience a 3-5 second delay then no custom ringtone/vibration. With it removed only 1-2 second delay and vibration working.

    Like

  25. @Scott W:
    Thanks! I will focus on testing without recaller installed, then see if I can understand why recaller is a problem (probably it just tries to do stuff at the same time as ringtoned and use too many resources).

    Like

  26. Funny thing is that I have the aprox. 5 sec. delay withour recaller installed, but as I remember recaller use python. Maybe one of python components is in conflict with the application causing the delay.
    I can confirm I have fmms based on python… A little investigation from an expert will be required!

    Like

  27. I analysed ringtoned to see how the time is spent when a new call is received. The total time (for me, on my device, with very specific testing conditions) seems to be 1.2 seconds.

    The biggest offender is creating the needed GStreamer elements to play the file; it looks like fixing this could be relatively easy as those elements can be just created and kept in memory, there is no need to keep recreating them for every call.

    The second biggest offender seems to be inspecting the Telepathy channel, i.e. getting all the information about the incoming call from another process. Turns out all this information is not needed.

    For people that see a much bigger delay: this is probably caused by something else (maybe the contacts lookup?), I will investigate it next.

    Like

  28. Hi…has anyone found out why it is not vibrating anymore?
    The delay here is very short…but no vibration…:(

    Like

  29. great your on it. thx.
    …btw, I wonder if you could provide information on how we can help you to make this MustHave-App multilanguage.

    Like

  30. @Rodrigo:
    Wait a couple of days and I will try to figure out that too 🙂

    @NightShift79:
    I’m planning that (not sure how translation in the Maemo world works), but making it actually work in a barely acceptable way is more important at the moment 🙂

    Like

  31. Couple of small issues. Version tested was 0.1.1-0.

    1. I noticed the delay, too. About 2-3 seconds for me, with my landline phone ringing and my N900 causing interference with my PC speakers well before the Answer/Reject screen came up. Was using Recaller, but I uninstalled it and the problem persisted. Also, I have a bunch of widgets on my desktop, so they might be part of the performance delay. If so, I’m picking the widgets over the custom ringtones until performance improves, but it’s something for people to look into.

    2. I had my phone on “Silent” and the custom ringtone ignored that, but the headphones were in as well. Tried again without the headphones plugged in and Silent worked fine, and vibrated, too. Vibration seemed to work in the General profile.

    Looking forward to future versions, though. This is something Nokia should have included by default. I hope you can do it justice.

    Like

  32. Good day!
    Thank you for your much needed product.
    1. Support earlier claimed the delay of 5-8 seconds to initialize the incoming call.
    2. After installing the program stopped working vibration on incoming calls.

    Like

  33. Hello Marco,

    I would like to join many other N900 users to thank you for creating this application that NOKIA should have done it and deliver with their N900.

    However, I also join other subscribers of your app. that your app. is causing long delay in incoming calls. It takes a duration of “Ring-ring; ring-ring; ring-” to show the incoming call on my N900. Callers might think I am not available and hang up or the calls might forward to mailbox if I set the forwarding time too short.

    Another bug is, your app. disables the vibration function. It also cause me to miss a number of calls since I installed your app. In a busy and noisy city like Hong Kong, vibration for incoming calls is essential. Perhaps more important than a customized ringtone. If a user does not aware of any incoming call, who is the caller becomes irrelevant, agree?

    However, I really like your idea and appreciate your work. Therefore I decide to wait a little while to see if you can solve the above problems and issue an upgrade soon enough before I have to uninstall it.

    Thank You!

    TC

    Like

  34. Some updates:
    I fixed the issues that I can reproduce with the timing, but this means that ringtoned can now only play wave files.
    In the next days I will fix this by converting the ringtones to waves.
    I think I will make a release when this is completely fixed and I will fix in another release the problem with vibration.

    Like

  35. Thanks for the work and keeping us updated.

    I was about to uninstall your app. because I missed some customers’ calls in last few days.

    By learning that you are working on the issues, I decide to hang on a little longer.

    Thank you once again!

    TC

    Like

  36. @Daniel:
    Hm, I still didn’t release it 🙂

    Btw, how do you people measure it? Measuring from when you start a call on phone A to phone B to when phone B starts ringing is not the proper way as it takes several seconds even when B is a S40 phone.

    Like

  37. Daniel, did you mean you installed the upgrade?

    Marco, where can I get the upgrade for testing? I thought any update of application would alert on my N900.

    For your question to Daniel, in my case, I did not measure the delay by time but by the ringtone from caller’s side. For example, I tried to call my N900 with a line phone, I would hear from the handpiece of the line phone “Ring-ring; Ring-ring; Ring-“; and then my N900 responds by popping up the “Phone” app. and then starts to ring.

    TC

    Like

Comments are closed.