HISE Logo Forum
    • Categories
    • Register
    • Login

    Export to HLAC monolith unsupported samplerate error

    Scheduled Pinned Locked Moved General Questions
    18 Posts 4 Posters 927 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.
    • J
      Jerems134
      last edited by

      I use old sampler/drum machine samples at 12/16bits 24000Hz,
      when I export sample maps to HLAC monolith I've this error : HLAC monolith unsupported samplerate : 24000
      How to resolve this ?

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

        Just convert them to 48000kHz

        1 Reply Last reply Reply Quote 0
        • J
          Jerems134
          last edited by

          @Christoph-Hart Isn't possible to set bit rate of sampler module to 16 bit 24000Hz with script ?
          And force sampler to extract sample maps to HLAC monolith in this bitrate ?
          All of my samples are in the same format, I 've hundreds of samples to convert.
          Conversion will make a fake 44100 Hz.

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

            Use a batch converter, then it should be just a single click. If you use 48000 kHz the conversion will not change the signal (as it will just duplicate each sample from your source samplerate).

            The HLAC codec is fixed to 44,1, 48k, 88k or 96k and there is no point changing the entire codec for a edge case like this.

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

              @Christoph-Hart Ok, I'll do this. Thanks
              Edit : With conversion I loose loops metadata.
              To share my plugin, I 'll have to give a folder with the wav files, I can't use the HLAC monolith : (

              d.healeyD 1 Reply Last reply Reply Quote 0
              • d.healeyD
                d.healey @Jerems134
                last edited by

                @Jerems134 Use a converter that preserves loops, SoX might do this

                Libre Wave - Freedom respecting instruments and effects
                My Patreon - HISE tutorials
                YouTube Channel - Public HISE tutorials

                J 1 Reply Last reply Reply Quote 1
                • J
                  Jerems134 @d.healey
                  last edited by Jerems134

                  @d-healey I use Adobe Media encoder.
                  With SoX isn't too complicated to convert hundreds of samples ?

                  d.healeyD 1 Reply Last reply Reply Quote 0
                  • d.healeyD
                    d.healey @Jerems134
                    last edited by

                    @Jerems134 It's just a simple loop, you can almost certainly find a script to do it by Googling, what OS are you using?

                    Libre Wave - Freedom respecting instruments and effects
                    My Patreon - HISE tutorials
                    YouTube Channel - Public HISE tutorials

                    J 1 Reply Last reply Reply Quote 0
                    • J
                      Jerems134 @d.healey
                      last edited by

                      This post is deleted!
                      d.healeyD 1 Reply Last reply Reply Quote 0
                      • d.healeyD
                        d.healey @Jerems134
                        last edited by

                        @Jerems134 I'll post a script in a little while

                        Libre Wave - Freedom respecting instruments and effects
                        My Patreon - HISE tutorials
                        YouTube Channel - Public HISE tutorials

                        1 Reply Last reply Reply Quote 1
                        • d.healeyD
                          d.healey
                          last edited by

                          Well I can't get SoX or FFMPEG to retain the loops unfortunately, but it could just be me using the wrong commands. I've asked some others to see if they know a solution for that.

                          In the meantime you could try Reaper, it can definitely export loop points and it can do batch export.

                          There are a few ways to do it, first I'd try the batch file convert tool, if that doesn't work I'd just import all of your samples on to a single track, extract the loop points as markers and then do a batch export (with embedded markers enabled).

                          I show this second technique in this video:
                          https://youtu.be/90SmO_dMIJs?t=993

                          Libre Wave - Freedom respecting instruments and effects
                          My Patreon - HISE tutorials
                          YouTube Channel - Public HISE tutorials

                          J 1 Reply Last reply Reply Quote 1
                          • J
                            Jerems134 @d.healey
                            last edited by

                            @d-healey Ok thank for taking time to find a solution. Adobe media encoder keeps the original metadata normally, but not the loop start/end too.
                            I 'll share the wav files with my plugin, it's too complicated to use SoX with the terminal or import/export in an DAW with the amount of samples I 've to convert.
                            Thanks for all things you do for Hise community, i follow you on Patreon.

                            d.healeyD 1 Reply Last reply Reply Quote 0
                            • d.healeyD
                              d.healey @Jerems134
                              last edited by

                              @Jerems134

                              it's too complicated to use SoX with the terminal

                              Just run this script and it will convert a whole folder of wavs to 48k (no loop points yet though).

                              to48khz.zip

                              Libre Wave - Freedom respecting instruments and effects
                              My Patreon - HISE tutorials
                              YouTube Channel - Public HISE tutorials

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

                                Another option is to "fix" the loop points inside HISE. Your basic samplerate is 24kHz when you've imported the samples and created the samplemaps, but now you've converted it to 48kHz. This means that every sample index is just being multiplied by 2, so if your loop start was at sample index 1000, it now needs to be at 2000.

                                Just drop this in a script processor that sits in a Sampler and it will operate on the currently loaded sample map (Be aware that if you paste this in the onInit callback it will get executed right away).

                                /** Select all samples in the current samplemap
                                    ".*" is Regex and means everything.
                                */
                                const var allSamples = Sampler.createSelection(".*");
                                
                                /** You'll get an array of all samples, which you can iterate */
                                for(s in allSamples)
                                {
                                    /** Just multiply all sample properties with 2 */
                                    s.set(Sampler.LoopStart, parseInt(s.get(Sampler.LoopStart)) * 2);
                                    s.set(Sampler.LoopEnd, parseInt(s.get(Sampler.LoopEnd)) * 2);
                                    s.set(Sampler.SampleEnd, parseInt(s.get(Sampler.SampleEnd)) * 2);
                                }
                                
                                /** This needs to be called after a sample manipulation op
                                    in order to refresh the UI. */
                                Sampler.refreshInterface();
                                
                                d.healeyD 1 Reply Last reply Reply Quote 3
                                • d.healeyD
                                  d.healey @Christoph Hart
                                  last edited by

                                  @Christoph-Hart Does this just need to be ran once, and then the sample map manually resaved?

                                  Libre Wave - Freedom respecting instruments and effects
                                  My Patreon - HISE tutorials
                                  YouTube Channel - Public HISE tutorials

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

                                    yup, it's just a shortcut to selecting each sample and typing in the values by hand.

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

                                      @Christoph-Hart Would it be possible to use some of this code to add controls to the user UI of the plugin itself and change the loop start and end points?

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

                                      1 Reply Last reply Reply Quote 0
                                      • d.healeyD
                                        d.healey
                                        last edited by

                                        Signet is the way to go - https://github.com/SamWindell/Signet/

                                        I just tested sample rate conversion and it does preserve the loop points.

                                        Libre Wave - Freedom respecting instruments and effects
                                        My Patreon - HISE tutorials
                                        YouTube Channel - Public HISE tutorials

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

                                        28

                                        Online

                                        1.7k

                                        Users

                                        11.8k

                                        Topics

                                        102.7k

                                        Posts