flutter_midi
flutter_midi copied to clipboard
Velocity parameter
Hi, First, great library! Is there any way of adding velocity (or volume) to the notes played?
thanks
Still slowly working on a new version in rust that would give me more control on all the platforms. Currently there is a 2 different synths on iOS and android
Thanks for letting me know!
Hey, I'm using the flutter_midi (very nice library!) in a personal project and I expanded the "playMidiNote" method to accept a velocity parameter for iOS and Android. You said you're working on a new version in rust, but would you maybe be interested in a pull request for until then? The main call changes as follows:
Future<String?> playMidiNote({required int midi,int velocity=127}) async {
return _channel.invokeMethod('play_midi_note', {'note': midi,'velocity':velocity});
}
The velocity parameter is then processed by each platform (iOS and Android) accordingly, with actually very few changes.
@MrHazee I have created a branch with velocity support. Could you give it a try and tell me if it works well for you?
https://github.com/kNoAPP/flutter_midi/tree/velocity
Thanks! Sure, will try it out as soon as possible
ons 10 nov. 2021 kl. 20:23 skrev Alden Bansemer @.***>:
@MrHazee https://github.com/MrHazee I have created a branch with velocity support. Could you give it a try and tell me if it works well for you?
https://github.com/kNoAPP/flutter_midi/tree/velocity
— You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/rodydavis/flutter_midi/issues/30#issuecomment-965666111, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD7PK7WLKCKQDNP2CNRFVF3ULLBDLANCNFSM43F4XQMQ .
That's amazing! Thank you 🙏🏼
Could you make a PR?
@rodydavis The velocity branch is branched from the Android Embedded PR I created. I'm using this library for another project, so I needed both the new embedded system and velocity in a branch right away.
I don't want to PR velocity just yet because it would house commits from an unrelated issue. Once #36 is tested and makes it in, I'll go back and do a separate PR for this velocity stuff.
Hello! So the PR #36 has been merged. Now, it would be great to create a new PR in order to introduce https://github.com/kNoAPP/flutter_midi/commit/b46db8ea5a950063c7baf6fb7e12ebe4c9e7cc09 into this tree. @kNoAPP any plans about this? @rodydavis while you are working on your new Rust version, I think this library could still be useful as is. Perhaps it could continue to evolve on its own? What are the plans for it, now?
Thank you!
Hello! So the PR #36 has been merged. Now, it would be great to create a new PR in order to introduce kNoAPP@b46db8e into this tree. @kNoAPP any plans about this? @rodydavis while you are working on your new Rust version, I think this library could still be useful as is. Perhaps it could continue to evolve on its own? What are the plans for it, now?
Thank you!
https://github.com/rodydavis/flutter_midi/pull/37