Object reference not set to an instance of an object

Hello im new to scripting and im getting an error trying to acces an component on other script a float value in a array i can figure out what im doing wrong please help and if its other ways of doing this

first this is the script that is accesing the value

#pragma strict
var audioSource : GameObject;
var cancion : sonido = audioSource.GetComponent(sonido);
  
function  Start (){

	if (cancion.band[6] > 0.3){
	
	Debug.Log ("mayor");
	}


}

this is the second one that is getting accesed

var freqData:float[] = new float[8192];

var listener : AudioListener;

 

var band:float[];

var g:GameObject[];

 

function Start()

{

    var n:int = freqData.length;

    var k:int = 0;

    for(var j=0;j<freqData.length;j++)

    {

        n /= 2;

        if(!n) break;

        k++;

    }

    band  = new float[k+1];

    g     = new GameObject[k+1];

    for (var i=0;i<band.length;i++)

    {

        band *= 0;*

g = new GameObject.CreatePrimitive(PrimitiveType.Sphere);

g*.transform.position = Vector3(i,0,0);*

}

InvokeRepeating(“check”, 0, 1.0/15.0); // update at 15 fps

}

function check()

{

listener.GetSpectrumData(freqData, 0, FFTWindow.Rectangular);

var k:int = 0;

var crossover:int = 2;

for(var i:int;i< freqData.length;i++)

{

var d = freqData*;*

var b = band[k];

band[k] = (d>b)? d:b; // find the max as the peak value in that frequency band.

if (i>crossover-3)

{

k++;

crossover *= 2; // frequency crossover point for each band.

g[k].transform.position.y = band[k]*32;

band[k] = 0;

}

}

}

private var sqrt = Mathf().Sqrt;

This simply means, as mattyman174 said that one of your variables is unassigned or not assigned to something that Unity expects.