diff examples/AmplitudeFollower.cpp @ 49:aa64a46320d4

* Rename "name" and "description" to "identifier" and "name"; add new "description" that actually contains a description
author cannam
date Mon, 26 Feb 2007 18:08:48 +0000
parents be8fdfe25693
children 933fee59d33a
line wrap: on
line diff
--- a/examples/AmplitudeFollower.cpp	Thu Jan 25 13:39:31 2007 +0000
+++ b/examples/AmplitudeFollower.cpp	Mon Feb 26 18:08:48 2007 +0000
@@ -66,15 +66,21 @@
 }
 
 string
-AmplitudeFollower::getName() const
+AmplitudeFollower::getIdentifier() const
 {
     return "amplitudefollower";
 }
 
 string
+AmplitudeFollower::getName() const
+{
+    return "Amplitude Follower";
+}
+
+string
 AmplitudeFollower::getDescription() const
 {
-    return "Amplitude Follower";
+    return "Track the amplitude of the audio signal";
 }
 
 string
@@ -124,9 +130,10 @@
     OutputList list;
 
     OutputDescriptor sca;
-    sca.name = "amplitude";
+    sca.identifier = "amplitude";
+    sca.name = "Amplitude";
+    sca.description = "";
     sca.unit = "V";
-    sca.description = "Amplitude";
     sca.hasFixedBinCount = true;
     sca.binCount = 1;
     sca.hasKnownExtents = false;
@@ -143,8 +150,9 @@
     ParameterList list;
 	
     ParameterDescriptor att;
-    att.name = "attack";
-    att.description = "Attack time";
+    att.identifier = "attack";
+    att.name = "Attack time";
+    att.description = "";
     att.unit = "s";
     att.minValue = 0.0f;
     att.maxValue = 1.f;
@@ -154,8 +162,9 @@
     list.push_back(att);
     
     ParameterDescriptor dec;
-    dec.name = "release";
-    dec.description = "Release time";
+    dec.identifier = "release";
+    dec.name = "Release time";
+    dec.description = "";
     dec.unit = "s";
     dec.minValue = 0.0f;
     dec.maxValue = 1.f;
@@ -167,20 +176,20 @@
     return list;
 }
 
-void AmplitudeFollower::setParameter(std::string paramname, float newval)
+void AmplitudeFollower::setParameter(std::string paramid, float newval)
 {
-    if (paramname == "attack") {
+    if (paramid == "attack") {
         m_clampcoef = newval;
-    } else if (paramname == "release") {
+    } else if (paramid == "release") {
         m_relaxcoef = newval;
     }
 }
 
-float AmplitudeFollower::getParameter(std::string paramname) const
+float AmplitudeFollower::getParameter(std::string paramid) const
 {
-    if (paramname == "attack") {
+    if (paramid == "attack") {
         return m_clampcoef;
-    } else if (paramname == "release") {
+    } else if (paramid == "release") {
         return m_relaxcoef;
     }