[SUGGESTION] Create audio list with C2

Discussion and feedback on Construct 2

Post » Tue Apr 25, 2017 11:22 am

Hello, I think it is not possible to create a playlist in C2.

I mean put songs to a list, then run the list (play list "name") and make the songs run automatically.
As an option it would be well to choose to run without spaces of silence, then one of the other.
I mean, the songs go from one to another without spaces of time, without silences.

The idea is to be able to create a list of music files or sound that are reproduced next without needing control by the user.
Last edited by The Mnk on Wed Apr 26, 2017 10:20 am, edited 1 time in total.
B
30
S
13
G
21
Posts: 838
Reputation: 14,656

Post » Tue Apr 25, 2017 9:14 pm

Hi, construct can do it.

When finish music1 then play music2.

For spaces of time: you can cut (edit) the audio file befor import to construct 2 project, or u can set the time u want to star to play.

Cheers.
https://www.facebook.com/TeslaPCgames

https://www.twitter.com/TeslaPCGames

[email protected]

http://www.synergy-studios.net
B
45
S
21
G
58
Posts: 113
Reputation: 32,427

Post » Tue Apr 25, 2017 9:40 pm

Between tick and tick there are 16 msec. , I think the silences are not removed from the editor. Editing audio files would not work.
B
30
S
13
G
21
Posts: 838
Reputation: 14,656

Post » Tue Apr 25, 2017 9:55 pm

You can try this.

Image

When the audiofile 1, tag "1". Is playing, then triggered once while true, seek to 5 seconds.

Cheers.
https://www.facebook.com/TeslaPCgames

https://www.twitter.com/TeslaPCGames

[email protected]

http://www.synergy-studios.net
B
45
S
21
G
58
Posts: 113
Reputation: 32,427

Post » Tue Apr 25, 2017 10:51 pm

You need to be clearer on what exactly you're asking for. Are you talking like a regular playlist of multiple songs? Sure, that's simple. My audio player on my performance music website is done in C2 here. Are you talking about seamless transitioning between segments of music for an adaptive/interactive soundtrack? That's also totally doable but not as simple as using something like wwise or fmod in other engines. As far as the 16ms thing with ticks, there's an event option to schedule audio to play at absolutely precise moments regardless of events or framerate/dt hitches. So for the soundtrack in Courier, I schedule segments of music based on the playback times of previous audio files.

So maybe tell us what you're trying to achieve. That will be far more useful than something so broad.
B
103
S
38
G
19
Posts: 962
Reputation: 17,996

Post » Tue Apr 25, 2017 11:25 pm

The Mnk wrote:Hello, I think it is not possible to create a playlist in C2.

I mean put songs to a list, then run the list (play list "name") and make the songs run automatically.
As an option it would be well to choose to run without spaces of silence, then one of the other.
I mean, the songs go from one to another without spaces of time, without silences.


you mean like this?

Function PlaySong()
Play SongArray[x] as tag "CurrentSong"

On "Current Song" Ended
Wait 2 seconds
Add 1 to x
PlaySong()
B
100
S
33
G
16
Posts: 1,204
Reputation: 16,865

Post » Tue Apr 25, 2017 11:29 pm

Suppose you have a song divided into 4 parts.
You want the four parts to sound one after another without silences, otherwise the song will sound bad.

That's what I want to do.
B
30
S
13
G
21
Posts: 838
Reputation: 14,656

Post » Wed Apr 26, 2017 12:08 am

If u can do a simple capx, maybe i can help to u.
https://www.facebook.com/TeslaPCgames

https://www.twitter.com/TeslaPCGames

[email protected]

http://www.synergy-studios.net
B
45
S
21
G
58
Posts: 113
Reputation: 32,427

Post » Wed Apr 26, 2017 12:26 am

Okay, tomorrow I'll take the example.
Now I have a little sleep -_-
B
30
S
13
G
21
Posts: 838
Reputation: 14,656

Post » Wed Apr 26, 2017 12:53 am

The Mnk wrote:Suppose you have a song divided into 4 parts.
You want the four parts to sound one after another without silences, otherwise the song will sound bad.

That's what I want to do.


depends on how you cut the music but in that case I would probably do:

Set overlap to 1 //number of seconds to overlap tracks

Function PlaySong()
Play SongArray[x] as tag "CurrentSong"

Compare 2 values: Audio.PlaybackTime("CurrentSong") > (Audio.Duration("CurrentSong") - overlap)
Add 1 to x
PlaySong()

If you want seamless music that is constant - meaning from a track with an abrupt end cut and seamlessly goes into another track you could try it OnEnd of Audio, then trigger the next track.. but it really depends on the music and how you start/end the track. there might be a small pop or silence that sounds like a pop.. thats why I'd start it before the end.. even 0.05 would prevent the pop.. but you have to make sure there's no beat in the music that will be messed up by offsetting the tracks. But again, it depends on how you make the tracks.

If you are splitting tracks into 4 parts, most likely you want to mix and match parts.. or loop certain parts? What exactly are you trying to do? there might be a better way..
B
100
S
33
G
16
Posts: 1,204
Reputation: 16,865

Next

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 8 guests