Hello,
I'm getting the following console error after intermittent intervals when using the processing.sound library. The sound cuts out, but the sketch continues to run.
Error
java.lang.NullPointerException
at com.jsyn.ports.InputMixingBlockPart.getValues(Unknown Source)
at com.jsyn.ports.UnitBlockPort.getValues(Unknown Source)
at com.jsyn.unitgen.SineOscillator.generate(Unknown Source)
at com.jsyn.unitgen.UnitGenerator.pullData(Unknown Source)
at com.jsyn.ports.PortBlockPart.pullData(Unknown Source)
at com.jsyn.ports.UnitInputPort.pullData(Unknown Source)
at com.jsyn.unitgen.UnitGenerator.pullData(Unknown Source)
at com.jsyn.ports.PortBlockPart.pullData(Unknown Source)
at com.jsyn.ports.UnitInputPort.pullData(Unknown Source)
at com.jsyn.unitgen.UnitGenerator.pullData(Unknown Source)
at com.jsyn.ports.PortBlockPart.pullData(Unknown Source)
at com.jsyn.ports.UnitInputPort.pullData(Unknown Source)
at com.jsyn.unitgen.UnitGenerator.pullData(Unknown Source)
at com.jsyn.ports.PortBlockPart.pullData(Unknown Source)
at com.jsyn.ports.UnitInputPort.pullData(Unknown Source)
at com.jsyn.unitgen.UnitGenerator.pullData(Unknown Source)
at com.jsyn.engine.SynthesisEngine.synthesizeBuffer(Unknown Source)
at com.jsyn.engine.SynthesisEngine.generateNextBuffer(Unknown Source)
at com.jsyn.engine.SynthesisEngine$EngineThread.run(Unknown Source)
I have not had a chance to test for long periods on another OS, but will do as soon as possible.
Setup
| OS | macOS 10.13.6 |
|---|
| Processing | 3.5.3 |
| SoundLibrary | 2.1.0 |
Code
//------------------------------------------------------------------------------------importprocessing.sound.*;
//------------------------------------------------------------------------------------int[] note = {96, 93, 91, 89, 86, 84, 81, 79, 77, 74, 72, 69, 67, 65, 62, 60};
Env[] env;
SinOsc[] sine;
floatattackTime = 0.004;
floatsustainTime = 0.004;
floatsustainLevel = 0.5;
floatreleaseTime = 0.7;
intbeat = 0;
intframesPerBeat = 7;
//------------------------------------------------------------------------------------voidsetup()
{
background(0);
sine = newSinOsc[note.length];
env = newEnv[note.length];
for (inti = 0; i < note.length; ++i)
{
sine[i] = newSinOsc(this);
sine[i].freq(midi2Hz(note[i]));
sine[i].amp(0.303);
env[i] = newEnv(this);
}
}
//------------------------------------------------------------------------------------voiddraw()
{
if (frameCount % framesPerBeat == 0)
{
env[beat].play(sine[beat], attackTime, sustainTime, sustainLevel, releaseTime);
beat++;
beat %= note.length;
}
}
//------------------------------------------------------------------------------------floatmidi2Hz(intmidiNoteNumber)
{
returnpow(2, float(midiNoteNumber - 69)/12.0) * 440.0f;
}
Hello,
I'm getting the following console error after intermittent intervals when using the processing.sound library. The sound cuts out, but the sketch continues to run.
Error
I have not had a chance to test for long periods on another OS, but will do as soon as possible.
Setup
macOS 10.13.63.5.32.1.0Code