Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 10 of 10

Thread: audio timer ?

  1. #1
    Join Date
    May 2006
    Posts
    75

    Arrow audio timer ?



    how i create a timer for audio background?

    mm:ss
    00:00
    min:sec

  2. #2
    Join Date
    Oct 2005
    Location
    American Dubai
    Posts
    629
    Please Elaborate

  3. #3
    Join Date
    May 2006
    Posts
    75

    Arrow

    a timer for audio on each canal
    00:00 (min:sec)

  4. #4
    Join Date
    Jun 2002
    Location
    Israel
    Posts
    1,843
    On each channel, you can use the ratio between Audio.GetCurrentPos(Channel_Number) and Audio.GetLength(Channel_Number). This will give you the relative (ratio) position of that particular channel.
    Check the help file:
    CHANNEL_BACKGROUND
    5

    CHANNEL_EFFECTS
    0

    CHANNEL_NARRATION
    6

    CHANNEL_USER1
    1

    CHANNEL_USER2
    2

    CHANNEL_USER3
    3

    CHANNEL_USER4
    4


    Good luck

    Yossi

  5. #5
    Join Date
    May 2006
    Posts
    75
    i put it
    -- set time display
    curTime = Math.Round(Audio.GetCurrentPos(CHANNEL_USER1), 2);
    if String.Find(curTime, ".", 1, false)==-1 then
    curTime = String.Concat(curTime, ".");
    end
    decPos = String.Find(curTime, ".", 1, false);
    strLen = String.Length(curTime);
    zerosNeeded = 2 - (strLen - decPos);
    if zerosNeeded > 0 then
    for count = 1, zerosNeeded do
    curTime = curTime.."0";
    end
    end
    Paragraph.SetText("Paragraph1", curTime);
    but it go secend
    when time arive to 60 next time go to 61 !
    i want when time arive to secend 60 then 00:59 -------> 01:00
    oh my god i can not good speak english

  6. #6
    Join Date
    Mar 2005
    Posts
    222
    hello
    this is a basic idea, but you'll need to add a reader for the audio.

    create an Input box formated as follows:
    Code:
    ##:##:##
    on a button:
    Code:
    seg = 1;
    min = 00;
    hour = 0;
    Page.StartTimer(1000);
    on timer:
    Code:
    if seg < 60 then
    	Input.SetText("Input1", cero(hour).. cero(min) ..cero(seg))
    	else
    		if min < 59 then
    			seg = 0;
    			min = min +1;
    			Input.SetText("Input1", cero(hour).. cero(min) ..cero(seg))
    			else
    				if hour < 24 then
    					min = 0;
    					seg = 0;
    					hour = hour+1;
    					Input.SetText("Input1", cero(hour).. cero(min) ..cero(seg))
    				end
    		end
    end				
    seg = seg +1;
    in global functions:
    (this function put the "0" for example in 08, if you don't use this you'll get .. 0:0:8 .. 0:0:9 .. 0:0:10 instead od 00:00:08 and so)
    Code:
    function cero(numero)
    	if numero < 10 then
    		numero = "0"..numero;
    	end
    	return (numero);
    end
    oh and if you want I speak spanish an frech
    Last edited by Josué Alba; 06-04-2006 at 09:36 PM.

  7. #7
    Join Date
    Mar 2005
    Posts
    222

    Ignore the last post

    Hehe here you have an example.
    It has 4 sounds loaded and you can have 4 separated timers. Using one simple global function. Hope this helps you or solves your problem.

    The download is 2.4m because I put a 1 > minunte song, so you can test it goes like 00:01:23...

    http://dl2.uploadgalaxy.com/files/4e...f08b/gbdor.apz

  8. #8
    Join Date
    Mar 2005
    Posts
    222
    sorry dunno what happened to the download link. It should work, anyway I uploaded here again.

    http://rapidshare.de/files/22275014/gbdor.apz.html

  9. #9
    Join Date
    May 2006
    Posts
    75

    Smile

    tnx it very good
    now i want get audio length on background canal
    for sampel audio is 280 secend i want this show 04:20 (min:sec)
    tnx

  10. #10
    Join Date
    Mar 2005
    Posts
    222

    Sure pal

    This was easy. Use the same function and only pass the lenght of the sound loaded.

    http://dl3.uploadgalaxy.com/files/e2...or_v2.apz.html

Similar Threads

  1. Build failure because of errors
    By Ed Stanley in forum AutoPlay Media Studio 6.0
    Replies: 2
    Last Post: 02-07-2006, 03:51 PM
  2. Help: Trying to create a bookmark for audio
    By Ren in forum AutoPlay Media Studio 5.0
    Replies: 0
    Last Post: 09-09-2005, 01:43 PM
  3. audio question
    By mike41 in forum AutoPlay Media Studio 5.0
    Replies: 0
    Last Post: 09-03-2004, 02:32 PM
  4. Using Timer Events
    By Desmond in forum AutoPlay Media Studio 5.0 Examples
    Replies: 0
    Last Post: 09-22-2003, 02:14 PM
  5. Replies: 14
    Last Post: 06-24-2003, 04:21 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts