diff layer/SpectrogramLayer.cpp @ 71:72fa239a4880

* Modify to use Vamp SDK for proper feature extraction plugins. Requires that the vamp-plugin-sdk directory tree be present below plugin/ (it's separate in Subversion).
author Chris Cannam
date Fri, 31 Mar 2006 15:56:35 +0000
parents 7f608ec9a061
children dfdbf336bb37
line wrap: on
line diff
--- a/layer/SpectrogramLayer.cpp	Thu Mar 30 15:00:22 2006 +0000
+++ b/layer/SpectrogramLayer.cpp	Fri Mar 31 15:56:35 2006 +0000
@@ -223,7 +223,7 @@
     } else if (name == tr("Colour")) {
 
 	*min = 0;
-	*max = 5;
+	*max = 6;
 
 	deft = (int)m_colourScheme;
 
@@ -322,7 +322,8 @@
 	case 2: return tr("Black on White");
 	case 3: return tr("Red on Blue");
 	case 4: return tr("Yellow on Black");
-	case 5: return tr("Fruit Salad");
+	case 5: return tr("Blue on Black");
+	case 6: return tr("Fruit Salad");
 	}
     }
     if (name == tr("Colour Scale")) {
@@ -425,7 +426,8 @@
 	case 2: setColourScheme(BlackOnWhite); break;
 	case 3: setColourScheme(RedOnBlue); break;
 	case 4: setColourScheme(YellowOnBlack); break;
-	case 5: setColourScheme(Rainbow); break;
+	case 5: setColourScheme(BlueOnBlack); break;
+	case 6: setColourScheme(Rainbow); break;
 	}
     } else if (name == tr("Window Type")) {
 	setWindowType(WindowType(value));
@@ -961,6 +963,12 @@
 			    pixel / 4);
 	    break;
 
+        case BlueOnBlack:
+            colour = QColor::fromHsv
+                (240, pixel > 226 ? 256 - (pixel - 226) * 8 : 255,
+                 (pixel * pixel) / 255);
+            break;
+
 	case Rainbow:
 	    hue = 250 - pixel;
 	    if (hue < 0) hue += 256;
@@ -1201,6 +1209,8 @@
 
 SpectrogramLayer::Cache::~Cache()
 {
+    std::cerr << "SpectrogramLayer::Cache[" << this << "]::~Cache" << std::endl;
+
     for (size_t i = 0; i < m_width; ++i) {
 	if (m_magnitude && m_magnitude[i]) free(m_magnitude[i]);
 	if (m_phase && m_phase[i]) free(m_phase[i]);