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

enhancement: Turn on/off metronome while playing #91

Open
takagiy opened this issue Dec 28, 2021 · 5 comments
Open

enhancement: Turn on/off metronome while playing #91

takagiy opened this issue Dec 28, 2021 · 5 comments

Comments

@takagiy
Copy link

takagiy commented Dec 28, 2021

This is a feature request.
I think editing would be easy if i can use a virtual metronome that counts the beats in accordance with the project's tempo value. Although UTAU doesn't have it, the feature is popular among many audio editing software (e.g. Piapro Studio the vocal synth editor).

@atoko
Copy link

atoko commented Apr 1, 2022

Hey,

I can take a look at this -- are there any concerns WRT running a second Media object to the same Media Player, or is it an exclusive channel? (In which case I'd have to instantiate a second MediaPlayer)

@atoko
Copy link

atoko commented Apr 1, 2022

MediaPlayer is monophonic, so as the issue mentioned, there needs to be a separate thread that synchronizes with the MediaPlayer object -- I have no knowledge of the internals, but a metronome could be implemented via the onMarker event, if processing event markers isn't too resource intensive on the CPU

@titinko
Copy link
Owner

titinko commented Apr 2, 2022

When making the debug instrumental feature, I just used two media players. To my knowledge there aren't any consequences to doing so. They run on separate threads by default as you can see in the playback method: https://github.com/titinko/utsu/blob/master/src/main/java/com/utsusynth/utsu/engine/Engine.java#L114

@atoko
Copy link

atoko commented Sep 18, 2022

@takagiy This has been implemented in #94, and is available as a branch. It would be useful to have this beta tested. One facet I'm not sure about is the metronome sound itself.

The current implementation uses a pitched, slightly distorted square wave as the sound, but I'm aware most metronomes use noise pulses. Is this something that should be configurable?

@takagiy
Copy link
Author

takagiy commented Sep 18, 2022

@atoko Lovely! Thanks so much for a lot of your works!
I think that the metronome sound can vary depending on software and has not to be realistic metronome sound.
In most cases, only one type of metronome sound is provided (not configurable).
Could you give me some days to try the latest implementation?

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

3 participants