diff base/Pitch.h @ 1024:d1ce7a4a920b

Wire up note/octave stuff
author Chris Cannam
date Tue, 02 Dec 2014 17:53:17 +0000
parents 1f62a890da58
children 88b54a185a0a
line wrap: on
line diff
--- a/base/Pitch.h	Tue Dec 02 13:50:49 2014 +0000
+++ b/base/Pitch.h	Tue Dec 02 17:53:17 2014 +0000
@@ -70,6 +70,22 @@
                                               float concertA = 0.0);
 
     /**
+     * Return the MIDI pitch for the given note number (0-12 where 0
+     * is C) and octave number. The octave numbering system is based
+     * on the application preferences (default is C4 = middle C,
+     * though in previous SV releases that was C3).
+     */
+    static int getPitchForNoteAndOctave(int note, int octave);
+    
+    /**
+     * Return the note number (0-12 where 0 is C) and octave number
+     * for the given MIDI pitch. The octave numbering system is based
+     * on the application preferences (default is C4 = middle C,
+     * though in previous SV releases that was C3).
+     */
+    static void getNoteAndOctaveForPitch(int midiPitch, int &note, int &octave);
+
+    /**
      * Return a string describing the given MIDI pitch, with optional
      * cents offset.  This consists of the note name, octave number,
      * and optional cents. The octave numbering system is based on the