 
                             (xtract/xtract_peak_spectrum spectrum (double (/ block-size 2)) (xtract/doublea_to_voidp argv) peaks)
 
-                            (let [spectral-inharmonicity (spectral-inharmonicity
+;;                            public static int xtract_rms_amplitude(SWIGTYPE_p_double data, int N, SWIGTYPE_p_void argv, double[] result)
+
+                            (let [rms (double-array [0])
+                                  argv [(/ SAMPLERATE block-size)]
+
+                                  spectral-inharmonicity (spectral-inharmonicity
                                                           peaks block-size
-                                                          f0 0.5 NUM_HARMONICS 0)
-                                  r {:spectral-inharmonicity spectral-inharmonicity
-                                     :midi midi
-                                     :f0 f0}]
-                              {(* idx SAMPLERATE) r}))
+                                                          f0 0.5 NUM_HARMONICS 0)]
+
+                              (xtract/xtract_rms_amplitude ds block-size (apply xtract-args argv) rms)
+
+                              {(* idx SAMPLERATE)
+                               {:spectral-inharmonicity spectral-inharmonicity
+                                :rms_amplitude (first rms)
+                                :midi midi
+                                :f0 f0}
+                               }))
                               ;;(println "Magnitude Spectrum: " (pr-str (double->clojure spectrum block-size)))
                           )))))
                 s))

  (with-result
    (double-array [0])
    (fn [r] (xtract/xtract_spectral_inharmonicity peaks-data block-size (apply xtract-args args) r))))

(defn mean [vs]
  (let [result (double-array 1)



(defn peek-inside [sample-path]
  (let [path sample-path
        s    (sample/read-sound path)
        MFCC_FREQ_BANDS (double 13)
        MFCC_FREQ_MIN   (double 20)
        MFCC_FREQ_MAX   (double 20000)
        NUM_HARMONICS   10
        MFCC_FREQ_BANDS 13
        SAMPLERATE 44100
        data   (sample/chunks s SAMPLERATE)
