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

Better volume translation? #16

Closed
dannye opened this issue Jan 22, 2015 · 4 comments
Closed

Better volume translation? #16

dannye opened this issue Jan 22, 2015 · 4 comments

Comments

@dannye
Copy link

dannye commented Jan 22, 2015

It doesn't seem like volume changes are properly reflected when going between formats.

@mtolly
Copy link
Owner

mtolly commented Jan 28, 2015

Do you mean using MIDI note velocity? Correct, currently it just uses the notetype text events to encode volume and ignores MIDI velocity. I'd change it if you have a suggestion for how it should work; the volume parameter (2nd arg to notetype) appears to range from 0 to 15, so should each of those get about 1/16 of the 1 to 127 MIDI velocity range?

@dannye
Copy link
Author

dannye commented Jan 28, 2015

I think it would be easier to work with if it translated midi velocity into notetype volume.
But yeah, I would do something like:
volume = velocity * 15/127
And I would probably round up no matter what so that any positive velocity guarantees a volume of at least 1.

Otherwise, how do I add text events like notetype in an editor like FL Studio?

@dannye
Copy link
Author

dannye commented Jan 28, 2015

It's worth noting that a volume of 0 is never used except for in dungeon1.asm:
https://github.com/iimarckus/pokered/blob/master/audio/music/dungeon1.asm#L232
But that's because the note that is being played immediately fades in.

A volume of 0 technically works, but creates a weird clicking sound every time a silent note is played, so it isn't useful really.

mtolly added a commit that referenced this issue Jul 5, 2015
midi velocity = 8 * (asm volume + 1) - 1
Part of #16
mtolly added a commit that referenced this issue Jul 5, 2015
@mtolly mtolly closed this as completed in 92f832c Jul 5, 2015
@mtolly
Copy link
Owner

mtolly commented Jul 5, 2015

I've released a new version 0.8 with this implemented. Let me know if it works as you expect!

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

2 participants