RenderMan
RenderMan copied to clipboard
Update midi buffer
Thanks so much for your work on this project. I'm working on a master's degree right now and focusing on automatic synthesizer programming - so your work on this and the other work you have published on deep learning for synthesizer programming has been extremely helpful!
I tracked down a bit of an issue with the way that midi notes are being added to the buffer. Timestamps in MidiMessages are ignored in the MidiBuffer.addEvent method (this is true for v5.2.0 as well). This is causing midi notes to be triggered on every buffer iteration. This is also occurring for the note off MidiMessages once they begin to be triggered (less of an issue, but since the timestamp is being used, the message isn't being triggered on the correct sample).
This PR fixes that by ensuring that only one note on MidiMessage is sent during the first buffer, and then the note off MidiMessage is being set to the correct sample in the buffer.
Here is a waveform test rendering of a sine wave with no amplitude envelope:
before:
after:
Hey @jorshi thanks for the PR. I'm unable to support this project in a professional capacity, so I am wondering if you would like to become a collaborator to get this project in a state that is hopefully usable for yourself and others?
Hey @fedden thanks for the response - I would be pleased to become a collaborator on the project. Thank you for offering.
@fedden take his offer! Allow him to be a collaborator so he can merge it :)
Please excuse my inactivity on this - it's been a weird year - @jorshi you should have an invite. Thank you for your contributions