lib/minim/src/ddf/minim/analysis/BeatDetect.java
/**
	 * Set the object to use the requested algorithm. If an invalid value is
	 * passed, the function will report and error and default to
	 * BeatDetect.SOUND_ENERGY
	 * 
	 * @param algo
	 *           int: either BeatDetect.SOUND_ENERGY or BeatDetect.FREQ_ENERGY
	 *           
	 * @related BeatDetect
	 */
Set the object to use the requested algorithm. If an invalid value is
passed, the function will report and error and default to
BeatDetect.SOUND_ENERGY




Set the object to use the requested algorithm . If an invalid value is passed the function will report and error and default to BeatDetect . SOUND_ENERGY
public void detectMode(int algo)
	{
		if (algo < 0 || algo > 1)
		{
			Minim.error("Unrecognized detect mode, defaulting to SOUND_ENERGY.");
			algo = SOUND_ENERGY;
		}
		if (algo == SOUND_ENERGY)
		{
			if (algorithm == FREQ_ENERGY)
			{
				releaseFEResources();
				initSEResources();
				initGraphs();
				algorithm = algo;
			}
		}
		else
		{
			if (algorithm == SOUND_ENERGY)
			{
				releaseSEResources();
				initFEResources();
				initGraphs();
				algorithm = FREQ_ENERGY;
			}
		}
	}
public void detectMode ( int algo ) { if ( algo < 0 || algo > 1 ) { Minim . error ( "Unrecognized detect mode, defaulting to SOUND_ENERGY." ) ; algo = SOUND_ENERGY ; } if ( algo == SOUND_ENERGY ) { if ( algorithm == FREQ_ENERGY ) { releaseFEResources ( ) ; initSEResources ( ) ; initGraphs ( ) ; algorithm = algo ; } } else { if ( algorithm == SOUND_ENERGY ) { releaseSEResources ( ) ; initFEResources ( ) ; initGraphs ( ) ; algorithm = FREQ_ENERGY ; } } }
Set the object to use the requested algorithm.
Set the object to use the requested algorithm .