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

Can't Understand #1

Closed
HsiangNianian opened this issue Aug 5, 2022 · 2 comments
Closed

Can't Understand #1

HsiangNianian opened this issue Aug 5, 2022 · 2 comments
Labels
question Further information is requested

Comments

@HsiangNianian
Copy link

So what do decimals in the output mean? Pitch?Screenshot_2022-08-05-10-28-18-93_9e8df3d0c7c1f50248b6ee043a653d26.jpg

@Possseidon
Copy link
Owner

Possseidon commented Aug 5, 2022

Check out examples/4-event-signatures.lua. It's not 100% complete, but has descriptions (or at least sufficiently meaningful parameter names) for the basic midi events.

For your question in particular, noteOn has three parameters, namely channel, key and velocity.

  • channel is a number between 0 and 15.
  • key is the pitch (always an integer, that's just how midi works). You can check out this table for what they mean.
  • velocity the one you weren't sure about. velocity here means how loud the note is.
    Basically 0.0 means the same as noteOff (and is often used interchangeably) and 1.0 means maximum volume.

Note that noteOff also has a velocity parameter, which will pretty much always be 0.0.

You can also take a look at this table that lists all the different midi events.

@Possseidon Possseidon added the question Further information is requested label Aug 5, 2022
@HsiangNianian
Copy link
Author

Check out examples/4-event-signatures.lua. It's not 100% complete, but has descriptions (or at least sufficiently meaningful parameter names) for the basic midi events.

For your question in particular, noteOn has three parameters, namely channel, key and velocity.

  • channel is a number between 0 and 15.
  • key is the pitch (always an integer, that's just how midi works). You can check out this table for what they mean.
  • velocity the one you weren't sure about. velocity here means how loud the note is.
    Basically 0.0 means the same as noteOff (and is often used interchangeably) and 1.0 means maximum volume.

Note that noteOff also has a velocity parameter, which will pretty much always be 0.0.

You can also take a look at this table that lists all the different midi events.

我懂了!谢谢你!

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

No branches or pull requests

2 participants