import { NoteAsObject, PitchClass, Note } from '../types'; /** * Returns an array with numbers that represent the index of each pitch class as a number. * @param pitchClasses * @returns */ export declare function pitchClassesToNumbers(pitchClasses: Array): number[]; /** * Returns an array of notes with a specific octave. * @param {Array} pitchClasses Array of pitch classes. * @param {number} octave Octave to assign to notes.. * @returns {Array} */ export declare function pitchClassesToNotes(pitchClasses: Array, octave: number): Array; /** * * @param notes * @returns */ export declare function notesToPitchClasses(notes: Array): PitchClass[]; /** * Calculate the pure interval between 2 pitch classes. * @param {PitchClass} pitchClass1 first note * @param {PitchClass} pitchClass2 second note * @returns {number} * @example * getPitchClassesInterval('C', 'E') // 4 */ export declare function getPitchClassesInterval(pitchClass1: PitchClass, pitchClass2: PitchClass): number; /** * Returns the interval from one note to another. * @param note1 * @param note2 * @returns {number} * @example getNotesInterval('C3', 'G3'); // 7 */ export declare function getNotesInterval(note1: Note, note2: Note): number; /** * Returns the interval from one note to another. * Accepts both pitch classes and notes. * @param {PitchClass | Note} note1 * @param {PitchClass | Note} note2 * @returns {number} * @example getNotesInterval('C3', 'G3'); // 7 */ export declare function getInterval(note1: PitchClass | Note, note2: PitchClass | Note): number; /** * Returns sharp if a pitch class has a sharp, otherwise returns flat. * @param pitchClass * @returns * @example * getClassSet('C#') // '#' * getClassSet('C') // 'b' */ export declare function getClassSet(pitchClass: PitchClass): '#' | 'b'; /** * Returns an array of all natural music notes from set. * @param set */ export declare function getPitchClassSet(set: 'b' | '#' | ''): any; /** * Returns the octave from a note. * Assuming the octave is between -9 - 9. * @returns {*} * @param note */ export declare function extractOctave(note: string): string; /** * Returns the pitch class from a note. * @param note * @returns {*} */ export declare function extractPitchClass(note: string): string; /** * Transform a pitch class to it's basic form. * @param {String} pc * @returns {PitchClass} * @example * normalizePitchClass('CX') // 'D' */ export declare function normalizePitchClass(pc: PitchClass): PitchClass; export declare function normalizeNote(note: Note): Note; /** * Turns a note into an object with pitch class and octave. * @param {string} note Pitch as a string, e.g Ab3 * @returns {{octave: number, pitchClass: PitchClass}} */ export declare function noteToObject(note: Note): NoteAsObject; /** * Returns true if string is a pitch class, else false. * @param {string} str * @returns {boolean} */ export declare function isPitchClass(str: string): boolean; export declare function isNote(str: string): boolean; /** * Returns true if a note is a rest, else false. * @param {string} str * @returns {boolean} */ export declare function isRest(str: string): boolean; export declare function isDuration(dur: string): boolean; /** * Returns an object where the keys are raw notes and their value is an object with note & octave props. * @param {string} baseNote * @param {number} range * @returns {Array} */ export declare function notesInRange(baseNote: Note, range: number): Record; /** * Returns the index of a pitch class out of a pitch class. * @param pc * @returns {number} */ export declare function getPitchClassIndex(pc: PitchClass): number; /** * * @returns {string} * @param from * @param to */ export declare function enharmonicPitchClass(from: PitchClass, to: PitchClass): string; /** * Turns any sharp pitch class to flat. * @returns {String} * @param str */ export declare function toFlat(str: PitchClass | Note): PitchClass | Note; /** * Normalize any interval representation to a semitone of Number type. * @param {Number | String} interval * @returns {number} */ export declare function toSemitones(interval: number): number; /** * Returns the max interval from an array of intervals. * @param {Array} intervals * @returns {number} */ export declare function maxInterval(intervals: Array): number; /** * Returns the highest note between 2 notes. * @param {String} note1 * @param {String} note2 * @returns {String} */ export declare function highestNote(note1: Note, note2: Note): string; /** * Returns the lowest note between 2 notes. * @param {String} note1 * @param {String} note2 * @returns {String} */ export declare function lowestNote(note1: Note, note2: Note): Note; /** * Returns the lowest pitch between 2 pitch classes. * @param {String} pc1 * @param {String} pc2 * @returns {String} */ export declare function lowestPitch(pc1: PitchClass, pc2: PitchClass): PitchClass; /** * Returns the lowest note from an array of notes. * @param {Array} notes * @returns {String} */ export declare function lowestNoteFromArray(notes: Array): string; /** * Returns the highest note from an array of notes. * @param {Array} notes * @returns {Note} */ export declare function highestNoteFromArray(notes: Array): Note; /** * Turns an array of pitch classes to an array containing the interval between each 2 pitch classes. * @param pitchClasses * @returns */ export declare function getPatternFromPitchClasses(pitchClasses: Array): Array; /** * Turns an array of notes to an array containing the interval between each 2 notes. * @param notes * @returns */ export declare function getPatternFromNotes(notes: Array): Array;