Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Velocity parameter #30

Open
MrHazee opened this issue Apr 19, 2021 · 10 comments
Open

Velocity parameter #30

MrHazee opened this issue Apr 19, 2021 · 10 comments

Comments

@MrHazee
Copy link

MrHazee commented Apr 19, 2021

Hi,
First, great library!
Is there any way of adding velocity (or volume) to the notes played?

thanks

@MrHazee MrHazee changed the title Can´t setVolume Missing velocity parameter Apr 19, 2021
@MrHazee MrHazee changed the title Missing velocity parameter Velocity parameter Apr 19, 2021
@rodydavis
Copy link
Owner

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

@MrHazee
Copy link
Author

MrHazee commented Apr 20, 2021

Thanks for letting me know!

@Thiagohgl
Copy link

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.

@kNoAPP
Copy link
Contributor

kNoAPP commented Nov 10, 2021

@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

@MrHazee
Copy link
Author

MrHazee commented Nov 11, 2021 via email

@rodydavis
Copy link
Owner

That's amazing! Thank you 🙏🏼

@rodydavis
Copy link
Owner

Could you make a PR?

@kNoAPP
Copy link
Contributor

kNoAPP commented Nov 11, 2021

@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.

@aalex
Copy link

aalex commented Aug 6, 2023

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!

@kNoAPP
Copy link
Contributor

kNoAPP commented Aug 6, 2023

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!

#37

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants