How do I allow the user to load .wav files and for playback

Get help using Construct 2

Post » Wed May 25, 2016 4:13 pm

Is it currently possible to use the file chooser or perhaps something else to have the user load a .wav file and then be able to trigger that .wav file? I know you can load images etc but I'm not sure how one would go about what i'm looking to do since the sound/music sections are separately loaded currently. maybe i'm missing something, or maybe it's impossible. if anyone could point me in the right direction, even with third-party plugs that would be great!
B
9
S
1
Posts: 72
Reputation: 1,391

Post » Wed May 25, 2016 8:18 pm

phht.... I know its a little annoying to upload music.
right click on the music folder in project file listing (next tab of layers)
import, then select the music you want.
it should attempt to format the music file to what you need. once done, you have to choose the right formatted file for it to play through events.

I know there are specifically some files that cannot convert, so, a file converter is needed separetly. that's where i'm out.
B
9
S
3
Posts: 113
Reputation: 1,009

Post » Thu May 26, 2016 8:42 pm

thanks for the reply, but i guess i didn't explain myself completely.

i meant a way for the end user to load .wav files for playback. like if you made a drum machine and wanted it so the user could load their own samples into it.
B
9
S
1
Posts: 72
Reputation: 1,391

Post » Fri May 27, 2016 10:49 pm

As far as I'm aware you can't do it with the default audio object, which is a shame. Don't think you can load .wav specifically but someone made a music player using the video plugin instead - so if your samples are encoded in a specific way you could probably make something like a drum machine.

https://www.scirra.com/tutorials/1232/mixing-the-file-chooser-and-video-plugins-construct-2-music-player
B
67
S
25
G
4
Posts: 212
Reputation: 7,084

Post » Mon May 30, 2016 8:58 am

@signaljacker thanks, I'll check this out after work!
B
9
S
1
Posts: 72
Reputation: 1,391


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 11 guests