Skip to content

Export MIDI - Note velocity #4761

@zonkmachine

Description

@zonkmachine

Our note velocity go from 0 - 200 but midi note velocity is 0 - 127. In our export code we set anything over 127 to 127 so a track using the full range in lmms will export wrong.

mnote.volume = qMin(qRound(base_volume * LocaleHelper::toDouble(note.attribute("vol", "100"))), 127);

Example issue reported in the forum: https://lmms.io/forum/viewtopic.php?f=7&t=29497

Can we just divide note velocity in two when exporting?
Example, crude but working:

mnote.volume = qMin(qRound(base_volume * 0.635 * LocaleHelper::toDouble(note.attribute("vol", "100"))), 127);

@PhysSong

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions