Closed atsushieno closed 4 years ago
Magical8bitPlug2 now generates sound on aaphostsample.
SARAH: the plugin indeed processes note events, but for the final float outpu for each cycle, it is aeg
(amp EG) * osc
but osc
only goes up around 0.13 and aeg
not likely much higher, so I assume the final wav output is almost quiet.
Magical8bitPlug2 generates sound on AudioPluginHost too.
The differences between aaphostsample and AudioPluginHost are:
I figured out why OB-Xd does not generate output - it expects AudioPlayHead (via getPlayHead()
) exists. Without that it does not call synth.setPlayHead()
and no synthesis results are given back.
OB-Xd still fails to generate audible results even after I implemented AudioPlayback for JuceAAPWrapper. But I think I figured out why it happens.
ObxdAudioProcessor::processMidiPerSample()
handles all the midi inputs in the buffer at AudioProcessor.processBlock()
and for current aaphostsample, that means those note-off messages are handled at the same time.
Therefore, what would "fix" the problem is, that we implement aaphostsample MIDI messaging to not send note-offs in the same packet. It should be fairly doable.
That was only part of the problem. Problem # 2 is that OBXdAudioProcessor (or any audio hprocessor?) expects output channels come first then input channels follow, whereas we handle the other way. Not sure if there is any indication on which pointer is which.
With af6d79d all those sample synths are working with aaphostsample!
juceaaphost is still weird. OB-Xd always crashes. Any other synths generate sound, but their key is weird. Also it frequently crashes. Needs further investigation.
Since juceaaphost issue smells like another kind of bug, I would close this issue and file new one.
While JUCE AudioPluginHost generates some audio outputs for Andes, it only generates noises on OBXd and Magical8bitPlug2. And no synth generates valid sound on aaphostsample.
Since MDA pianos generate valid outputs on both hosts it is specific to JUCE based instruments. Weird is that Andes still generates audible sound on aaphostsample...
It is confirmed on juce6 branch.