package net.mkonrad.synes.data.instruments;

import javax.vecmath.Point3f;

import net.mkonrad.synes.data.Beat;
import net.mkonrad.synes.data.Layer;
import net.mkonrad.synes.data.SynthInstrument;
import net.mkonrad.synes.data.SynthObj;
import net.mkonrad.synes.gui.elements.instruments.InstrumentShape;
import net.mkonrad.synes.gui.elements.instruments.PentagonShape;
import net.mkonrad.synes.gui.elements.instruments.TriangleShape;
import net.mkonrad.synes.gui.style.Colors;
import net.mkonrad.synes.util.Common3DTools;
import net.mkonrad.synes.util.DbgTools;
import net.mkonrad.synes.util.MusicTools;

public class Noise extends SynthInstrument
{
  public Noise()
  {
    super();
    _name = "synes_noise";
    _iconName = "noise.png";
    _texture = "triangle.png";
    _color = Colors.blue;
  }
  
  public boolean needsKeyboard()
  {
    return false;
  }
  
  public InstrumentShape createInstrumentShape(SynthObj synthData, Point3f pos)
  {
    return new TriangleShape(synthData, pos);
  }
  
  protected float getYArg(SynthObj synth)
  {
    return MusicTools.getPitchFromYCoord(synth.getInstrumentShape().getAbsPos().y);
  }
}
