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

add amplitude parameter to sonify.pitch_contour #266

Merged
merged 3 commits into from
Nov 10, 2017

Conversation

rabitt
Copy link
Contributor

@rabitt rabitt commented Nov 1, 2017

Adds an optional amplitude parameter to sonify.pitch_contour that applies an amplitude envelope to the pitch contour.

@craffel
Copy link
Collaborator

craffel commented Nov 2, 2017

Thanks @rabitt ! I am traveling until Monday, so if someone else with push access wants to CR before then feel free. Looks like for now at least the test needs to be updated to fix Travis.

Copy link
Collaborator

@ejhumphrey ejhumphrey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ha! awesome, I wrote a worse version of this myself the other day. just the one q


# Test with explicit amplitude
x = mir_eval.sonify.pitch_contour(times, freqs, fs, length=fs * 7,
amplitude=amps)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this work? isn't the kwarg named amplitudes (plural)?

@rabitt rabitt force-pushed the sonify-pitch-contour-amplitude branch from 3c11083 to b3e470e Compare November 7, 2017 16:20
@rabitt rabitt force-pushed the sonify-pitch-contour-amplitude branch from b3e470e to 3498505 Compare November 7, 2017 18:48
@rabitt
Copy link
Contributor Author

rabitt commented Nov 7, 2017

Hmmm...I think something in Travis unrelated (?) to this change is broken... @craffel any ideas?

@craffel
Copy link
Collaborator

craffel commented Nov 7, 2017

My guess is that this is due to a breaking Matplotlib release. I will create a separate issue.

@craffel
Copy link
Collaborator

craffel commented Nov 9, 2017

Testing issue should be resolved via #268 thanks to @bmcfee .

@rabitt
Copy link
Contributor Author

rabitt commented Nov 9, 2017

@ejhumphrey @craffel I think this is good to go?

Copy link
Collaborator

@craffel craffel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor docstring change otherwise good to go.

else:
# build an amplitude interpolator
a_interp = interp1d(
times * fs, amplitudes, kind=kind,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you change the docstring for kind so that it reads

Interpolation mode for the frequency and amplitude values.

@craffel craffel merged commit d00cdd6 into mir-evaluation:master Nov 10, 2017
@craffel
Copy link
Collaborator

craffel commented Nov 10, 2017

Thanks!

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

Successfully merging this pull request may close these issues.

3 participants