-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Request: Ability to render the song to wav or Ogg file #7
Comments
There is already an option to export the module to a wav file (File operations -> Save Module as -> wav) but currently it is limited to the current pattern due to browser memory limitations.
In fact - that last one I'm planning to implement anyway for the online version - but the second one will probably be much faster. Of course you also could keep the music as mod files and include a mod playback routine in your end product. File size will be smaller, but - at least for the HTML5 version - it will use more CPU then a standard mp3 playback. I'll look into it some more! |
Ah yes, sorry I couldnt initially find it. I thought that was exporting the sound sample, rather than rendering the song itself. Thank you for suggesting some ideas to explore. From the listed I like 2 the most and now wonder if there is some npm package I can get for rendering a wav from the mod. This is something worth exploring! I played with bassoon a bit more today and must say that I am quite impressed with it. This is the best html5 tracker at the moment. You have created something that is quite special here If bassoon can render the entire song (all 4 channels) on its own one day- that would be incredible! It's an amazing tracker! |
@steffest I found this library: I found a couple of js mod players, but nothing that can actually render it to a file Btw Gdevelop 5 runs inside electron, not sure if that will help with the problem. Electron is based on chromium, but has less restrictions. I think I can embed bassoon to run in the same way piskel runs inside gdevelop via the electron api. Bassoon can technically have a desktop version on its own too if you ever want to- it wont take a lot of code to embed it in an electron container and there are a few advantages to that.You can for example be able to have custom context menus and better file system access. Gdevelop is developed in that way. It has a web app, but it also has an electron version. The two share most of the code. The build/release process is very easy |
I did some quick tests. I know Electron but at this point I would like to keep Bassoon inside the browser. I think I will implement option 3 first: do the rendering through openmpt123 on the server, then offer a download link to the file when it's done. I'll probably throw in a "convert to mp3" option as well. Still ... keeping the file in .mod or .xm format makes sense too as this would be a much (much!) smaller file. P.S. There's a standalone player component for Bassoon : http://www.stef.be/bassoontracker/player/ and http://www.stef.be/bassoontracker/player/progress.html - quit easy to have .mod and .xm playback in any game, then you could have "subsongs" and Sound FX all together in 1 audio tool. |
Hey thank you for looking into this :) Using mods in the engine makes a lot of sense indeed-especially when one of our target platforms is mobile, where apk publishing size is limited. This is a very very good point! |
btw this is awesome: |
Heh ... That's a bug - indeed Firefox specific. |
Rendering to .wav and .mp3 is added. |
This is fantastic, but it looks like it relies on internet connection to render. |
It looks like it is possible to compile libopenmpt to javascript via emscripten: If possible can you see if we can use it in bassoon localy? The export seems to generate very good quality mp3 files |
The current render solution does indeed require a internet connection, but in essence it's just an example how to offload the rendering step to another process, as you can't do this properly in the same thread than the one Bassoontracker is running. (it would work for short songs but for larger ones it would lock up the app for too long) - So yes: if you run Bassoon locally you would offload that to another local thread. (being a binary or js based renderer or whatever). |
Ok, in that case I guess it would be better to implement a module player in gdevelop.js (the game engine half) - perhaps use bassoon's player. Then once that is working, then work on bundle and embed bassoon with gdevelop5's electron app (the IDE half). Being able to compress files to wav/mp3 without internet connection requirement via bassoon would have eliminated the need to do the first half (module player in gdevelop.js) - as gdevelop.js can already play mp3/wav files. For extra features such as fetching resources/examples- the internet connection requirement is ok and is quite cool too. Sorry I haven't properly looked into this yet. I had to do some work on adding jfxr to gdevelop and now some extra work to add support for saving layers when using piskel in gdevelop. |
Right now it is pretty awesome, but it lacks the fundamental ability to export the music data to something that other software can read.
I am requesting this, because I am actually interested in embedding bassoon into gdevelop- to be used as a music tracker by game devs.
https://github.com/4ian/GDevelop
I already did that with piskel and it worked out quite well. :)
Bundling a copy of bassoon with gdevelop can be beneficial to both projects imo - giving exposure to bassoon and getting it in the hands of more users.
I will like to keep the vanilla version of the editor- so it will retain all of its original charm. The only thing that I will need to do is inject a button 'Save back to Gdevelop' somewhere in the UI of my copy.
Unfortunately without the ability to actually export the data as a music file, gdevelop will not be able to use it.
Our other option is sonant or soundbox, but I like bassoon more.
The text was updated successfully, but these errors were encountered: