src/codeandchords/ModuleMenu.java
public void addKeySelector(int xVal, int keyY)
	{
		int	listWidth		= 25;

		int	buttonWidth		= 50;
		int	toggleWidth		= ((this.sidebarWidth - this.leftAlign - listWidth - (this.spacer * 2) - this.rightEdgeSpacer - buttonWidth) / 3 ) - this.spacer;
		int	majorX			= xVal + this.leftAlign + listWidth + spacer;
		int	minorX			= xVal + this.leftAlign + listWidth + spacer + (toggleWidth + spacer);
		int	chromX			= xVal + this.leftAlign + listWidth + spacer + ((toggleWidth + spacer) * 2);
		int	guideToneX		= xVal + this.leftAlign + listWidth + spacer + ((toggleWidth + spacer) * 3);


		// "Key" Textlabel
		this.controlP5.addTextlabel("key")
		.setPosition(xVal + this.labelX, keyY + 4)
		.setValue("Key")
		.moveTo("sensitivity");


		// "Letter" drop-down menu (better name?)
		this.controlP5.addScrollableList("keyDropdown")
		.setPosition(xVal + this.leftAlign, keyY)
		.setWidth(listWidth)
		.setBarHeight(18)
		.setItems(this.allNotes)
		.setOpen(false)
		.setValue(0f)
		.moveTo("sensitivity")
		.getCaptionLabel().toUpperCase(false);

		// Maj/Min/Chrom Toggles
		// (These each have an internalValue - 0 = Major, 1 = Minor, and 2 = Chromatic - 
		//  and will set this.majMinChrom to their value when clicked.)
		this.controlP5.addToggle("major")
		.setPosition(majorX, keyY)
		.setWidth(toggleWidth)
		.setCaptionLabel("Major")
		.moveTo("sensitivity")
		.setInternalValue(0);
		this.controlP5.getController("major").getCaptionLabel().align(ControlP5.CENTER, ControlP5.CENTER);

		this.controlP5.addToggle("minor")
		.setPosition(minorX, keyY)
		.setWidth(toggleWidth)
		.setCaptionLabel("Minor")
		.moveTo("sensitivity")
		.setInternalValue(1);
		this.controlP5.getController("minor").getCaptionLabel().align(ControlP5.CENTER, ControlP5.CENTER);

		this.controlP5.addToggle("chrom")
		.setPosition(chromX, keyY)
		.setWidth(toggleWidth)
		.setCaptionLabel("Chrom.")
		.moveTo("sensitivity")
		.setInternalValue(2);
		this.controlP5.getController("chrom").getCaptionLabel().align(ControlP5.CENTER, ControlP5.CENTER);

		((Toggle)(this.controlP5.getController("chrom"))).setState(true);

		// Guide Tone pop-out Button:
		this.controlP5.addToggle("guideToneButton")
		.setPosition(guideToneX, keyY)
		.setWidth(buttonWidth)
		.setCaptionLabel("Guide Tones")
		.moveTo("sensitivity")
		.setValue(false);
		this.controlP5.getController("guideToneButton").getCaptionLabel().align(ControlP5.CENTER, ControlP5.CENTER);

	}
/**
	 * Method called during instantiation to initialize the key selector drop-down menu (ScrollableList)
	 * and major/minor/chromatic selection buttons.
	 * 
	 * @param keyY	y value of the menu and buttons.
	 */
Method called during instantiation to initialize the key selector drop-down menu (ScrollableList)
and major/minor/chromatic selection buttons.

@param keyY  y value of the menu and buttons.
Method called during instantiation to initialize the key selector drop - down menu ( ScrollableList ) and major / minor / chromatic selection buttons . @param keyY y value of the menu and buttons .
public void addKeySelector(int xVal, int keyY)
	{
		int	listWidth		= 25;
		int	buttonWidth		= 50;
		int	toggleWidth		= ((this.sidebarWidth - this.leftAlign - listWidth - (this.spacer * 2) - this.rightEdgeSpacer - buttonWidth) / 3 ) - this.spacer;
		int	majorX			= xVal + this.leftAlign + listWidth + spacer;
		int	minorX			= xVal + this.leftAlign + listWidth + spacer + (toggleWidth + spacer);
		int	chromX			= xVal + this.leftAlign + listWidth + spacer + ((toggleWidth + spacer) * 2);
		int	guideToneX		= xVal + this.leftAlign + listWidth + spacer + ((toggleWidth + spacer) * 3);
		this.controlP5.addTextlabel("key")
		.setPosition(xVal + this.labelX, keyY + 4)
		.setValue("Key")
		.moveTo("sensitivity");
		this.controlP5.addScrollableList("keyDropdown")
		.setPosition(xVal + this.leftAlign, keyY)
		.setWidth(listWidth)
		.setBarHeight(18)
		.setItems(this.allNotes)
		.setOpen(false)
		.setValue(0f)
		.moveTo("sensitivity")
		.getCaptionLabel().toUpperCase(false);
		this.controlP5.addToggle("major")
		.setPosition(majorX, keyY)
		.setWidth(toggleWidth)
		.setCaptionLabel("Major")
		.moveTo("sensitivity")
		.setInternalValue(0);
		this.controlP5.getController("major").getCaptionLabel().align(ControlP5.CENTER, ControlP5.CENTER);
		this.controlP5.addToggle("minor")
		.setPosition(minorX, keyY)
		.setWidth(toggleWidth)
		.setCaptionLabel("Minor")
		.moveTo("sensitivity")
		.setInternalValue(1);
		this.controlP5.getController("minor").getCaptionLabel().align(ControlP5.CENTER, ControlP5.CENTER);
		this.controlP5.addToggle("chrom")
		.setPosition(chromX, keyY)
		.setWidth(toggleWidth)
		.setCaptionLabel("Chrom.")
		.moveTo("sensitivity")
		.setInternalValue(2);
		this.controlP5.getController("chrom").getCaptionLabel().align(ControlP5.CENTER, ControlP5.CENTER);
		((Toggle)(this.controlP5.getController("chrom"))).setState(true);
		this.controlP5.addToggle("guideToneButton")
		.setPosition(guideToneX, keyY)
		.setWidth(buttonWidth)
		.setCaptionLabel("Guide Tones")
		.moveTo("sensitivity")
		.setValue(false);
		this.controlP5.getController("guideToneButton").getCaptionLabel().align(ControlP5.CENTER, ControlP5.CENTER);
	}
