[request] Module music without WebAudio API?

Post your work in progress addons and get feedback

Post » Wed Feb 17, 2016 7:12 am

Since cocoon doesn't support audiocontext/webaudio api it currently seems impossible to play xm/mod files in any canvas+ builds. I know html5audio is fairly limited to just playing back oggs, wavs and mp3s, but is there any way that module music could be played back via a plugin without relying on webaudio? They've recommended howler.js but I believe that is only useful for falling back to ogg/MP3 where webaudio isn't present, unless I'm wrong. If anyone has any suggestions as to how to go about this I'd be most grateful.
Last edited by Zebbi on Fri Feb 19, 2016 2:32 pm, edited 1 time in total.
B
41
S
12
G
14
Posts: 1,117
Reputation: 11,248

Post » Fri Feb 19, 2016 7:34 am

Does this help you with your goal? https://www.a1k0n.net/2015/11/09/javasc ... layer.html
Image
B
24
S
8
G
10
Posts: 1,821
Reputation: 8,279

Post » Fri Feb 19, 2016 9:27 am

tulamide I use to use this software on Amiga 500, 1200. I am very impressed, amazed to see you have vast knowledge and understanding of it. There was software like that on Amiga and Atari ST I used to do my recording in Zella Studio in Birmingham somewhere around 1985 and 1993. What an wonderful time we had with band Call Red Rose and Azaad.
B
242
S
37
G
15
Posts: 1,928
Reputation: 39,904

Post » Fri Feb 19, 2016 9:37 am

Although I do know a lot about it, and once programmed my own tracker software back in the days on an Atari ST (which never got any attention though), the linked blog is not by me. It is by Andy Sloane.
I have zero skills in javascript, so I looked for something that could help the op. That's all :)
Image
B
24
S
8
G
10
Posts: 1,821
Reputation: 8,279

Post » Fri Feb 19, 2016 11:05 am

tulamide Bless you for being honest and thank you
B
242
S
37
G
15
Posts: 1,928
Reputation: 39,904

Post » Fri Feb 19, 2016 2:13 pm

I am interesting in this solution provided by @tulamide
https://www.a1k0n.net/2015/11/09/javasc ... layer.html
This solution is using "AudioContext/webkitAudioContext", which is one kind of Web Audio API, imo.

But the title of this thread is "without WebAudio API"...
B
108
S
26
G
250
Posts: 4,403
Reputation: 141,123

Post » Fri Feb 19, 2016 2:33 pm

Yes, unfortunately that uses WebAudio API, and I'm not even sure if it's possible at all to playback modules without it, which is a shame as Cocoon doesn't use it, which seriously limits the audio possibilities with Canvas+ builds. If it CAN be done, I'd be interested in knowing how.
B
41
S
12
G
14
Posts: 1,117
Reputation: 11,248

Post » Fri Feb 19, 2016 2:51 pm

I had made a MidiParser plugin, which only trigger note events, designer need play notes by sounds using official audio plugin.
Official audio plugin could be used in Cocoon, I guess.
B
108
S
26
G
250
Posts: 4,403
Reputation: 141,123

Post » Fri Feb 19, 2016 8:14 pm

Oh, sorry if I confused things! I was intrigued by this part of the blog post:
"The webkitAudioContext element was introduced to HTML a while back, and is now available in the standard as AudioContext. The API is fairly flexible, and one of the things you can do with it is get a Javascript callback which writes samples more or less directly to the output device, just like we used to do with DMA loop interrupts back in the day. It’s called createScriptProcessor." I just read HTML standard. So "createScriptProcessor" is already part of WebAudio? Sorry then. Damn, And it looked so easy to implement... :cry:
Image
B
24
S
8
G
10
Posts: 1,821
Reputation: 8,279

Post » Mon May 30, 2016 4:15 pm

It's a shame, I'd love to use mods with cocoon, but they only support basic html5 audio. Since html5 audio supports basic playback of samples, is there no way a module playback plugin couldn't do all of it's work without webaudio and just output the playback of the mod file to html5?
B
41
S
12
G
14
Posts: 1,117
Reputation: 11,248

Next

Return to Work in Progress Addons

Who is online

Users browsing this forum: No registered users and 1 guest