From 26f7676ef59b763b82a9ae743105fa0267f84ec0 Mon Sep 17 00:00:00 2001 From: Yotam Mann Date: Tue, 20 Sep 2016 18:35:49 -0400 Subject: [PATCH] frequency has a toFrequency MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit seems a little redundant, but it’s clearer. --- Tone/type/Frequency.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Tone/type/Frequency.js b/Tone/type/Frequency.js index bec97987..8f72583b 100644 --- a/Tone/type/Frequency.js +++ b/Tone/type/Frequency.js @@ -160,6 +160,14 @@ define(["Tone/core/Tone", "Tone/type/TimeBase"], function (Tone) { return 1 / this.eval(); }; + /** + * Return the value in Hertz + * @return {Frequency} + */ + Tone.Frequency.prototype.toFrequency = function(){ + return this.eval() + }; + /** * Return the duration of one cycle in ticks * @return {Ticks}