Audio crossfade on single key press

Hi!
I’m trying to crossfade two audio clips on one key press but I just can’t wrap my head around it.
I have a game object with two children (both have an audio source).
The current script that I’m using works but not as intended.

using UnityEngine;
using System.Collections;

public class scr_MusicController : MonoBehaviour
{

    void Update()
    {
        if (Input.GetKeyDown("n"))
        {
            transform.FindChild("aud_Normal").audio.volume = 1;
            transform.FindChild("aud_8bit").audio.volume = 0;
        }
        if (Input.GetKeyDown("m"))
        {
            transform.FindChild("aud_Normal").audio.volume = 0;
            transform.FindChild("aud_8bit").audio.volume = 1;
        }
    }
}

I want to assign this cycle to single key and the volume increase to take one second to reach it’s assigned value (as well on the volume decrease of course).

I know this is a lot to ask but please, I’m stuck in here :confused:
Thanks for your help!

private IEnumerator ChangeMusic()
{
float fTimeCounter = 0f;

	while(!(Mathf.Approximately(fTimeCounter, 1f)))
	{
		fTimeCounter = Mathf.Clamp01(fTimeCounter + Time.deltaTime);
		audio1.volume = 1f - fTimeCounter;
		audio2.volume = fTimeCounter;
		yield return new WaitForSeconds(0.02f);
	}
	
	StopCoroutine("ChangeMusic");
}

audio1 is the AudioSource that you’re fading out while audio2 is the AudioSource that you’re fading in. Just modify the coroutine so that the variables correspond to what you need you actually need to alter.

By the way, what version of Unity are you using? I’ve never encountered FindChild before.