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

slight variation of dynamics #98

Open
RustoMCSpit opened this issue Mar 16, 2024 · 5 comments
Open

slight variation of dynamics #98

RustoMCSpit opened this issue Mar 16, 2024 · 5 comments

Comments

@RustoMCSpit
Copy link

every time a note is played there should be a very, very tiny variation of the dynamics to make it sound more human

@juleskers
Copy link
Collaborator

Oof, I had to look up what "dynamics" meant (my last experience with musical theory was a few weeks of long-since-forgotten pianolessons, and a middle school music teacher who never showed up..)

Do I understand correctly: slight volume changes for each note?
The android API allows some control of playback volume, per note-playing-event.

The piece of code that actually triggers playing is here:

pool.play(samples[keyIdx], 1, 1, 1, 0, 1f);

We use the Android SoundPool.play(,,)-API, to give you some indication as to what is easily achievable from the technical side (of note: parameters leftVolume, rightVolume, loop-count, rate).

@RustoMCSpit
Copy link
Author

Do I understand correctly: slight volume changes for each note?

yeah! having it randomly be slightly louder or softer makes it a bit more human and less robotic

@nicolasbrailo
Copy link
Owner

I don't think we could achieve a close effect by using the volume control APIs, to come close we'd need a filter to control the timbre, and a compressor we can use to change attack and release times. Would be an awesome change, but we'd need to rewrite the entire audio playback "backend" (there is no "backend" now, actually, we'd need to build one :))

@RustoMCSpit thank you for all your suggestions, I think they are awesome and it'll probably take me a while to go through them and see how feasible they are, but I think you are looking for a different app. Pianoli is not really a music app, it's a game for children, that happens to have sound playing capabilities in the shape of a piano.

A music app similar to this app would be built on top of a sound engine or DAW, something that can be used to process [real time] audio. Pianoli doesn't have any of those capabilities, it can only read mp3 files and play them. It would be awesome to rebuild the app on top of an audio engine, but that'd be Pianoli V2 pretty much from scratch. I'd be delighted to help get PRs landed, but I don't think I'd work on that myself any time soon.

@RustoMCSpit
Copy link
Author

theyre just suggestions dont worry, do whatever you want. thnak you for your kindness

@nicolasbrailo
Copy link
Owner

nicolasbrailo commented Mar 25, 2024 via email

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