[Suggestion] About sounds

Discussion and feedback on Construct 2

Post » Mon Sep 24, 2012 12:57 am

The Audio object doesn't support multiple tags yet, it's been on my todo list a while but hopefully will come some time. FYI the expression "music" & "title_loop" is identical to "musictitle_loop" after concatenation, so will definitely be treated as a single tag.

Whether or not audio loops seamlessly depends on the browser. I tried your example but I don't know how long I have to wait. AFAIK Chrome supports seamless loops, but Firefox and possibly other browsers don't yet.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Mon Sep 24, 2012 1:29 am

The pre loop song is about 17 seconds and the looped song is 2 min and 4 seconds long.

I mainly use Chrome and the gaps are there for me. In Firefox the gap is more noticeable than in Chrome. I also exported it with Awesomium. Awesomium switched from the first song to the second song seamlessly, but when it looped the second song there was a gap.

Good to know that multiple tags are planned. Shoulda figured that the "&" would just put the tags together.

Not sure if it's of any use for C2, but there's a new codec I heard about recently. It's called Opus and afaik it's built specifically for internet use in mind, and it's also been standardized.

http://www.opus-codec.org/
B
73
S
20
G
10
Posts: 524
Reputation: 9,896

Post » Mon Sep 24, 2012 2:45 pm

We're watching the opus codec, but no browsers support it yet, and until *every* browser does then it will only further complicate things. We really want to avoid a third codec unless it can replace the existing two, and that is likely a couple years away. (Standardisation is very pre-emptive.)

I've definitely had Chrome looping audio seamlessly - the rain demo loops the rain sound, which is seamless in Chrome (but not Firefox). Are you sure the audio file itself actually loops seamlessly?
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Mon Sep 24, 2012 5:01 pm

[QUOTE=Ashley] What do you mean by a family of sounds? I think you need to explain your idea in more detail because I can't think what you mean by that.[/QUOTE]

I was talking about make a type of Family for sounds, so, when you change any setting for that family, it affect all the sounds inside it, also, it's easy and intuitive to bring in/out any sound, instead of write manually each sound tag on the event system (preventing mistakes and misspellings).

These last days I took to learn everything about sound in C2, reading any post and tutorial on the Scirra Community, the gap to loop a sound is the main issue. I was trying to increase the speed of a sound to simulate a engine using a single stroke sound, but give up it because of the gap issue.

Now I'll re-do the sound events to search where is the lack making the sound volume don't update when updating the Master_Sound global variable.TELLES08082012-09-24 17:18:53
ImageImageImageImageImageImage
B
93
S
20
G
12
Posts: 1,213
Reputation: 18,484

Post » Tue Sep 25, 2012 12:45 am

[QUOTE=Ashley]Are you sure the audio file itself actually loops seamlessly?[/QUOTE]

Completely, at least regarding the versions of the files that I myself have exported.

I actually went and checked all versions of the files that I have, including the ones that C2 saves in the exported folders. I have the original files in mp3, wav, and ogg in a separate folder from where I import them to C2.

The way I check if the files loop properly is I put them in Foobar and queue them up then listen for gaps when the file switches.

I first checked the files that C2 produces from importing the wav version.
When the player switches files the gap is there too. So I checked the original wav, the gap is there too.

