yokemura / Magical8bitPlug2

GNU General Public License v3.0
301 stars 19 forks source link

Feature/mono mode #19

Closed yokemura closed 2 years ago

yokemura commented 3 years ago

Summary

resolves #8 resolves #9

Implemented Monophonic Mode.

Monophonic Mode includes

Technical Info

Extended Synthesizer to alter the note-on behavior. In Monophonic Mode, NoteOn is triggered only on the first key-on, and successive key-on just changes the parameter of the sounding note.

yokemura commented 3 years ago

I myself have used this feature for a month or so and have proven it's basically working.

But it still has a serious bug: Sometimes it stops sounding while using arpeggiator. I still haven't figured out how to reproduce it, but it's likely to happen when you have some notes where their note-offs have slight difference in time.

What I've found so far about the issue

yokemura commented 2 years ago

The issue above is now fixed.

It was happening when the MIDI channel of note-on and one of note-off are different. My MIDI sequence contained notes of different MIDI channels in a single track (it was because I merged some MIDI tracks without knowing they are designated to each MIDI destination). And it didn't happen while forwarding to IAC driver because IAC driver resends the event with its specified MIDI channel.

yokemura commented 2 years ago

TODO: Keep arpeggiated in release phase With current implementation it forgets the arpeggio notes immediately on a key-off. As result when the last key is released the arpeggio information is no longer available, and nothing sounds in the release phase. To avoid this it should remember the arpeggio notes for a while after the key-off. The problem is how long is "a while". If it's too long the tone will remain after key-off, which is not desirable. My idea is to move the arpeggio note retirement process to the place of arpeggio note alternation. This way the arpeggio info will be retained for 1 control frame at maximum. At least it will work with well-aligned sequence notes.

yokemura commented 2 years ago

Solved. It worked with my above idea.

yokemura commented 2 years ago

I used it for quite a bit of time and nothing seems to go wrong, so merge it.