Godot-Mixing-Desk icon indicating copy to clipboard operation
Godot-Mixing-Desk copied to clipboard

Lot of things broken ?

Open Nomys opened this issue 3 years ago • 4 comments

I ran with a bunch of issues with MDM:

  • toggle/fade/mute not working (in the exemple 2 for instance).
  • lack of proper audio tracking (audiostremplayer.isplaying() doesn't seem to work), so no way to tell if a song plays or not.
  • as another issue state, lack of api doc.
  • playing audio samples with different size inside a same Container seems to crash MDM...
  • a song with 4 bars crashes because the MDM node tries to go to a 5th bar for no reason.

Nomys avatar Nov 19 '20 16:11 Nomys

From what I can see from the code

  • toggle/fade/mute is only applied to the tracks in the CoreContainer. As the AudioStreamPlayer nodes (aka tracks) are copied for playing, your changes will only be applied the next time any of these tracks are played
    • there are 2 exceptions: calling stop(), and when the song is changed internally (e.g. on play mode where you loop though all songs in the mix, or on bar transitions)
  • no way to tell if a song plays or not. => I'm currently doing a lot of cleanup in my fork, but in the meantime, you can get the currently playing song via myMixingDeskMusicNode.songs[current_song_num].name and if it's playing or not, call myMixingDeskMusicNode.playing (or are they not exposed? I'm not that familiar with GDScript, yet)
    • although, from what I can tell, playing is not properly updated in this repository; and reading songs[] only tells you that the Song is initialized, not if it's playing
  • in my fork I wrote some api docs (for mixing desk music, for now)
  • playing audio samples with different size inside a same Container seems to crash MDM... => in this repo's README.md, you'll find some notes on lengths. The most important factor is the length of the very first track in your CoreContainer. That one is used as a reference for beats, bars, etc.
  • a song with 4 bars crashes because the MDM node tries to go to a 5th bar for no reason => not sure about this one. maybe my fork fixed it or not... a test project would be nice.

that being said, you can try my fork https://github.com/MJacred/Godot-Mixing-Desk/tree/cleanup; although it's still very work-in-progress and there are breaking changes

MJacred avatar Mar 28 '21 15:03 MJacred

Hey man! Sorry for the late reply, development of GMD has kinda fallen to the wayside this past year. I'm currently going through the issues and trying to resolve them. My latest update has fixed the issue where songs don't fade/mute etc until the next loop. As for telling whether a song is playing, I have added to the song node a playing property (this gets updated every time something plays, repeats or stops), which you can check to see if it's playing. You can also get which song is currently playing (returns the node itself) by calling MixingDeskMusic.get_current_song. Different sample sizes can be an issue, but as long as the tracks are at least the same length as the main core track, it should be fine. Check your import settings to see if the files have been trimmed or if loop is on - both should be false.

kyzfrintin avatar May 03 '21 03:05 kyzfrintin

Hi! Thanks for your answer! I haven't much time these years, but i'm going to use more and more of GDM I think!

I will tried all this again and tell you about it.

ps: the ScatterSoundContainer is always playing a sound when lauch (and always the same one, the first maybe?), I think it will be better if it starts with the timer rather than playing a random sound.

Nomys avatar Apr 06 '22 13:04 Nomys

Ok so the later problem (a song with 4 bars crashes because the MDM node tries to go to a 5th bar for no reason) is resolve for me somehow.

I wasn't talking about sample size, but of the lenght of the tracks. For an "easy" workflow, it's a huge downside to need all tracks in a song have the same lenght. I suggest to add a function in a new GMD audiostreamplayer to bypass the bars, beats and tempo of the song and just play them as they are. There is probably a better way to do it, it's just from the top of my head.

Nomys avatar Jul 26 '22 16:07 Nomys