create3000 / x_ite

X_ITE X3D Browser, view and manipulate X3D, VRML, glTF and other 3D sources in HTML.
https://create3000.github.io/x_ite/
Other
67 stars 15 forks source link

Can'd read .mid or .midi file in Audio Clip #47

Closed lawriehodges closed 5 years ago

lawriehodges commented 5 years ago

In a .wrl world I have the following node: Sound { maxBack 300
maxFront 300
minBack 1
minFront 1
priority 0

spatialize    FALSE  
source DEF  AC AudioClip { 
    description   "Morris Dance Tune: The Sussex Carol"
    loop          FALSE 
    url           "sussex.mid"
}

}

The animation associated with it runs but without music. The console output gives me: x_ite.min.js:42 Error loading audio: http://lhodges.users37.interdns.co.uk/me/xcard/sussex.mid

replacing 'sussex.mid' with 'sussex.mp3' ( a file derived from 'sussex.mid') works OK. 'sussex.mid' works locally with a Cortona3D/EI11 combination.

Is this a bug or is there some deficiency in my .mid file?

**To Run the animation with the working .mp3 version, go to: http://lhodges.users37.interdns.co.uk/me/xcard/waddl_ard.htm

and click on the picture as suggested.

Desktop (please complete the following information):

lawriehodges commented 5 years ago

I can answer my own query. I have just attempted to run in Firefox and the console message is more explicit. I am told that midi is not supported.

lawriehodges commented 5 years ago

I count that as a bug! But what in? Chrome and Firefox or X-ite?

create3000 commented 5 years ago

The AudioClip node works essentially by using the HTML5 <audio> element and only the file formats that are supported by the HTML5 <audio> element are support by the AudioClip node, see https://developer.mozilla.org/en-US/docs/Web/HTML/Supported_media_formats. The same is with the MovieTexture node, this uses the HTML5 <video> tag.

lawriehodges commented 5 years ago

Thank you for the clarification. A sad omission. But I can live with it.