| | sound | |
| | Author | Message |
---|
alain fondateur
Number of posts : 23529 Localisation : Dompierre sur Veyle ,France Registration date : 2005-04-19
| Subject: sound Wed 22 Jul - 19:45 | |
| is it true that a mp3 begins to play at any moment , when entering a world ? ( I mean , not only at the begginning of the song ) I use that now , is there a better way ? - Code:
-
Shape { appearance Appearance { material Material { diffuseColor .06 .06 .06 } texture DEF sound MovieTexture {url "rutebeuf.mp3" startTime -1 loop FALSE } } geometry Box { size .001 001 001}} DEF vis VisibilitySensor { size 1000 1000 1000} ROUTE vis.isActive TO sound.loop ROUTE vis.enterTime TO sound.startTime | |
| | | peter le cochon +1000
Number of posts : 1032 Localisation : deutschland (sniff) Registration date : 2005-05-28
| Subject: Re: sound Wed 22 Jul - 21:57 | |
| Hi, how are your holidays going? MovieTexture (the standard node) has got an event out that might help you : eventOut SFTime duration_changed This event-out is fired by the movie-texture each time the media has been loaded. Example : - Code:
-
#VRML V2.0 utf8 Shape { appearance Appearance { material Material { diffuseColor .06 .06 .06 } texture DEF sound MovieTexture{ url "rutebeuf.mp3" startTime -1 loop FALSE } } geometry Box { size .001 001 001} }
DEF S Script {
eventIn SFTime media_loaded eventOut SFTime launch_media
url "javascript: function media_loaded(_data,t){ launch_media=t; } "
} ROUTE sound.duration_changed TO S.media_loaded Well, I guess it should help to start the media when it's loaded. TC | |
| | | alain fondateur
Number of posts : 23529 Localisation : Dompierre sur Veyle ,France Registration date : 2005-04-19
| Subject: Re: sound Wed 22 Jul - 22:30 | |
| OK thanks , I arranged it LOL with .0001 .0001 .0001 - Code:
-
Shape { appearance Appearance { material Material { diffuseColor .06 .06 .06} texture DEF sound MovieTexture{ url "rutebeuf.mp3" startTime -1 loop FALSE}} geometry Box { size .0001 .0001 .0001}} DEF S Script { eventIn SFTime media_loaded eventOut SFTime launch_media url "javascript: function media_loaded(_data,t){ launch_media=t; } " } ROUTE sound.duration_changed TO S.media_loaded and adding : ROUTE S.launch_media TO sound.startTime but how you get it loop ? btw it begins at the beginning LOL , thanx my holidays ? guys must be asked in december 1995 to keep my dog , ( chenil ) and as I asked today to have Choupi kept 2 days to being free for a short 2 days trip with Bertrand , they told me " we have no place for your dog until august 20" !! LOOL so I will stay a slave on 3DSmax ) ( until it works , it is a trial LOl (( | |
| | | peter le cochon +1000
Number of posts : 1032 Localisation : deutschland (sniff) Registration date : 2005-05-28
| Subject: Re: sound Thu 23 Jul - 0:15 | |
| ... ... oups ... yes Here is a working example : It starts looping once the media file has been loaded, never mind if the shape is being rendered or not. You don't need to give it a material, neither you need to give it a visible size ( 0 0 0 will be OK). I have added a NavigationInfo, so BS-Contact (bleurk!!!) does not start in "EXAMINE" mode, and I have added a Viewpoint, backing the shape, so you don't render it at start-up. The problem was in the startTime and stopTime ... - Code:
-
#VRML V2.0 utf8
NavigationInfo {
type ["FLY","ANY"]
}
Viewpoint {
position 0 0 -100
}
Shape {
appearance Appearance {
texture DEF sound MovieTexture{ url "rutebeuf.mp3"
loop FALSE } }
geometry Box {size 0 0 0} }
DEF S Script {
eventIn SFTime media_loaded eventOut SFTime launch_media eventOut SFBool set_loop url "javascript:
function media_loaded(_data,t){ launch_media=t; set_loop=true; } " } ROUTE sound.duration_changed TO S.media_loaded ROUTE S.launch_media TO sound.startTime ROUTE S.set_loop TO sound.loop
TC | |
| | | alain fondateur
Number of posts : 23529 Localisation : Dompierre sur Veyle ,France Registration date : 2005-04-19
| Subject: Re: sound Thu 23 Jul - 1:09 | |
| merci dear , Peter : ) btw I found by hazard a song from Léo Ferré , I adore , and Joan Baez perform here . I had put it in what I was playing with to day , a sketch , http://mixed3d.free.fr/alain/maps/galerielightmapsportejourptr.wrl Btw it took me 1/2 second to get that rutebeuf.mp3 LOL and it begins at the beginning , but where is a loop ? argg moment I reedit too soon LOL - sorry to bore you | |
| | | peter le cochon +1000
Number of posts : 1032 Localisation : deutschland (sniff) Registration date : 2005-05-28
| Subject: Re: sound Thu 23 Jul - 1:18 | |
| ... sorry, my fault. I did not expect you being awake so late, so I have been editing and re-editing the code ... Just try the code of my previous post again. I have recently added a new eventOut to the script (set_loop) ... it sets loop TRUE. Desoleé | |
| | | alain fondateur
Number of posts : 23529 Localisation : Dompierre sur Veyle ,France Registration date : 2005-04-19
| Subject: Re: sound Thu 23 Jul - 1:24 | |
| very OK http://mixed3d.free.fr/alain/maps/galerielightmapsportejourptrok.wrl thanks some years ago I had an ancient pupil who was playing on LouiZe One time she invited us to that sort of game : one had to upload on the forum one photo he took , in less than 1 minute , etc We have to do that with coding LOL ( I was supposed to watch "Big Fish" of Tim Burton , with Bertrand , on a CD , but I am not patient to sit on a chair , LOL , .... he is mad at me btw it is an excellent movie | |
| | | peter le cochon +1000
Number of posts : 1032 Localisation : deutschland (sniff) Registration date : 2005-05-28
| Subject: Re: sound Thu 23 Jul - 1:36 | |
| Last question for today : Why does Joan Baez speak french more like Edit Piaff than like Colin McKinlay? Last recomendation for today : Take "Choupy" ... or however your killer-dog (le chien assasin) is called ... with you, to wherever you go for holidays. Enjoy. | |
| | | alain fondateur
Number of posts : 23529 Localisation : Dompierre sur Veyle ,France Registration date : 2005-04-19
| Subject: Re: sound Thu 23 Jul - 1:48 | |
| | |
| | | X +200
Number of posts : 564 Age : 78 Localisation : Canada Registration date : 2005-05-09
| Subject: Nyah, nyah, nyah. nyah, nyah! Thu 23 Jul - 5:00 | |
| - Quote :
- Why does Joan Baez speak french more like Edit Piaff than like Colin McKinlay?
--- the same reason I speak English better than Celine Dion. Both these women studied alternate languages to increase their fan base. Their careers depended on it. So, there! Nyah, nyah, nyah. nyah, nyah! Give me a villa on the Mediterranean and I'll start speaking French better than both of them put together Nyah, nyah, nyah. nyah, nyah double nyah! pfft! X | |
| | | Sponsored content
| Subject: Re: sound | |
| |
| | | | sound | |
|
| Permissions in this forum: | You cannot reply to topics in this forum
| |
| |
| |