Graal Forums  

Go Back   Graal Forums > Development Forums > Future Improvements
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 10-09-2002, 12:38 AM
R0bin R0bin is offline
Banned
R0bin's Avatar
Join Date: Oct 2002
Location: Wales, UK
Posts: 828
R0bin is on a distinguished road
Send a message via AIM to R0bin
New sound function

Function to get the length of a sound / music file in the memory.

E.g. Like imgwidth.. soundlength(soundfile)

play stef23.mid;
this.length=soundlength(stef23.mid);

Also a function to find the current position of the file.

currentsoundpos(stef23.mid);

or you could use indexes instead of the filename, but it would mean changing the play function to be more like showimg

play 56,stef23.mid;
if (currentsoundpos(56)>soundlength(56)-2000) {
fadeout();
}
function fadeout() {
for (i=1;i<-0.05;i-=0.05) {
setmusicvolume i,i;
}
}

the currentsoundpos return value would be in milliseconds, so would the sound length. hence the "-2000" part in my script, because 2000 milliseconds is 2 seconds
Reply With Quote
  #2  
Old 10-09-2002, 12:50 AM
Com013 Com013 is offline
Registered User
Join Date: Aug 2002
Location: GMT+1
Posts: 381
Com013 is on a distinguished road
Nice, but what would you need it for?
__________________
Com013
Former Admin of the LAT on Graal The Adventure

e-mail: [email protected]
Reply With Quote
  #3  
Old 10-09-2002, 01:31 AM
R0bin R0bin is offline
Banned
R0bin's Avatar
Join Date: Oct 2002
Location: Wales, UK
Posts: 828
R0bin is on a distinguished road
Send a message via AIM to R0bin
Uhhhhh... maybe playlists on music things..?

Crossfaders
Reply With Quote
  #4  
Old 10-09-2002, 07:48 AM
Dach Dach is offline
call me Chad, it's cooler
Dach's Avatar
Join Date: Aug 2002
Posts: 1,899
Dach is on a distinguished road
That would be really cool. Alot better than putting the actual values for certain songs yourself, limiting the number of songs that would actually work.
__________________
Scripting Documents:Old Script Documentation-Movement Tutorial
Reply With Quote
  #5  
Old 10-09-2002, 02:06 PM
R0bin R0bin is offline
Banned
R0bin's Avatar
Join Date: Oct 2002
Location: Wales, UK
Posts: 828
R0bin is on a distinguished road
Send a message via AIM to R0bin
<3
Reply With Quote
  #6  
Old 10-10-2002, 09:25 AM
G_yoshi G_yoshi is offline
Forbidden
G_yoshi's Avatar
Join Date: Mar 2001
Posts: 7,206
G_yoshi will become famous soon enough
Send a message via AIM to G_yoshi
I suppose this idea would be nice if you wanted to create a music player with a GUI.
__________________
Reply With Quote
  #7  
Old 10-10-2002, 08:55 PM
R0bin R0bin is offline
Banned
R0bin's Avatar
Join Date: Oct 2002
Location: Wales, UK
Posts: 828
R0bin is on a distinguished road
Send a message via AIM to R0bin
Lol, is this the only future improvements thread that hasnt been flamed or what?
Reply With Quote
  #8  
Old 10-13-2002, 05:37 AM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
Ok will add that for music that is currently played
(musicpos, musiclen)
Reply With Quote
  #9  
Old 10-19-2002, 10:57 PM
R0bin R0bin is offline
Banned
R0bin's Avatar
Join Date: Oct 2002
Location: Wales, UK
Posts: 828
R0bin is on a distinguished road
Send a message via AIM to R0bin
<3
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 01:16 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.