In the Gtk+ version we had background musics. Some people miss them on the new version. We should keep this as an optional download
Description
Details
- Commits
- R2:5e73ef65d3f4: Update the playlist selection dialog message
R2:d3224edb5edc: Change the background music playlist as soon as it is changed
R2:7d86370129cb: Added feature to filter the background musics and save/load them
R2:988ca66abbea: Ability to see the playing background music and switch between them
Status | Assigned | Task | ||
---|---|---|---|---|
Resolved | timotheegiet | T11924 release 0.97 | ||
Resolved | amankumargupta | T1543 Background music |
Bugs/improvements:
- Fixed --> Music doesn't play on restarting GCompris after shutting it down with Background music disabled (waiting for review here https://github.com/gcompris/GCompris-qt/pull/206).
- Fixed --> Background music stops after all the musics have been played (waiting for review here https://github.com/gcompris/GCompris-qt/pull/206).
- Implemented --> Find a way to disable the background music when a musical activity is started, by not changing the value directly in the config (waiting for review here https://github.com/gcompris/GCompris-qt/pull/206).
Other feature to add: lower the default background music sound (we need to be able to hear the introduction voices distinctly without having the background music blocking the child to listen)
Features to be added:
- Show the currently playing music in the main menu config dialog.
- Have a left/right arrows to switch between music.
- Have a menu like filter from which the user can select only the musics he wants to play.
Hi, thanks for the update. The design needs to be improved: we should not use a button to display the actual music (except if you plan to use it to select the playable pieces of music (point 3)). We'll also need to clean up the filenames so we have something understandable displayed.
Can you rebase the branch on master too?
- Yes, the overall design can be improved (I think @timotheegiet would surely do it better once it's ready to be merged ;)). I just used the current design to check the working first.
- I'll go on to implement the point #3 now.
- For the file names, yes, me and @timotheegiet had discussed it on IRC few days back and he'll probably look at it next week :)
- Sure, I'd also prefer to rebase it on master before proceeding to #3 and make other changes in the commit as per your comments.
The feature to filter background musics and save/load them to play is implemented. At present, the changes get into effect after the software is restarted.
Next thing to do is to dynamically change the playlist in GCAudio element for background music to make the changes get into effect immediately.
The final feature is done as well!
Further steps:
- Needs testing by other members.
- Discuss more features if needed.
- Update music names on the server.
- Update the design if required.
- Probably merge in master for next release, if possible.
Tested quickly, it seems to work fine.
However, more than just updating the music names, I would like to completly review the current set of music we have and remove/add some. Some music in the list don't really fit with the mood of GCompris (some are too much dark, some too much heavy... I would go with more cute and light music themes).
As for the visual design, I would change a little the size of the button to fit the arrow height, and maybe a few others little cosmetic changes, but I'm fine with the way it works currently.
I would also like this to be ready and merged to master before next release.
Can you add a unit test for the ApplicationSettings changes?
I did one new comment in https://phabricator.kde.org/R2:d3224edb5edc6f21dab3880351e11683f9e60a99
At some places, can you take a look if you can use algorithms instead of while/for loops (using filter for example if it works to do the difference between filtered music and all music)?
Otherwise, it seems good to me :)
I updated the music set on the gcompris-data repository, and uploaded the .rcc files to the server.
Let me know if you find any issue with that new set.
On a side note, it would be nice to also display the author and license info of each track somewhere, I think in the selection list would be the right place.
Ideally, we should fetch those infos from the music metadata (in which case I'll edit the files to include those metadata), but I'm not sure if that's possible with Qt only.
Also, I think we should add a slider to adjust the volume of the background music, and maybe also for the sound effects while we are at it; for voices it may not be needed as those are the most important sounds so it's ok to always play them at full volume).
Finally, I just found a little bug: if starting GCompris with music disabled, enabling it doesn't work (no music played) until restarting the application.
https://doc.qt.io/qt-5/qml-qtmultimedia-audio.html#metaData-prop
Audio can be tagged using:
vorbiscomment -w colors.ogg -t "ARTIST=Gregoire Giet" -t "TITLE=colors" -t "COPYRIGHT=CC-BY-SA 3.0" -t "DATE=2011"
Info is accessible via:
Audio { metaData.onMetaDataChanged: { console.log(metaData.title, metaData.year, metaData.copyright, metaData.contributingArtist); } }
Also, having the title via the metadata will avoid having to find a naming convention :)
It's to be tested on other platform (due to conversion).
Thanks, I'll add the tags to ogg files; I've read ffmpeg should keep them during conversion by default, I'll double check and update the rcc on the server.
it does not seem to be the case. I updated the script to keep metadata from ogg to mp3 conversion, but didn't manage yet to find something for aac :/
Indeed, here I found a way to transfer metadata to aac using id3v2 command line, at least for ARTIST, TITLE and YEAR.
This should be usable for mp3 too, I'll update the script accordingly.
All rcc files updated on the server with proper tags (artist, title, year and copyright in comments) :)
So, getting back on this, this is the checklist of things to do:
Fix bug: if starting GCompris with music disabled, enabling it doesn't work (no music played) until restarting the application.Add volume slider for background music and audio effects.- Display the author and license info of each track.
Consider the format of the music according to the platform.- Add unit test for the ApplicationSettings changes.
@jjazeix @timotheegiet AFAIR, I once experimented with adding metadata to a piece of music and yes, it gets lost when converted to other formats. If we can extract the metadata in the conversion script and add it back once converted, it would be nice.
I'm currently putting point #3 in the above comment on hold for now. The metadata needs to be tested first.
All features completed, bugs fixed, and thoroughly tested.
@jjazeix can you please merge it to master ?
Ouch, actually I found a last remaining bug: when the music reaches the end of last track in the list, it restarts on track 2 instead of track 1... (it doesn't happen when using the "Next" button, only when playing normally).
I'll look at it.
Ok, the "missing track" issue is fixed, at the cost of bringing back the "restart needed to re-enable music if started without" bug.
As I noted in the commit comment, ideally fixing both would be best, but if not possible it's less bad to keep the restart-needed issue than the missing track one.
I spend most of the afternoon digging for a fix but didn't find any way to fix both.
If someone else want to try, else I'm ok to merge and ship like this.
To make it easier to test/fix, I added a temporary music of a few seconds at the end of the list (it's in the music rcc on the server; I'll replace those with proper rcc without the extra test file in a few days).
I tried taking a look at it in the noon. What I figured out is, when the tracks are freshly appended (after the music reaches the end of the last track and the stop signal initiates the re-append of tracks), the 1st music indeed plays, but that's for a very small period of time. After all the songs are appended, I don't know why, but the stop signal of the audio element is triggered again for some reason. This causes the 2nd track to play. I can't see why it happens :/
Even stranger is, "next" button follows the same code, but this doesn't happen there.