Forum
    • Categories
    • Register
    • Login

    What’s the correct way to send an audio file from a HISE plugin to a backend server?

    Scheduled Pinned Locked Moved Scripting
    15 Posts 3 Posters 389 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.
    • D
      daniel_101 @David Healey
      last edited by

      This post is deleted!
      1 Reply Last reply Reply Quote 0
      • D
        daniel_101 @David Healey
        last edited by

        @David-Healey Okay, How do you mean? I don't see how I can do that because unless the backend server is also running on a users device, it can't access the file using its system path and my backend server is hosted on vercel

        David HealeyD 1 Reply Last reply Reply Quote 0
        • David HealeyD
          David Healey @daniel_101
          last edited by

          @daniel_101 Aha ok, when you said backend I didn't realise you meant a remote system. What about using cURL to upload the file to your server?

          Free HISE Bootcamp Full Course for beginners.
          YouTube Channel - Public HISE tutorials
          My Patreon - HISE tutorials

          D 1 Reply Last reply Reply Quote 0
          • dannytaurusD
            dannytaurus
            last edited by

            You can probably convert the audio file to Base64 and send that way. Only for small files though.

            Meat Beats: https://meatbeats.com
            Klippr Video: https://klippr.video

            D 1 Reply Last reply Reply Quote 0
            • D
              daniel_101 @David Healey
              last edited by

              @David-Healey Thanks david, Using cURL sounds nice. Can I use cURL within HISE while in production?
              I am currently using the Server.callWithPOST function but I can only send the file in a string format (in base64) or as a multipart/form-data format.

              David HealeyD 1 Reply Last reply Reply Quote 0
              • D
                daniel_101 @dannytaurus
                last edited by

                @dannytaurus Thanks Danny, Yes sending it as a base64 string seemed to the best approach and I've tried using the "File.loadAsBase64()" function to do that but the function on HISE did not return a valid base64 string, As I explained in a previous post and as of the latest update, isn't part of the "File" API anymore.
                I would be very grateful if there is any other way to convert a file to base64 in HISE.

                1 Reply Last reply Reply Quote 0
                • David HealeyD
                  David Healey @daniel_101
                  last edited by David Healey

                  @daniel_101 Yes I think curl should work across platforms, but older versions of Windows might be missing it. I can't remember the details there.

                  @daniel_101 said in What’s the correct way to send an audio file from a HISE plugin to a backend server?:

                  "File.loadAsBase64()" function to do that but the function on HISE did not return a valid base64 string,

                  The function is File.loadAsBase64String(); It's still in the API.

                  Free HISE Bootcamp Full Course for beginners.
                  YouTube Channel - Public HISE tutorials
                  My Patreon - HISE tutorials

                  D 1 Reply Last reply Reply Quote 0
                  • D
                    daniel_101 @David Healey
                    last edited by

                    @David-Healey said in What’s the correct way to send an audio file from a HISE plugin to a backend server?:

                    The function is File.loadAsBase64String(); It's still in the API.

                    Yes the File.loadAsBase64String() function used to exist on HISE but I did not seem to return a valid base64 string. And as of the HISE version I installed today, the File.loadAsBase64String(); no longer exists. Here's a screenshot picture from the HISE API interface:
                    alt text

                    David HealeyD 1 Reply Last reply Reply Quote 0
                    • David HealeyD
                      David Healey @daniel_101
                      last edited by

                      @daniel_101 said in What’s the correct way to send an audio file from a HISE plugin to a backend server?:

                      HISE version I installed today

                      Built from the develop branch?

                      Free HISE Bootcamp Full Course for beginners.
                      YouTube Channel - Public HISE tutorials
                      My Patreon - HISE tutorials

                      D 1 Reply Last reply Reply Quote 0
                      • D
                        daniel_101 @David Healey
                        last edited by

                        @David-Healey said in What’s the correct way to send an audio file from a HISE plugin to a backend server?:

                        Built from the develop branch?

                        To be honest, I do not know much about how the HISE github repo is structured, but I do not think its from the develop branch, because I downloaded from the Download Installer page on the HISE website. url: https://github.com/christophhart/HISE/releases

                        David HealeyD 1 Reply Last reply Reply Quote 0
                        • David HealeyD
                          David Healey @daniel_101
                          last edited by

                          @daniel_101 The release version is very much out of date. Follow the compilation instruction in my free bootcamp course.

                          Free HISE Bootcamp Full Course for beginners.
                          YouTube Channel - Public HISE tutorials
                          My Patreon - HISE tutorials

                          D 2 Replies Last reply Reply Quote 0
                          • D
                            daniel_101 @David Healey
                            last edited by

                            This post is deleted!
                            1 Reply Last reply Reply Quote 0
                            • D
                              daniel_101 @David Healey
                              last edited by

                              @David-Healey Thanks, David. I did take your courses earlier, they’re true life savers!
                              It also makes sense that the File.loadAsBase64String() function isn't available on the release version of HISE. I previously compiled HISE following your tutorial, but I ran into the issues I described in this forum post, where the string returned from File.loadAsBase64String() didn’t seem to be a valid base64 string. I’ll compile it again, and hopefully I won’t run into the same error. Thanks a lot!

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

                              13

                              Online

                              2.1k

                              Users

                              13.1k

                              Topics

                              113.6k

                              Posts