uk.org.toot.swingui.midiui
Class MidiColor

java.lang.Object
  extended by uk.org.toot.swingui.midiui.MidiColor

public class MidiColor
extends java.lang.Object

Support for an automatic hue/saturation/brightness color scheme. The idea is that: the hue represents an instrument. the saturation represents the note velocity (loud is more saturated). the brightness represents the selection state (selected is darker). And thus a consistent and reasonably attractive color scheme is possible with no user intervention.


Field Summary
static java.awt.Color BAR
           
static java.awt.Color BEAT
           
static java.awt.Color SIXTEENTH
           
static java.awt.Color SIXTYFOURTH
           
 
Constructor Summary
MidiColor()
           
 
Method Summary
static java.awt.Color asHSB(float hue, float saturation, float brightness)
           
static java.awt.Color getBackground(int prg)
           
static java.awt.Color getBackground(java.lang.String name)
           
static float getDrumHue(java.lang.String name)
           
static float getPitchedHue(java.lang.String name)
           
static void setBrightnessFactor(float aBrightnessFactor)
           
static void setSaturationFactor(float aSaturationFactor)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BAR

public static final java.awt.Color BAR

BEAT

public static final java.awt.Color BEAT

SIXTEENTH

public static final java.awt.Color SIXTEENTH

SIXTYFOURTH

public static final java.awt.Color SIXTYFOURTH
Constructor Detail

MidiColor

public MidiColor()
Method Detail

getPitchedHue

public static float getPitchedHue(java.lang.String name)

getDrumHue

public static float getDrumHue(java.lang.String name)

asHSB

public static java.awt.Color asHSB(float hue,
                                   float saturation,
                                   float brightness)

getBackground

public static java.awt.Color getBackground(java.lang.String name)

getBackground

public static java.awt.Color getBackground(int prg)

setSaturationFactor

public static void setSaturationFactor(float aSaturationFactor)

setBrightnessFactor

public static void setBrightnessFactor(float aBrightnessFactor)


Copyright © 2004, 2005, 2006, 2007 Steve Taylor. All Rights Reserved.