coughlinjon

Smooth loop of singing audio clip

Recommended Posts

Hey everyone, I'll get straight to my question:

My character has several sing buttons. I need to smoothly loop a clear "ooo" singing tone when you hold a sing button.

Thus far I've recorded short "ooos" and "ahhhhs" at each tone on the major scale, but I don't have a good plan for initializing the tone and transitioning to a smooth loop to continue it.

How long should I make these tones to get a good loop?

Any Audacity tips for creating an audio file of a clear singing tone that smoothly loops?

Any Unity implementation tips?

Thanks!

Notes on the game:

I'm making a little prototype where you sing as part of a large choir. Right now the game controls with the keyboard, with each of your home row keys commanding your voice to a different pitch on the major scale.

Here are links to my concept art and my first in-game gif :)

https://drive.google.com/file/d/0B1p24Mtti2l1c1p0ZGpXbmZuM2s/view?usp=docslist_api

https://drive.google.com/file/d/0B1p24Mtti2l1bDB4NjNnNXFFeHc/view?usp=docslist_api

Share this post


Link to post
Share on other sites

I like your game idea and gifs! I have never made my own sound clips, but I have been dabbling with some music/tone stuff in some prototypes in Unity. I have never noticed any issues with just using the loop property on an audio source in what I'm doing. All of my sounds are midi and don't vary at all, so I don't notice any transition in the looping. I could see if it was an actual human, then any small variation might be noticeable.

Share this post


Link to post
Share on other sites

Try making an audio clip in audacity where you fade the clip in and out and then chain three, but so that the next one starts to fade in when the previous one is fading out. If you are careful with this, the volume should stay even. Then trim so you are left with the middle segment.

When you play it in unity, you will want to make it fade in somehow and then loop while keeping the volume constant.

This thread seems good for it, so does anyone know how to get some sort of envelope or adsr filter into unity?

Share this post


Link to post
Share on other sites

I like your game idea and gifs! I have never made my own sound clips, but I have been dabbling with some music/tone stuff in some prototypes in Unity. I have never noticed any issues with just using the loop property on an audio source in what I'm doing. All of my sounds are midi and don't vary at all, so I don't notice any transition in the looping. I could see if it was an actual human, then any small variation might be noticeable.

 

Where do you get your midi tones? I eventually want to use human voices, but right now they sound like garbage; I think that using midi sounds would be best for my prototype.

 

I think I'm close to getting a minimally playable build ready. I'll post here when it's up on itch so people can give me some first impressions :)

Share this post


Link to post
Share on other sites

They just fade a clip in and out when played. I just I can rig it with update and the audio source's volume. I guess an audio source can't play two clips at the same time?

Share this post


Link to post
Share on other sites

Depending on your game's aesthetics, there are plenty of audio plug-ins and programs that have synthesized choirs sounds. It might be easier to deal with those than a straight audio sample.

Share this post


Link to post
Share on other sites

They just fade a clip in and out when played. I just I can rig it with update and the audio source's volume. I guess an audio source can't play two clips at the same time?

 

That is correct, an audioSource can only play one clip at a time. There also used to be a limit of 100 audioSources active at a time just so you know. I got around it by trading them between gameObjects when necessary.

 

I have had success making volume fades by putting stuff in the Update() as you have suggested.

Share this post


Link to post
Share on other sites

Where do you get your midi tones? I eventually want to use human voices, but right now they sound like garbage; I think that using midi sounds would be best for my prototype.

 

I think I'm close to getting a minimally playable build ready. I'll post here when it's up on itch so people can give me some first impressions :)

 

I definitely doubt this is The Best Way to do this, but I use bosca ceoil to just play the tones I want. For my latest fiddling around, that has been just single notes. It seems to work well. If you were to make an entire scale, it is tedious, but somewhat zen. I think Dinosaurssss pointed me to bosca ceoil for something else, but this is what I'm using it for at the moment.

Share this post


Link to post
Share on other sites

That is correct, an audioSource can only play one clip at a time. There also used to be a limit of 100 audioSources active at a time just so you know. I got around it by trading them between gameObjects when necessary.

Ooh, I'll definitely need to do that. Cheers!

Share this post


Link to post
Share on other sites

Thanks for the help so far! I uploaded a super early windows build.

coughlinjon.itch.io

It's at the Chorus Boy page :) I'll keep uploading new builds as I fill out the features.

Share this post


Link to post
Share on other sites

Thanks for the help so far! I uploaded a super early windows build.

coughlinjon.itch.io

It's at the Chorus Boy page :) I'll keep uploading new builds as I fill out the features.

 

I messed around with it more than I expected! I can see the slight problem you're having with the looping as it is a little hiccup-y. Even though there is no game here yet, I enjoyed messing around with the one scale the little guy can belt out. Excited to see more soon!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now