• Dark Theme
    • Categories
    • Register
    • Login
    HISE Logo Forum
    • Categories
    • Register
    • Login

    Impossible to loop short sample !

    Scheduled Pinned Locked Moved Bug Reports
    17 Posts 6 Posters 2.7k Views
    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.
    • C
      chris
      last edited by 4 Feb 2018, 23:15

      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
      • C
        Christoph Hart
        last edited by 5 Feb 2018, 17:50

        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
        • C
          chris
          last edited by chris 2 Jul 2018, 03:43 6 Feb 2018, 17:21

          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
          • C
            Christoph Hart
            last edited by 7 Feb 2018, 22:21

            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
            • C
              chris
              last edited by 8 Feb 2018, 12:40

              ok thanks for this;)

              1 Reply Last reply Reply Quote 0
              • 3 months later
              • A
                AxiomCrux
                last edited by 5 May 2018, 11:10

                Did this fix ever get merged?

                http://www.axiom-crux.net

                1 Reply Last reply Reply Quote 0
                • C
                  Christoph Hart
                  last edited by 6 May 2018, 22:13

                  Nope and now it starts to get embarrassing...

                  1 Reply Last reply Reply Quote 0
                  • A
                    AxiomCrux
                    last edited by 7 May 2018, 02:10

                    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?

                    http://www.axiom-crux.net

                    C 1 Reply Last reply 13 May 2018, 13:17 Reply Quote 0
                    • C
                      Cyberdyne387 @AxiomCrux
                      last edited by Cyberdyne387 13 May 2018, 13:17

                      @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
                      • C
                        Christoph Hart
                        last edited by 13 May 2018, 21:14

                        @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 13 May 2018, 21:55 Reply Quote 0
                        • C
                          Cyberdyne387 @Christoph Hart
                          last edited by 13 May 2018, 21:55

                          @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
                          • C
                            Christoph Hart
                            last edited by 14 May 2018, 11:27

                            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 14 May 2018, 18:22 Reply Quote 1
                            • C
                              Cyberdyne387 @Christoph Hart
                              last edited by 14 May 2018, 18:22

                              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
                              • C
                                chris
                                last edited by 15 May 2018, 10:48

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

                                1 Reply Last reply Reply Quote 0
                                • 5 years later
                                • F
                                  Frankbeat
                                  last edited by 26 Apr 2023, 14:01

                                  I'm also having problems looping short samples. Files with loop settings like the following seem to overcharge HISE (develop branch from roughly Feb 2023):

                                  <sample {other params here} LoopStart="633" LoopEnd="1033"/>
                                  <sample {other params here} LoopStart="321" LoopEnd="721"/>
                                  <sample {other params here} LoopStart="669" LoopEnd="1093"/>
                                  <sample {other params here} LoopStart="339" LoopEnd="763"/>
                                  

                                  But hey, why not just duplicate one or two cycles in theses files? Very simple solution :smiling_face:

                                  Using HISE from the develop branch (Feb '23)

                                  L 1 Reply Last reply 26 Apr 2023, 15:05 Reply Quote 0
                                  • L
                                    Lindon @Frankbeat
                                    last edited by 26 Apr 2023, 15:05

                                    @Frankbeat so if you think about it there's always going to be a problem for HISE with looping very short samples spread cross the keyboard range - as you move further up the keyboard away from the root note - the sample needs to be shortened(even further) to repitch - until we get to the "that aint ever gonna work" position... so yes duplicating your short loop multiple times (say 10 or 20) will help a fair bit...

                                    HISE Development for hire.
                                    www.channelrobot.com

                                    F 1 Reply Last reply 26 Apr 2023, 17:19 Reply Quote 0
                                    • F
                                      Frankbeat @Lindon
                                      last edited by 26 Apr 2023, 17:19

                                      @Lindon Oh, I'm sorry I didn't mention it: This was tested with no pitch tracking applied. Each sample just played back on its root note. But of course, you're correct. I never pitch track a sample more than 2 semitones up or down.

                                      Using HISE from the develop branch (Feb '23)

                                      1 Reply Last reply Reply Quote 0
                                      2 out of 17
                                      • First post
                                        Last post

                                      35

                                      Online

                                      1.9k

                                      Users

                                      10.8k

                                      Topics

                                      94.3k

                                      Posts