So I went on to check the ogg versions. They loop perfectly. No gap, no nothing. So I tried importing them directly into C2, skipping importing the wav version (losing the m4a's is not a big deal for me anyway). I tested it again in both preview and exported versions, the gap is there still. Lastly I just copied the files that I know loop perfecly directly into the media folder of the exported project. Still a gap. I also tested the exported project on my laptop, same thing there

At first I thought it was due to how C2 re-encodes the files when you import them. But I checked the exported files from when I just imported the ogg's into C2, and they looped as intended. That the files C2 made from the imported wav didn't loop properly was half-expected, because wav has never been good with looping. I avoid using wav anywhere I can, if I can.

Am I guessing right that when you checked my link you didn't notice any gaps?
B
73
S
20
G
10
Posts: 524
Reputation: 9,896

Post » Tue Sep 25, 2012 1:36 am

I did a sound looping perfectly by using FL Studio, and after exporting it play perfectly on player, without gap, but when on Preview on the browser, you can hear the gap.

That race car game I shared on another topic have a engine stroke sound, I did the sound 10 times longer to avoid the gap on every stroke, but when it finish, gap, start over again, etc.

If the sound played as intended, one single stroke could be sufficient (because the sound is a sequence of a single stroke in looping for 10 times), just making the sound to loop, also, We could increase the play rate between each stroke to simulate the gain of engine rotation.
ImageImageImageImageImageImage
B
93
S
20
G
12
Posts: 1,213
Reputation: 18,484

Post » Tue Sep 25, 2012 5:40 am

@TELLES0808
I guess I could see some usefulness in Sound Families, but I don't think they're really all that needed. Tags work really well in conjunction with global variables, and calling each individual sound isn't that big of a deal, especially since you can call sounds by name now rather than have to use a drag and drop list, in case you wanted to call sounds via variables or something. Still, it might streamline certain soundsets a bit more depending upon your project, though I doubt I'd ever have need for Sound Families (and I'm a musician!).

@inkBot
Are you talking about intro tracks transitioning seamlessly into the loop section, or the loop section itself not repeating seamlessly?

For the first one, are you experiencing this while previewing or are did you play it uploaded online? I've experienced an issue during previewing where the intro and loop sections had a noticeable gap, but when they were uploaded to dropbox and played online the gap was gone. Of course, I had to make sure the loop was preloaded at the start of the layout before the intro finished so that it could just play it instantly. I also opted to import the music as "Sounds" and play them as "Sounds", mostly because I feel I get a better sound and better loop.

If you're talking about the loop having a gap between repetitions, then I don't know what to tell you. I tend to test on Chrome and all my looping tracks loop fine (at least when they're played online).
B
58
S
20
G
7
Posts: 305
Reputation: 8,804

Post » Tue Sep 25, 2012 9:48 am

[QUOTE=TL22]
Are you talking about intro tracks transitioning seamlessly into the loop section, or the loop section itself not repeating seamlessly?
[/QUOTE]
Both.
[QUOTE=TL22]
For the first one, are you experiencing this while previewing or are did you play it uploaded online?
[/QUOTE]
Both.
[QUOTE=TL22]
I also opted to import the music as "Sounds" and play them as "Sounds", mostly because I feel I get a better sound and better loop.
[/QUOTE]
Haven't tried that, not completely sure why there would be be much of a difference.
B
73
S
20
G
10
Posts: 524
Reputation: 9,896

Post » Wed Sep 26, 2012 10:28 pm

[QUOTE=TL22] @TELLES0808
I guess I could see some usefulness in Sound Families, but I don't think they're really all that needed. Tags work really well in conjunction with global variables, and calling each individual sound isn't that big of a deal, especially since you can call sounds by name now rather than have to use a drag and drop list, in case you wanted to call sounds via variables or something. Still, it might streamline certain soundsets a bit more depending upon your project, though I doubt I'd ever have need for Sound Families (and I'm a musician!).

@inkBot
Are you talking about intro tracks transitioning seamlessly into the loop section, or the loop section itself not repeating seamlessly?

For the first one, are you experiencing this while previewing or are did you play it uploaded online? I've experienced an issue during previewing where the intro and loop sections had a noticeable gap, but when they were uploaded to dropbox and played online the gap was gone. Of course, I had to make sure the loop was preloaded at the start of the layout before the intro finished so that it could just play it instantly. I also opted to import the music as "Sounds" and play them as "Sounds", mostly because I feel I get a better sound and better loop.

If you're talking about the loop having a gap between repetitions, then I don't know what to tell you. I tend to test on Chrome and all my looping tracks loop fine (at least when they're played online).[/QUOTE]

Thank you TL22, I think it can help beginners, but not sure. As a suggestion, it need to be analysed, and if really helpful, made.
ImageImageImageImageImageImage
B
93
S
20
G
12
Posts: 1,213
Reputation: 18,484

Post » Wed Sep 26, 2012 10:39 pm

I imported the files as sounds instead of music and it now loops seamlessly for the most part.

Seems the issue mainly lies with how C2 handles the "music" part.
B
73
S
20
G
10
Posts: 524
Reputation: 9,896

PreviousNext

Return to Construct 2 General

Who is online

Users browsing this forum: Unconnected and 2 guests