wothke / libxmp-4.4.1

this project moved to bitbucket! WebAudio plugin of libxmp
41 stars 8 forks source link

Experimental? & Use of MO3 files #2

Closed etiennewan closed 8 years ago

etiennewan commented 9 years ago

Hi and congratulation for your work :+1: ! It works great and smooth even on my Android phone ! I was thinking about using this project to play some music for a project I'm working on, which is a Bejeweled clone. Because the music of the original game was a S3M file, it works out of the box with your player. But the sequels use MO3 files...
Do you think this library is stable enough to play some music for an HTML5 game, and to some extent wrap it into a Chromium APK for Android ? And in your opinion, do you think there is a lot of code to write in order to support MO3 files ?

wothke commented 9 years ago

Hi

Thanks, I am glad you like it. As far as I know XMP has somewhat
limited MO3 support, i.e. it uses a separate unmo3 tool to completely
unpack the files.

So far I don't have any experience with MO3. I imagine you might do
the same and just unpack the files before passing them to the player.

Respective "mo3 unpacker" C code seems to be available (e.g. here:
https://github.com/lclevy/unmo3) but I don't know if it works
correctly or how easily it can be compiled into JavaScript.. Once the
logic is available in JavaScript it should be easy to just add the
unpacking step into my sample_player.js. (adding "native" MO3 playback
support within XMP is probably a more expensive endeavor.. you should
check with Claudio Matsuoka what that would mean exactly..)

I my experience the player is stable in Chrome (I've only tested it on
my old Windows XP box) however the WebAudio stuff had not always
worked reliably when I had last tested it in Firefox 31. I have no
Android system to test with and I'd say that some more testing on that
platform would not hurt.. (to verify how good the WebAudio support
actually is..)

Cheers, Juergen

PS: I havn't used Chromium APK yet and I cannot help you there..

Zitat von EtienneWan notifications@github.com:

Hi and congratulation for your work :+1: ! It works great and smooth
even on my Android phone ! I was thinking about using this project to play some music for a
project I'm working on, which is a Bejeweled clone. Because the
music of the original game was a S3M file, it works out of the box
with your player. But the sequels use MO3 files... Do you think this library is stable enough to play some music for an
HTML5 game, and to some extent wrap it into a Chromium APK for
Android ? And in your opinion, do you think there is a lot of code
to write in order to support MO3 files ?


Reply to this email directly or view it on GitHub: https://github.com/wothke/libxmp-4.3.0/issues/2

etiennewan commented 9 years ago

Wow ! Thank you for your quick answer. I thought for my MO3 files it was easier to convert them to a module file with PCM samples, because what I'm looking for is to spare http requests against already rendered MP3s, and my converted module files are still way less bigger than the Mp3 (30 minutes = 4,5MB against 44MB in MP3)

When I was asking about mobile usage, I was thinking about if it was CPU intensive work because my low laptop burned to 100% during the test. I will run a game at the same time music is played and the game could be CPU intensive too... If it works in chrome, I'm sure it'll work in a chromium wrapper, that acts like a webview... Cheers, Etiennewan

wothke commented 9 years ago

And I always thought that my PC was slow.. ;-) on my old Pentium4
webxmp playback can take anywhere between 25% and 40% CPU (it depends
very much on the selected song).. I never thought about the player's
performance because for my needs it was already good enough and most
ppl I talked to had much faster PCs where they barely even noticed
that the player was running..

I don't know how that compares to modern mobile devices (I don't have
any). I guess you'll need to do some performance testing yourself to
see what minimal hardware configuration you can/want to support.

Cheers, Jürgen

Zitat von EtienneWan notifications@github.com:

Wow ! Than you for your quick answer. I thought for my Mo3 files it was easier to convert them to a module
file with PCM samples, because what I'm looking for is tjo spare
http requests against alreaydy rendered MP3s, and my converted
module filed are still way less bigger than the Mp3 (30 minutes =
4,5MB against 44MB in MP3)

When I was asking about mobile usage, I was thinking about if it was
CPU intensive work because my low laptop burned to 100% during the
test. I will run a gape at the same time music is played and the
game could be CPU intensive too... If it works in chrome, I'm sure it'll work in a chromium wrapper,
that acts like a webview line in iOS... Cheers, Etiennewan


Reply to this email directly or view it on GitHub: https://github.com/wothke/libxmp-4.3.0/issues/2#issuecomment-67283477