HISE Logo Forum
    • Categories
    • Register
    • Login

    Bit of silence added to end of samples?

    Scheduled Pinned Locked Moved General Questions
    14 Posts 2 Posters 696 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.
    • Christoph HartC
      Christoph Hart @DanH
      last edited by

      @DanH I think that might be a side effect of the 4096 sample block size of the HLAC codec. Can you verify that by checking with samples that originally have a sample length that is a multiple of 4096?

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

        @Christoph-Hart ah ok. So the ones that I thought didn't have extra space are super close to being multiples of 4096 so you can barely see the space, but, if you zoom in enough, it is there.

        In the sample map xmls the monolith lengths are all multiples of 4096, but none of the sample lengths are.

        The problem I will face is that I'm overlaying controls on the AudioWaveform tile to control start / loop ranges. So having the extra space means the controls won't be accurate. I could extend the sample ranges into the extra space, I suppose, but it's not an ideal situation and doesn't look tight like I hoped it would.

        DHPlugins / DC Breaks | Artist / Producer / DJ / Developer
        https://dhplugins.com/ | https://dcbreaks.com/
        London, UK

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

          @DanH yes I agree that this is not ideal.

          The problem is however that I'm not storing the actual length of the original sample file in the samplemap, so there is no perfect solution (and I don't want to add this as a property as this causes unnecessary noise to 99% of all samplemaps).

          What I can do is to use the initial sample end as it is stored in the samplemap to be used as maximum length:

          <samplemap ID="supershort" RRGroupAmount="1.0" MicPositions=";" CrossfadeGamma="1.0"
                     SaveMode="2">
            <sample Root="60" LoKey="60" HiKey="60" LoVel="0" HiVel="127" RRGroup="1"
                    FileName="{PROJECT_FOLDER}supershort.wav" Duplicate="1" SampleEnd="19678"
                    SampleRate="44100.0" LoopXFade="0" SampleStart="0"
                    MonolithOffset="0" MonolithLength="20480"/>
          </samplemap>
          

          Here the SampleEnd property is the actual sample length value, while the MonolithLength is padded to a multiple of 4096. I cannot change this because the HLAC reader always reads chunks of 4096 samples (and if it plays a few samples of silence it won't change anything).

          Currently the waveform renderer gets it's max range by looking at the full range that is available to the HLAC reader which is the zero padded length. I can add a function at the initialisation stage that checks the sample end value and then overrides the full length for the waveform preview while leaving the audio rendering side as it is, but this means that if you change the sample end & resave the samplemap, the area beyond that new end is forever gonzo (unless you revert the samplemap back to non-monolith or manually edit the SampleEnd property to the max value).

          I still think that's a better solution as the HLAC conversion will also truncate the sample range thats encoded into the monolith so there are not too many use cases where you might want to edit the sample range after the HLAC conversion. Note that if you change the sample properties using scripting later on this will not affect the displayed range as it was already initialised correctly with the sample map value.

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

            @Christoph-Hart This sounds perfect - thank you! 😘

            DHPlugins / DC Breaks | Artist / Producer / DJ / Developer
            https://dhplugins.com/ | https://dcbreaks.com/
            London, UK

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

              @DanH Alright, I've pushed this, let me know if that works for you.

              DanHD 2 Replies Last reply Reply Quote 0
              • DanHD
                DanH @Christoph Hart
                last edited by DanH

                @Christoph-Hart some weirdness going on.... It's looks just as I want it but only for one sample map πŸ˜† After that the AudioWaveform tile goes blank. Setting the index to -1 doesn't show sample played, although maybe that's just s symptom of the same underlying issue.

                So I open the project, load a sample map, it shows the waveform as I want it (thanks!) but then that's it for waveforms....

                EDIT - seems to affect only some of the sample maps. I'll see if I can figure out what's going on....

                • Could be something to do with loop end points getting moved outside of the sample range. If that's the case hopefully I can reconfigure them and crack on but I'll see if something is going wrong which might affect others.

                DHPlugins / DC Breaks | Artist / Producer / DJ / Developer
                https://dhplugins.com/ | https://dcbreaks.com/
                London, UK

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

                  @Christoph-Hart so..... my loop points (if I set any) aren't getting saved in my sample maps. When the map loads some of the maps seem to set the loop end point to the monolith length amount which is outside the scope of the new waveform tile πŸ˜†

                  I've got to run out so will look a little harder later. Not 100% sure why the loop info isn't getting saved though... Or why the loop end defaults to monolith length as I'm sure it used to default to sample length...

                  DHPlugins / DC Breaks | Artist / Producer / DJ / Developer
                  https://dhplugins.com/ | https://dcbreaks.com/
                  London, UK

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

                    @DanH I think if the loop end is the sample end it will remove the property because thatβ€˜s the default but if you can reproduce it with a certain samplemap I can take a look.

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

                      @Christoph-Hart as far as I can make out if I reset the loop point to something within the range, disable looping, save the map, quit hise, re-open and load the map then it should work. Enabling looping again can then make it not work. I've got one map that refuses to display a waveform in loop mode. Shall I dm?

                      DHPlugins / DC Breaks | Artist / Producer / DJ / Developer
                      https://dhplugins.com/ | https://dcbreaks.com/
                      London, UK

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

                        @DanH yes

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

                          Alright, should be fixed now - samplemaps with loop points indeed caused the padded size to not being set correctly but that was an easy fix.

                          DanHD 1 Reply Last reply Reply Quote 5
                          • DanHD
                            DanH @Christoph Hart
                            last edited by

                            @Christoph-Hart Thank you, hugely appreciated!

                            DHPlugins / DC Breaks | Artist / Producer / DJ / Developer
                            https://dhplugins.com/ | https://dcbreaks.com/
                            London, UK

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

                            34

                            Online

                            2.0k

                            Users

                            12.6k

                            Topics

                            109.5k

                            Posts