Forum

    • Register
    • Login
    • Search
    • Categories

    Impossible to loop short sample !

    Bug Reports
    4
    14
    1917
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • chris
      chris last edited by

      Hi

      Impossible to loop short sample "Synth Strings D6.wav" ,
      the loop exist , but no sounds, very strange behavior...
      https://www.dropbox.com/s/eyvr04g8b0u7anc/Soundtrack.sfz.zip?dl=0
      here the files, please help .

      Thanks

      1 Reply Last reply Reply Quote 0
      • Christoph Hart
        Christoph Hart last edited by

        Can you upload the sample data too (PM me if you don't want to do this publicly)?

        It's rather hard to guess what's not working here πŸ™‚

        1 Reply Last reply Reply Quote 0
        • chris
          chris last edited by chris

          Here a short Video demonstrate the problem i also add the SFZ.

          https://www.dropbox.com/s/styohwp3gnbftwo/Archive.zip?dl=0

          Thanks,

          1 Reply Last reply Reply Quote 0
          • Christoph Hart
            Christoph Hart last edited by

            Ah, yes it's a duplicate of this long time friend of mine:

            http://forum.hise.audio/topic/497/preloading-and-looping

            Maybe this time I'll actually do something about it πŸ™‚

            1 Reply Last reply Reply Quote 0
            • chris
              chris last edited by

              ok thanks for this;)

              1 Reply Last reply Reply Quote 0
              • M
                MacroMachines last edited by

                Did this fix ever get merged?

                1 Reply Last reply Reply Quote 0
                • Christoph Hart
                  Christoph Hart last edited by

                  Nope and now it starts to get embarrassing...

                  1 Reply Last reply Reply Quote 0
                  • M
                    MacroMachines last edited by

                    maybe @Cyberdyne387 could provide his fix from the referenced forum thread? I didn't see a github repo in the list of forks. I wondered if maybe its a simple enough fix to copy paste and describe the changes in the issues list or on this thread?

                    C 1 Reply Last reply Reply Quote 0
                    • C
                      Cyberdyne387 @MacroMachines last edited by Cyberdyne387

                      @macromachines

                      First of all, apologies for taking so long to read this: truth be told, I’ve been pretty swamped with other matters.

                      It’s important to note that I may not have the modified code in its entirety anymore due to trying to keep my HISE source code updated every so often, and even if I do, I never did find a C++ way to address the sample-end-too-short issue. I’m willing to share my edit for the loop-end-too-early issue, however, and I may still have a JavaScript that adjusted the preload size so that the loop would play at all regardless.

                      UPDATE: found the fixed C++ file. It should hopefully compile fine with the latest source code.

                      https://www.dropbox.com/s/ksj4v2mctlm183a/StreamingSamplerSound.cpp?dl=0

                      To specify what exactly I changed when it comes to this issue, Christoph wrote a conditional statement in the setPreloadSize function for the circumstance of if the entire length of the sample is too short for the internalPreloadSize, but looping is enabled. What I changed is I added an additional conditional statement checking to see if the loop end point is also smaller than the internalPreloadSize.

                      As for whether the loop plays at all under a given preloadSize, sadly, loops and loading the entire sample seem to not get along well at this time, so my final change was specifying that entireSampleLoaded be false if the preloadSize is larger than the loop end point. In addition, I also specified the loopChanged function to force-reload the preload buffer in the high chance that you wish to change the loop but not the preload buffer size at a given time.

                      Hopefully this helps people out.

                      1 Reply Last reply Reply Quote 0
                      • Christoph Hart
                        Christoph Hart last edited by

                        @cyberdyne387 - thanks for the code. I have diffed it with the current state and it can be merged without problems. However I'd like to test these things a little bit before committing in the codebase - changing this code is like open heart surgery, so every line counts πŸ™‚

                        C 1 Reply Last reply Reply Quote 0
                        • C
                          Cyberdyne387 @Christoph Hart last edited by

                          @christoph-hart Not a problem when it comes to testing the code extensively before committing. I did realize I made a minor mistake in my fix, anyway: the force-reloading of the preload buffer I had only run when the looping is set to enabled, meaning it will play the duration of the sample as a loop even if the last loop change you did was disabling the loop. Fixed on my end now, with the same link.

                          1 Reply Last reply Reply Quote 0
                          • Christoph Hart
                            Christoph Hart last edited by

                            Alright, I've pushed a fix to this problem.

                            I ended up rewriting the fix for myself, but at the end I did almost the same things as you πŸ™‚

                            Thanks again for the input!

                            C 1 Reply Last reply Reply Quote 1
                            • C
                              Cyberdyne387 @Christoph Hart last edited by

                              Just tested your version of the edits for myself, only to need to revert back to my version of StreamingSamplerSound. Both copies of the file work fine when there's no sample start offset, but it appears the one you committed causes the loop to play silence for the duration of the sample start offset

                              1 Reply Last reply Reply Quote 0
                              • chris
                                chris last edited by

                                Just install this update Working Perfect, Thanks a lot.....

                                1 Reply Last reply Reply Quote 0
                                • First post
                                  Last post

                                12
                                Online

                                855
                                Users

                                5.7k
                                Topics

                                53.0k
                                Posts