soundvision/UnityProject/Assets/Scripts/PdConnection/PdSpectrumBind.cs

27 lines
581 B
C#
Raw Normal View History

2019-09-29 10:00:16 +00:00
using UnityEngine;
namespace cylvester
{
public interface IPdSpectrumBind
{
2019-09-29 16:04:26 +00:00
IPdArray PdArray { get; }
2019-09-29 17:47:17 +00:00
int Energy { get; set; }
2019-09-29 10:00:16 +00:00
}
2019-09-29 16:04:26 +00:00
[ExecuteInEditMode]
2019-09-29 10:00:16 +00:00
public class PdSpectrumBind : MonoBehaviour, IPdSpectrumBind
{
public int channel;
public Rect rectangularSelection;
2019-09-29 16:04:26 +00:00
private PdArray pdArray_;
2019-09-29 10:00:16 +00:00
2019-09-29 16:04:26 +00:00
private void Awake()
2019-09-29 10:00:16 +00:00
{
2019-09-29 16:04:26 +00:00
pdArray_ = new PdArray("fft_" + channel, 512);
2019-09-29 10:00:16 +00:00
}
2019-09-29 17:47:17 +00:00
public IPdArray PdArray => pdArray_;
public int Energy { get; set; }
2019-09-29 10:00:16 +00:00
}
}