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

Dynamics on single notes #25

Closed
declension opened this Issue Dec 14, 2018 · 5 comments

Comments

Projects
None yet
3 participants
@declension
Copy link

declension commented Dec 14, 2018

I've been struggling getting Dyn Crescendo and Dyn Diminuendo working, eventually reduced down, for testing, to:

playDev 4 $ phrase [Dyn $ Diminuendo 0.5] . instrument ChoirAahs $ c 3 wn

...until I realised that this probably was working as intended - and Euterpea will never adjust the volume of a single note / chord, as they're adjusting the velocities of a stream of notes. Is that correct?

Could there be (or is there) support for these smooth dynamics - e.g. by MIDI expression sequences (discussed here at length)?

Oh and thanks for a great library 👍

@donya

This comment has been minimized.

Copy link
Member

donya commented Dec 14, 2018

Diminuendo and Crescendo are intended to work over sequences of multiple notes; it won't work with a single note. When using the MIDI back-end for Euterpea, a single note can't change its volume between the MIDI on/off events even if played with a sustained instrument like flute. There is no support for things like aftertouch that are typically used for within-note volume control in Euterpea and no plans to add it since it doesn't really fit with Euterpea's score-level view of music (it would require significant overhauling of certain design choices made very early in Euterpea's history). The signal processing side of Euterpea is more flexible in that regard and you can do volume changes in highly customized ways over the course of a single note.

I notice you are using Music Pitch (what you get from c 3 wn), which sets the default volume very high, so Crescendo simply won't work in that case. Use Music (Pitch,Volume) to work with dynamics. There are some examples of how to work with dynamics in this closed issue: #24

@declension

This comment has been minimized.

Copy link

declension commented Dec 14, 2018

There is no support for things like aftertouch that are typically used for within-note volume control in Euterpea and no plans to add it since it doesn't really fit with Euterpea's score-level view of music (it would require significant overhauling of certain design choices made very early in Euterpea's history).

OK as I thought then and thanks for the explanation.

I notice you are using Music Pitch (what you get from c 3 wn), which sets the default volume very high, so Crescendo simply won't work in that case. Use Music (Pitch,Volume) to work with dynamics. There are some examples of how to work with dynamics in this closed issue: #24

Yes I read #24 earlier actually... and in the non-simplified code I've got addVolumes everywhere with lowish values so plenty of room dynamically.

I guess we can close this - although perhaps it would be good to update the docs / LHS comments to help others with these subtleties (I could have a stab at a PR if that helps).

@donya

This comment has been minimized.

Copy link
Member

donya commented Dec 15, 2018

For a number of reasons I don't merge pull requests. If there are comments in the code that are incorrect in some way, do let me know which line numbers and I will fix it. However, documentation is largely being built up on the website these days (euterpea.com under API & tutorials), so the comments in the library code itself will be fairly minimal and isn't meant to serve as a substitute for a tutorial.

@seanmcl

This comment has been minimized.

Copy link

seanmcl commented Dec 15, 2018

@donya Have you written anywhere about your philosophy about why you don’t merge pull requests? Is it license/legal stuff? General software maintence philosophy? Just curious.

Thanks.

@donya

This comment has been minimized.

Copy link
Member

donya commented Dec 15, 2018

In short, it's because of the fact that most PRs have zero documentation.

Where bug fixes are concerned, I want to understand exactly what the issue is and why it needs to be fixed a certain way (and to be convinced that it is the correct way to do it - not everyone understands off the bat why certain design choices were made in Euterpea). So, I do not trust code that is put in without explanation (as is often the case for PRs) and don't want to have to pick through it and formulate that explanation myself if the creator of it could simply provide it. A detailed explanation in words is far more useful to me and saves me time in comparison. While it is not impossible that a PR could contain that, most don't and I want to encourage thorough explanation of problems. If the community didn't behave as does did in that regard, I wouldn't be so anti-PR.

For feature requests, new things only get added if they are requested repeatedly over a significant amount of time and after serious consideration in the context of Euterpea's existing user base, its use as an educational tool, backwards compatibility, and Paul's original goals for the library. PRs are not an appropriate place for that since things need to be discussed thoroughly.

That said, I am happy to receive issue reports on more of less whatever - bugs, features, questions, etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment