Can I use an extended class of Oscillator like this :
- Class MyWave extends Oscillator
- {
- /* list of amplitudes point : every point is automatically insert in this array when user create dot(x,y) */
- public float[] s = {0, 0.12f, 0.21f, 0.26f, 0.4f, 0.51f,0.68f, 0.89f, 1f, 0.88f, 0.66f , 0.39f , 0.14f , -0.09f , -0.36f , -0.52f , -0.68f ,
- -0.77f , -0.79f , -0.7f , -0.44f , -0.11f , 0.19f , 0.39f , 0.54f , 0.62f , 0.69f , 0.74f , 0.56f , 0.15f , 0 };
- public MyWave (float frequency, float amplitude, float sampleRate)
- {
- super (frequency, amplitude, simpleRate);
- }
- public void generate(float[] signal)
- {
- for (int i = 0; i < s.size() ; i++)
- {
- signal [ i ] = s [i];
- }
- }
- //MONO
- public void generate(float[] sigLeft, float [] sigRight)
- {
- generate(sigLeft); generate(sigRight);
- }
- }