Sammy1Am / MoppyClassic

Moppy has been replaced with Moppy 2.0!
568 stars 190 forks source link

Enhanced Realtime Playability #78

Closed Rev707 closed 10 years ago

Rev707 commented 10 years ago

Hello everybody,

This is my first time on Github and using Java and Netbeans, so I apologize beforehand for anything I did wrong or misunderstood. Also I don't know if there already was a fork implementing this feature.

Initially it was very difficult to play legato notes, because a NoteOff signal stopped all the notes when a key was released, even if another note was still running. With this addition a stop signal is only sent when the FDD should actually be silent. It makes playing with a keyboard in real time a LOT easier. It now plays the same as a single voice synthesizer, like for instance a lead synth.

I have tested it with my MIDI-keyboard and a single FDD connected to my Arduino. I hope I did everything correctly and if so, I would strongly recommend to implement this in the main build, because for a musician like me, it turns the real-time input from hardly to perfectly playable. I hope you like it

Sincerely, Rev707

Sammy1Am commented 10 years ago

Hi there!

First of all, thanks for taking the time to put together and test some code. =)

The functionality you're looking for should already (I think) be taken care of by the "Round Robin" channel pooling feature, which was specifically added to make real-time playing work better (especially if you have multiple drives available). If you choose 1-1 as inputs and 1-1 as outputs, each new note should be played on your single drive, and the drive will only stop playing if the currently playing note is turned off. I don't have my drives assembled to test this myself, but I read through the code and that looks like what it's doing (I'd be obliged if you'd give it a test and see).

That said, overlapping note events was not something I had originally designed for, and this is definitely still a shortcoming of the normal operation mode. The code you've provided though doesn't account for which channel the note messages are being sent on, and would behave unpredictably if used in a multi-channel setup (e.g. playing a multi-channel MIDI file through several drives).

For the time being, hopefully you'll find that drive pooling solves your problem. If I do ever revisit the code, I may work on making some adjustments to better handle overlapping note events though, since that might help with playing not-ideally-arranged MIDI files.