LouiZeForum

3D vrml
 
HomeHome  FAQFAQ  SearchSearch  RegisterRegister  MemberlistMemberlist  UsergroupsUsergroups  Log in  3Dchats / forums3Dchats / forums  

Share | 
 

 sound

View previous topic View next topic Go down 
AuthorMessage
alain
fondateur
fondateur
avatar

Number of posts : 23105
Localisation : Dompierre sur Veyle ,France
Registration date : 2005-04-19

PostSubject: 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

_________________
http://mixed3d.net/
Back to top Go down
View user profile
peter le cochon
+1000
+1000
avatar

Number of posts : 1032
Localisation : deutschland (sniff)
Registration date : 2005-05-28

PostSubject: 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

pig
Back to top Go down
View user profile
alain
fondateur
fondateur
avatar

Number of posts : 23105
Localisation : Dompierre sur Veyle ,France
Registration date : 2005-04-19

PostSubject: Re: sound   Wed 22 Jul - 22:30

OK thanks ,
I arranged it LOL with

.0001 .0001 .0001 Smile

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 Smile)


( until it works , it is a trial LOl Sad((

_________________
http://mixed3d.net/
Back to top Go down
View user profile
peter le cochon
+1000
+1000
avatar

Number of posts : 1032
Localisation : deutschland (sniff)
Registration date : 2005-05-28

PostSubject: Re: sound   Thu 23 Jul - 0:15

scratch ... Shocked ... 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 pig
Back to top Go down
View user profile
alain
fondateur
fondateur
avatar

Number of posts : 23105
Localisation : Dompierre sur Veyle ,France
Registration date : 2005-04-19

PostSubject: 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 Smile

and it begins at the beginning ,

but where is a loop ?


argg

moment

I reedit too soon LOL


- sorry to bore you Smile

_________________
http://mixed3d.net/
Back to top Go down
View user profile
peter le cochon
+1000
+1000
avatar

Number of posts : 1032
Localisation : deutschland (sniff)
Registration date : 2005-05-28

PostSubject: Re: sound   Thu 23 Jul - 1:18

Confused ... 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é Rolling Eyes

Laughing pig
Back to top Go down
View user profile
alain
fondateur
fondateur
avatar

Number of posts : 23105
Localisation : Dompierre sur Veyle ,France
Registration date : 2005-04-19

PostSubject: Re: sound   Thu 23 Jul - 1:24

very OK Smile

http://mixed3d.free.fr/alain/maps/galerielightmapsportejourptrok.wrl

thanks Smile



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 Smile

btw it is an excellent movie Smile

_________________
http://mixed3d.net/
Back to top Go down
View user profile
peter le cochon
+1000
+1000
avatar

Number of posts : 1032
Localisation : deutschland (sniff)
Registration date : 2005-05-28

PostSubject: 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.

pig
Back to top Go down
View user profile
alain
fondateur
fondateur
avatar

Number of posts : 23105
Localisation : Dompierre sur Veyle ,France
Registration date : 2005-04-19

PostSubject: Re: sound   Thu 23 Jul - 1:48

I dont remember why I jumped on that today



ah ! yes I remember now !
it is because I found Cecile Muller , today , on my Facebook .

So I "joked " about "amis disparus" , and it remembered me "Rutebeuf " , and I went to Google etc Smile

Quote :
Les maux ne savent seuls venir;
Tout ce qui m'était à venir
M'est advenu.
Que sont mes amis devenus
Que j'avais de si près tenus
Et tant aimés ?
Je crois qu'ils sont trop clairsemés
Ils ne furent pas bien semés
Ils m'ont failli.
De tels amis m'ont bien trahi
Lorsque Dieu m'a assailli
De tous côtés.
N'en vit un seul en mon logis
Le vent je crois, me les a pris,
L' amour est morte.
Ce sont amis que vent emporte,
Et il ventait devant ma porte
Les emporta.

Then I added the song in the 3D sketch I was working on Smile

that is working with no reason LOL

and , I guess that Joan loved french culture , as many did before this stupid 21ème century LOL



ps : dogs not allowed in Venise Smile

good night for now Smile

and re thanx Smile

_________________
http://mixed3d.net/
Back to top Go down
View user profile
X
+200
+200
avatar

Number of posts : 564
Age : 71
Localisation : Canada
Registration date : 2005-05-09

PostSubject: 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!

Laughing X
Back to top Go down
View user profile http://cyberhenge.ca
Sponsored content




PostSubject: Re: sound   

Back to top Go down
 
sound
View previous topic View next topic Back to top 
Page 1 of 1
 Similar topics
-
» FS- Creative Sound Blaster Audigy SE PCI Sound Card
» B.Sound: Piloter sa musique partout depuis votre PC,Tablette et smartphone
» SMOOTH CRIMINAL o It was the sound of a crescendo.
» Nouvelle série spéciale « Sound » sur les modèles Touran et Sportsvan
» Nissan Juke : Nouvelle Série Limitée Dark Sound

Permissions in this forum:You cannot reply to topics in this forum
LouiZeForum :: ARTS :: 3D art :: Script-
Jump to: