src/codeandchords/ModuleMenu.java
protected void applyHSBModulate()
	{
		if(this.hsbColors == null)	{	this.fillHSBColors();	}

		for(int i = 0; i < this.colors.length; i++)
		{
			//			if(this.firstColorSelectCWId > 0)
			//			{


			for (int j = 0; j < this.colors[i].length; j++)
			{
				float[] hsb 			= new float[3];

				// Converts this position of hsbColors from RGB to HSB:
				Color.RGBtoHSB(this.hsbColors[i][j][0], this.hsbColors[i][j][1], this.hsbColors[i][j][2], hsb);

				// Applies the status of the sliders to the newly-converted color:
				hsb[0] = (hsb[0] + this.hueSatBrightnessMod[0] + this.hueSatBrightPercentMod[0] + 1) % 1;
				hsb[1] = Math.max(Math.min(hsb[1] + this.hueSatBrightnessMod[1] + this.hueSatBrightPercentMod[1], 1), 0);
				hsb[2] = Math.max(Math.min(hsb[2] + this.hueSatBrightnessMod[2] + this.hueSatBrightPercentMod[2], 1), 0);

				// Converts the color back to RGB:
				int oc = Color.HSBtoRGB(hsb[0], hsb[1],  hsb[2]);
				Color a = new Color(oc);

				this.colors[i][j]	= new int[] { a.getRed(), a.getGreen(), a.getBlue() };

				// Sets the ColorWheels to the newly modded color:
				//					this.setColor(i, new int[] { a.getRed(), a.getGreen(), a.getBlue() }, false);
				/*					this.setColorSelectCW(i, new int[] { a.getRed(), a.getGreen(), a.getBlue() });
					int	specialColorsPos	= this.arrayContains(this.specialColorsPos[this.currentInput], i);
					if(specialColorsPos > -1)
					{
						this.setSpecialColorsCW(specialColorsPos, new int[] { a.getRed(), a.getGreen(), a.getBlue() });
					}
				 */
				//			((ColorWheel)this.controlP5.getController("colorWheel" + id)).setRGB(a.getRGB());
			} // for 
			//			} else {
			//				System.out.println("ModuleTemplate.applyHSBModulate: firstColorSelectCWId == " + this.firstColorSelectCWId + "; did not attempt to set ColorWheels.");
			//			} // else - let the user know that CWs not there and we didn't set them
		} // for

	}
/**
	 * Applies the values from this.hueSatBrightnessMod to the contents of the colors array parameter.
	 * @param colors	this.colors or this.legendColors
	 * @param hsbColors	this.hsbColors
	 */
Applies the values from this.hueSatBrightnessMod to the contents of the colors array parameter.
Applies the values from this . hueSatBrightnessMod to the contents of the colors array parameter .
protected void applyHSBModulate()
	{
		if(this.hsbColors == null)	{	this.fillHSBColors();	}
		for(int i = 0; i < this.colors.length; i++)
		{
			for (int j = 0; j < this.colors[i].length; j++)
			{
				float[] hsb 			= new float[3];
				Color.RGBtoHSB(this.hsbColors[i][j][0], this.hsbColors[i][j][1], this.hsbColors[i][j][2], hsb);
				hsb[0] = (hsb[0] + this.hueSatBrightnessMod[0] + this.hueSatBrightPercentMod[0] + 1) % 1;
				hsb[1] = Math.max(Math.min(hsb[1] + this.hueSatBrightnessMod[1] + this.hueSatBrightPercentMod[1], 1), 0);
				hsb[2] = Math.max(Math.min(hsb[2] + this.hueSatBrightnessMod[2] + this.hueSatBrightPercentMod[2], 1), 0);
				int oc = Color.HSBtoRGB(hsb[0], hsb[1],  hsb[2]);
				Color a = new Color(oc);
				this.colors[i][j]	= new int[] { a.getRed(), a.getGreen(), a.getBlue() };
				/*					this.setColorSelectCW(i, new int[] { a.getRed(), a.getGreen(), a.getBlue() });
					int	specialColorsPos	= this.arrayContains(this.specialColorsPos[this.currentInput], i);
					if(specialColorsPos > -1)
					{
						this.setSpecialColorsCW(specialColorsPos, new int[] { a.getRed(), a.getGreen(), a.getBlue() });
					}
				 */
			} 
		} 
	}
protected void applyHSBModulate ( ) { if ( this . hsbColors == null ) { this . fillHSBColors ( ) ; } for ( int i = 0 ; i < this . colors . length ; i ++ ) { for ( int j = 0 ; j < this . colors [ i ] . length ; j ++ ) { float [ ] hsb = new float [ 3 ] ; Color . RGBtoHSB ( this . hsbColors [ i ] [ j ] [ 0 ] , this . hsbColors [ i ] [ j ] [ 1 ] , this . hsbColors [ i ] [ j ] [ 2 ] , hsb ) ; hsb [ 0 ] = ( hsb [ 0 ] + this . hueSatBrightnessMod [ 0 ] + this . hueSatBrightPercentMod [ 0 ] + 1 ) % 1 ; hsb [ 1 ] = Math . max ( Math . min ( hsb [ 1 ] + this . hueSatBrightnessMod [ 1 ] + this . hueSatBrightPercentMod [ 1 ] , 1 ) , 0 ) ; hsb [ 2 ] = Math . max ( Math . min ( hsb [ 2 ] + this . hueSatBrightnessMod [ 2 ] + this . hueSatBrightPercentMod [ 2 ] , 1 ) , 0 ) ; int oc = Color . HSBtoRGB ( hsb [ 0 ] , hsb [ 1 ] , hsb [ 2 ] ) ; Color a = new Color ( oc ) ; this . colors [ i ] [ j ] = new int [ ] { a . getRed ( ) , a . getGreen ( ) , a . getBlue ( ) } ; /*					this.setColorSelectCW(i, new int[] { a.getRed(), a.getGreen(), a.getBlue() });
					int	specialColorsPos	= this.arrayContains(this.specialColorsPos[this.currentInput], i);
					if(specialColorsPos > -1)
					{
						this.setSpecialColorsCW(specialColorsPos, new int[] { a.getRed(), a.getGreen(), a.getBlue() });
					}
				 */ } } }
Applies the values from this.hueSatBrightnessMod to the contents of the colors array parameter.
Applies the values from this . hueSatBrightnessMod to the contents of the colors array parameter .
//			if(this.firstColorSelectCWId > 0) //			{ // Converts this position of hsbColors from RGB to HSB: // Applies the status of the sliders to the newly-converted color: // Converts the color back to RGB: // Sets the ColorWheels to the newly modded color: //					this.setColor(i, new int[] { a.getRed(), a.getGreen(), a.getBlue() }, false); //			((ColorWheel)this.controlP5.getController("colorWheel" + id)).setRGB(a.getRGB()); // for  //			} else { //				System.out.println("ModuleTemplate.applyHSBModulate: firstColorSelectCWId == " + this.firstColorSelectCWId + "; did not attempt to set ColorWheels."); //			} // else - let the user know that CWs not there and we didn't set them // for