public void addKeySelector ( int xVal , int keyY ) { int listWidth = 25 ; int buttonWidth = 50 ; int toggleWidth = ( ( this . sidebarWidth - this . leftAlign - listWidth - ( this . spacer * 2 ) - this . rightEdgeSpacer - buttonWidth ) / 3 ) - this . spacer ; int majorX = xVal + this . leftAlign + listWidth + spacer ; int minorX = xVal + this . leftAlign + listWidth + spacer + ( toggleWidth + spacer ) ; int chromX = xVal + this . leftAlign + listWidth + spacer + ( ( toggleWidth + spacer ) * 2 ) ; int guideToneX = xVal + this . leftAlign + listWidth + spacer + ( ( toggleWidth + spacer ) * 3 ) ; this . controlP5 . addTextlabel ( "key" ) . setPosition ( xVal + this . labelX , keyY + 4 ) . setValue ( "Key" ) . moveTo ( "sensitivity" ) ; this . controlP5 . addScrollableList ( "keyDropdown" ) . setPosition ( xVal + this . leftAlign , keyY ) . setWidth ( listWidth ) . setBarHeight ( 18 ) . setItems ( this . allNotes ) . setOpen ( false ) . setValue ( 0f ) . moveTo ( "sensitivity" ) . getCaptionLabel ( ) . toUpperCase ( false ) ; this . controlP5 . addToggle ( "major" ) . setPosition ( majorX , keyY ) . setWidth ( toggleWidth ) . setCaptionLabel ( "Major" ) . moveTo ( "sensitivity" ) . setInternalValue ( 0 ) ; this . controlP5 . getController ( "major" ) . getCaptionLabel ( ) . align ( ControlP5 . CENTER , ControlP5 . CENTER ) ; this . controlP5 . addToggle ( "minor" ) . setPosition ( minorX , keyY ) . setWidth ( toggleWidth ) . setCaptionLabel ( "Minor" ) . moveTo ( "sensitivity" ) . setInternalValue ( 1 ) ; this . controlP5 . getController ( "minor" ) . getCaptionLabel ( ) . align ( ControlP5 . CENTER , ControlP5 . CENTER ) ; this . controlP5 . addToggle ( "chrom" ) . setPosition ( chromX , keyY ) . setWidth ( toggleWidth ) . setCaptionLabel ( "Chrom." ) . moveTo ( "sensitivity" ) . setInternalValue ( 2 ) ; this . controlP5 . getController ( "chrom" ) . getCaptionLabel ( ) . align ( ControlP5 . CENTER , ControlP5 . CENTER ) ; ( ( Toggle ) ( this . controlP5 . getController ( "chrom" ) ) ) . setState ( true ) ; this . controlP5 . addToggle ( "guideToneButton" ) . setPosition ( guideToneX , keyY ) . setWidth ( buttonWidth ) . setCaptionLabel ( "Guide Tones" ) . moveTo ( "sensitivity" ) . setValue ( false ) ; this . controlP5 . getController ( "guideToneButton" ) . getCaptionLabel ( ) . align ( ControlP5 . CENTER , ControlP5 . CENTER ) ; }
Method called during instantiation to initialize the key selector drop-down menu (ScrollableList)
 and major/minor/chromatic selection buttons.
Method called during instantiation to initialize the key selector drop - down menu ( ScrollableList ) and major / minor / chromatic selection buttons .
// "Key" Textlabel // "Letter" drop-down menu (better name?) // Maj/Min/Chrom Toggles // (These each have an internalValue - 0 = Major, 1 = Minor, and 2 = Chromatic -  //  and will set this.majMinChrom to their value when clicked.) // Guide Tone pop-out Button: