Menu

Main Menu
Talk Get Daily Search

Member's Online

    User Name
    Password

    Fm transmitter + play music at specified time?

    Reply
    Page 1 of 2 | 1   2   | Next
    ToJa92 | # 1 | 2010-03-24, 18:58 | Report

    Is that combo possible?

    It's because I got a Philips Wake-up light, which has a FM receiver, and it plays the alarm sound(in this case a FM signal) a half hour before it gets to the max volume. Which means if I use the normal alarm it would shut off way before the time the alarm is at the max level.

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following User Says Thank You to ToJa92 For This Useful Post:
    teh

     
    festivalnut | # 2 | 2010-03-24, 19:04 | Report

    its a combo i've been tring to work out too, but alas i'm a noob, any experts got a trick to make this happen please?

    Edit | Forward | Quote | Quick Reply | Thanks

     
    MohammadAG | # 3 | 2010-03-24, 19:09 | Report

    You could make a script that turns on the FM transmitter and plays a sound, and open terminal and type sleep <time> && sh <script filename>
    pseudo code:
    #!/bin/sh
    dbus command to activate FMTX
    play-sound <soundfile>

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following User Says Thank You to MohammadAG For This Useful Post:
    teh

     
    qwerty12 | # 4 | 2010-03-24, 19:12 | Report

    Originally Posted by MohammadAG View Post
    dbus command to activate FMTX
    fmtx_client -p1

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following 5 Users Say Thank You to qwerty12 For This Useful Post:
    cheve, festivalnut, MohammadAG, teh, ToJa92

     
    Patola | # 5 | 2010-03-24, 19:13 | Report

    Yes. Schedule with fcron, use play-sound to play the file and turn the transmitter on/off with the lines I added to the Phone control page.

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following User Says Thank You to Patola For This Useful Post:
    cheve

     
    festivalnut | # 6 | 2010-03-24, 19:22 | Report

    wow, quick response, thanks guys! but before i go getting annoyed at my command line ineptitude... <time> is this referring to wake up time, time from now til wake up, and what format would i use? i assume <script filename> is the name of whatever script i'm apparently compiling using the pseudo code? and i'm also guessing i dont need super user for this? sorry if i'm a bit slow still new to linux and n900

    Edit | Forward | Quote | Quick Reply | Thanks

     
    MohammadAG | # 7 | 2010-03-24, 19:23 | Report

    Code:
    #!/bin/sh
    fmtx_client -p1
    play-sound /usr/share/sounds/ui-wrong_charger.wav
    Save it as alarm.sh
    Change the sound to whatever file you want
    Chmod +x it:
    Code:
    chmod +x alarm.sh
    Then run it as root
    Code:
    sleep <time-in-seconds> && sh alarm.sh
    Edit: took a look at fxtx_client
    You can change the code to fmtx_client -p1 -f(frequency) to something you know won't be covered by another radio station, that way you don't have to set the FMTX every time you go to bed, and you don't have to set the clock each time.

    You can also install fm-boost and make it boost
    .
    Code:
    #!/bin/sh
    fmtx_client -p1
    fm-boost
    # sleep is to make sure boost works
    sleep 3
    play-sound /usr/share/sounds/ui-wrong_charger.wav
    Edit 2: you owe qwerty12 a thanks

    Edit | Forward | Quote | Quick Reply | Thanks

    Last edited by MohammadAG; 2010-03-24 at 19:29.
    The Following 5 Users Say Thank You to MohammadAG For This Useful Post:
    festivalnut, Helmuth, qwerty12, teh, ToJa92

     
    festivalnut | # 8 | 2010-03-24, 19:38 | Report

    thanks sent! now i'm gonna boldly dive into xterm like a 14 year old virgin and hope i dont end up embarrasing myself!

    Edit | Forward | Quote | Quick Reply | Thanks

     
    ToJa92 | # 9 | 2010-03-24, 19:39 | Report

    Now, can I play a whole album? I guess I just set several play-sound's? Or can I set a playlist? Also, is cron available in maemo?

    Edit | Forward | Quote | Quick Reply | Thanks

     
    festivalnut | # 10 | 2010-03-24, 20:25 | Report

    okay i seem to be halfway there, compiled script, chmod'd it (whatever the hell that is!) ran it, fm transmitter comes on but i get an error message along the lines of Home directory /home/user not ours. i noticed your code has the sound file under usr/share... do i have to copy my sounds to that location rather than MyDocs? and if so is that a good idea? or if not wtf have i done wrong?

    Edit | Forward | Quote | Quick Reply | Thanks

     
    Page 1 of 2 | 1   2   | Next
vBulletin® Version 3.8.8
Normal Logout