[Solved] How do I download/export an audio file?

1 favourites
  • 10 posts
From the Asset Store
Convert multiple Excel files into JSON files and import them into construct3.
  • Hi, I got an idea today to make a realistic sound generator. Basically Bfxr or Chiptune but for a bunch of realistic samples rather than retro style ones. I think C3's audio plugin has all of the audio effects and parameters I could ask for, but the one issue is actually installing the sound file after the changes are made. I tried using Browser's Invoke Download, but I couldn't see any way to use that to download an audio file. Does anybody know how to download a tagged sound file?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I'm not sure what you mean by "installing the sound file"... Can you clarify? Are you trying to generate audio using synthesis the way BFXR and other Chiptune plugins work? Or are you trying to use pre-recorded audio samples the way a sequencer would use them (playing the samples in a loop and pattern that you've created)? Or something else entirely?

  • Basically my plan is to import a bunch of recorded sound clips to the tool, and then make it so the user can alter any of the sounds (such as by applying one of the Audio effects to a sound tag by pressing a button), and then make it so you can download the altered sound as an mp3 or wav file. The part that I dont know is how to make it so you can download the altered sound as an mp4/wav.

  • I don't think C3 has a way to "record" audio, only to play it back... I'm willing to bet that you can do it using the WebAudio API in the JS side of C3. I'm going to guess it likely has something to do with what kind of output node you use... either way its a non-trivial task. I could be wrong though...

    You can always read through this and see if it'll get you closer to where you wanna be. https://stackoverflow.com/questions/21234902/record-sound-of-a-webaudio-apis-audio-context/53069676#53069676

    There might also be a way to do it by parsing the altered sounds into a BinaryData object, and then saving it out as a .wav, though I'm not sure how you'd capture the audio output as binary information in the first place.

  • I see… thanks for the response

  • Update: I have found a way to download the OG audio files! It doesnt work for the alterations yet, but that's progress.

    Edit: Also making it mp3 is pretty easy to say the least :P

  • It seems that you can only apply effects to tags, not the actual files. If anybody has any clue how to actually alter the original file, or make a new one, or download the tag I'd love to hear it.

  • The closest you can get to achieving this without delving into complex js scripting involving the Web Audio API and audio file formats is by using the Video Recorder plugin. You can record the modified audio as it plays and then trigger the download by passing VideoRecorder.RecordingURL as the URL.

    Here's how to do it:

  • The closest you can get to achieving this without delving into complex js scripting involving the Web Audio API and audio file formats is by using the Video Recorder plugin. You can record the modified audio as it plays and then trigger the download by passing VideoRecorder.RecordingURL as the URL.

    Here's how to do it:

    I didn't know you can record it as mp3. Thanks!

  • That's an awesome solution! I hadn't considered the Video Recorder at all. I'll have to remember that for my own project lol

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)