Forum
    • Categories
    • Register
    • Login

    Audio Engine Sample Rate?

    Scheduled Pinned Locked Moved C++ Development
    3 Posts 2 Posters 46 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.
    • A
      Alatar
      last edited by

      Hi!

      Might be a strange question, but:
      I am wondering if the audio engine in HISE is using a fixed sample rate (like, say, always 48kHz) or if it is forwarding the DAW/host sample rate right through to the sample reading?

      Or in other words:
      If using a fixed sample rate, the audio engine would internally always run at 48kHz and would not be aware of the host sample rate. Of course at some point HISE would have to resample the internal sample rate to the host sample rate. But that would be very high up in the call chain. That would basically mean, HISE would have two points of resampling: first going from the WAV file sample rate to the internal audio engine sample rate. And later on going from the internal audio engine sample rate to the host sample rate.
      If on the other hand the whole audio engine is fully aware of the host sample rate, then only one point of resampling would be needed: going from the WAV files to the host sample rate.

      I am thinking about the case when you exported an instrument you made with HISE. I.e. how the exported instrument plugin handles it.

      I realise that I could just look through the C++ code. But the code is huge and would take me a bit of time to understand :-)

      griffinboyG 1 Reply Last reply Reply Quote 0
      • griffinboyG
        griffinboy @Alatar
        last edited by griffinboy

        @Alatar

        The sample rate conversion is immediate. It happens during runtime.
        The rate at which the sample is played back (in other words the pitch) takes project vs file sample rate into consideration.

        The sampler plays back the file at the right speed for whatever sample rate the Daw reports to the plugin.

        After all, a sampler that plays back sounds at a different pitch is a resampler by definition. So all the work can be done at the lowest level in the sampler, outputting the samples at the correct sample rate (speed) to begin with.

        A 1 Reply Last reply Reply Quote 0
        • A
          Alatar @griffinboy
          last edited by

          @griffinboy Yes, I am aware of that. But the question is: Is HISE using an internal sample rate, which is different from the host sample rate? It could use an internal sample rate, while still doing all the things you mentioned.
          Maybe my question is mostly for @Christoph-Hart :-)
          Or I should actually go and read the C++ code!

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

          37

          Online

          2.2k

          Users

          13.4k

          Topics

          116.9k

          Posts