var searchIndex = {}; searchIndex["pitch_calc"] = {"doc":"","items":[[0,"calc","pitch_calc","",null,null],[5,"difference_in_semitones","pitch_calc::calc","Find and return the smallest distance\nbetween two letters in semitones as an int.",null,{"inputs":[{"name":"letter"},{"name":"letter"}],"output":{"name":"semitones"}}],[5,"hz_from_letter_octave","","Calculate hz from (Letter, Octave).",null,{"inputs":[{"name":"letter"},{"name":"octave"}],"output":{"name":"hz"}}],[5,"hz_from_mel","","Calculate hz from mel.",null,{"inputs":[{"name":"mel"}],"output":{"name":"hz"}}],[5,"hz_from_perc","","Calculate frequency in hz from percentage.",null,{"inputs":[{"name":"perc"}],"output":{"name":"hz"}}],[5,"hz_from_scaled_perc","","Calculate hz from scaled percentage.",null,{"inputs":[{"name":"perc"},{"name":"weight"}],"output":{"name":"hz"}}],[5,"hz_from_step","","Calculate hz from pitch as `step`.",null,{"inputs":[{"name":"step"}],"output":{"name":"hz"}}],[5,"letter_octave_from_hz","","Calculate (Letter, Octave) from hz.",null,null],[5,"letter_octave_from_mel","","Calculate (Letter, Octave) from mel.",null,null],[5,"letter_octave_from_perc","","Calculate (Letter, Octave) from a frequency percentage.",null,null],[5,"letter_octave_from_scaled_perc","","Calculate (Letter, Octave) from a scaled frequency percentage.",null,null],[5,"letter_octave_from_step","","Calculate pitch as (Letter, Octave) from pitch as step.",null,null],[5,"mel_from_hz","","Calculate mel from hz.\nFormula used from http://en.wikipedia.org/wiki/Mel_scale",null,{"inputs":[{"name":"hz"}],"output":{"name":"mel"}}],[5,"mel_from_letter_octave","","Calculate mel from (Letter, Octave).",null,{"inputs":[{"name":"letter"},{"name":"octave"}],"output":{"name":"mel"}}],[5,"mel_from_perc","","Calculate mel from percentage.",null,{"inputs":[{"name":"perc"}],"output":{"name":"mel"}}],[5,"mel_from_scaled_perc","","Calculate mel from scaled percentage.",null,{"inputs":[{"name":"perc"},{"name":"weight"}],"output":{"name":"mel"}}],[5,"mel_from_step","","Calculate mel from step.",null,{"inputs":[{"name":"step"}],"output":{"name":"mel"}}],[5,"perc_from_hz","","Calculate percentage from hz.",null,{"inputs":[{"name":"hz"}],"output":{"name":"perc"}}],[5,"perc_from_letter_octave","","Calculate percentage from letter octave.",null,{"inputs":[{"name":"letter"},{"name":"octave"}],"output":{"name":"perc"}}],[5,"perc_from_mel","","Calculate percentage from mel.",null,{"inputs":[{"name":"mel"}],"output":{"name":"perc"}}],[5,"perc_from_scaled_perc","","Calculate percentage from scaled percentage.",null,{"inputs":[{"name":"perc"},{"name":"weight"}],"output":{"name":"perc"}}],[5,"perc_from_step","","Calculate frequency percentage from pitch as `step`.",null,{"inputs":[{"name":"step"}],"output":{"name":"perc"}}],[5,"scaled_perc_from_hz","","Calculate scaled percentage from hz.",null,{"inputs":[{"name":"hz"},{"name":"weight"}],"output":{"name":"perc"}}],[5,"scaled_perc_from_letter_octave","","Calculate scaled percentage from letter octave.",null,{"inputs":[{"name":"letter"},{"name":"octave"},{"name":"weight"}],"output":{"name":"perc"}}],[5,"scaled_perc_from_mel","","Calculate scaled percentage from mel.",null,{"inputs":[{"name":"mel"},{"name":"weight"}],"output":{"name":"perc"}}],[5,"scaled_perc_from_perc","","Calculate scaled percentage from percentage.",null,{"inputs":[{"name":"perc"},{"name":"weight"}],"output":{"name":"perc"}}],[5,"scaled_perc_from_step","","Calculate scaled frequency percentage from pitch as `step`.",null,{"inputs":[{"name":"step"},{"name":"weight"}],"output":{"name":"perc"}}],[5,"step_from_hz","","Calculate the pitch `step` from frequency in hz.",null,{"inputs":[{"name":"hz"}],"output":{"name":"step"}}],[5,"step_from_letter_octave","","Calculate the pitch `step` from (Letter, Octave).",null,{"inputs":[{"name":"letter"},{"name":"octave"}],"output":{"name":"step"}}],[5,"step_from_mel","","Calculate the pitch `step` from mel.",null,{"inputs":[{"name":"mel"}],"output":{"name":"step"}}],[5,"step_from_perc","","Calculate the pitch `step` from frequency precentage.",null,{"inputs":[{"name":"perc"}],"output":{"name":"step"}}],[5,"step_from_scaled_perc","","Calculate the pitch `step` from a scaled frequency precentage.",null,{"inputs":[{"name":"perc"},{"name":"weight"}],"output":{"name":"step"}}],[6,"Hz","","",null,null],[6,"Mel","","",null,null],[6,"Perc","","",null,null],[6,"Semitones","","",null,null],[6,"Step","","",null,null],[6,"Weight","","",null,null],[0,"hz","pitch_calc","",null,null],[3,"Hz","pitch_calc::hz","Pitch representation in the form of a frequency (hz).",null,null],[12,"0","","",0,null],[17,"MAX","","",null,null],[17,"MIN","","",null,null],[11,"decode","","",0,{"inputs":[{"name":"__d"}],"output":{"name":"result"}}],[11,"encode","","",0,null],[11,"clone","","",0,null],[11,"fmt","","",0,null],[11,"hz","","Return the unit value of the Hz struct.",0,null],[11,"letter_octave","","Convert to (Letter, Octave) tuple.",0,null],[11,"letter","","Convert to Letter.",0,null],[11,"octave","","Convert to Octave.",0,null],[11,"to_letter_octave","","Convert to a LetterOctave struct with the same pitch.",0,null],[11,"mel","","Convert to the unit value of a Mel.",0,null],[11,"to_mel","","Convert to a Mel struct.",0,null],[11,"perc","","Convert to the unit value of a Perc struct.",0,null],[11,"to_perc","","Convert to a percentage of the human hearing range.",0,null],[11,"scaled_perc_with_weight","","Convert to a scaled percentage of the human hearing range with a given weight.",0,null],[11,"scaled_perc","","Convert to a scaled percentage of the human hearing range.",0,null],[11,"to_scaled_perc_with_weight","","Convert to a scaled percentage of the human hearing range with a given weight.",0,null],[11,"to_scaled_perc","","Convert to a scaled percentage of the human hearing range.",0,null],[11,"step","","Convert to the unit value of a Step.",0,null],[11,"to_step","","Convert to a floating point MIDI-esque Step.",0,null],[11,"add","","",0,null],[11,"sub","","",0,null],[11,"mul","","",0,null],[11,"div","","",0,null],[11,"rem","","",0,null],[11,"neg","","",0,null],[11,"eq","","",0,null],[11,"partial_cmp","","",0,null],[11,"cmp","","",0,null],[0,"letter","pitch_calc","",null,null],[4,"Letter","pitch_calc::letter","",null,null],[13,"C","","",1,null],[13,"Csh","","",1,null],[13,"Db","","",1,null],[13,"D","","",1,null],[13,"Dsh","","",1,null],[13,"Eb","","",1,null],[13,"E","","",1,null],[13,"F","","",1,null],[13,"Fsh","","",1,null],[13,"Gb","","",1,null],[13,"G","","",1,null],[13,"Gsh","","",1,null],[13,"Ab","","",1,null],[13,"A","","",1,null],[13,"Ash","","",1,null],[13,"Bb","","",1,null],[13,"B","","",1,null],[17,"TOTAL_LETTERS","","",null,null],[8,"ToLetter","","A trait to be implemented for all primitives for easy conversion to the Letter type.",null,null],[10,"to_letter","","Cast a primitive type to a Letter.",2,null],[11,"decode","","",1,{"inputs":[{"name":"__d"}],"output":{"name":"result"}}],[11,"encode","","",1,null],[11,"fmt","","",1,null],[11,"partial_cmp","","",1,null],[11,"eq","","",1,null],[11,"clone","","",1,null],[11,"from_i64","","",1,{"inputs":[{"name":"i64"}],"output":{"name":"option"}}],[11,"from_u64","","",1,{"inputs":[{"name":"u64"}],"output":{"name":"option"}}],[11,"to_i64","","",1,null],[11,"to_u64","","",1,null],[11,"rand","","",1,{"inputs":[{"name":"r"}],"output":{"name":"letter"}}],[11,"add","","",1,null],[11,"sub","","",1,null],[11,"add","","",1,null],[11,"sub","","",1,null],[0,"letter_octave","pitch_calc","",null,null],[3,"LetterOctave","pitch_calc::letter_octave","Pitch representation in the form of a frequency (hz).",null,null],[12,"0","","",3,null],[12,"1","","",3,null],[6,"Octave","","",null,null],[11,"decode","","",3,{"inputs":[{"name":"__d"}],"output":{"name":"result"}}],[11,"encode","","",3,null],[11,"clone","","",3,null],[11,"fmt","","",3,null],[11,"letter_octave","","Return the value as (Letter, Octave).",3,null],[11,"letter","","Return just the Letter.",3,null],[11,"octave","","Return just the octave.",3,null],[11,"hz","","Convert to the unit value of Hz with the equivalent pitch.",3,null],[11,"to_hz","","Convert to a Hz with the equivalent pitch.",3,null],[11,"mel","","Convert to the unit value of a Mel with equivalent pitch.",3,null],[11,"to_mel","","Convert to a Mel struct.",3,null],[11,"perc","","Convert to the unit value of a Perc.",3,null],[11,"to_perc","","Convert to a percentage of the human hearing range.",3,null],[11,"scaled_perc_with_weight","","Convert to a scaled percentage of the human hearing range with a given weight.",3,null],[11,"scaled_perc","","Convert to a scaled percentage of the human hearing range.",3,null],[11,"to_scaled_perc_with_weight","","Convert to a scaled percentage of the human hearing range with a given weight.",3,null],[11,"to_scaled_perc","","Convert to a scaled percentage of the human hearing range.",3,null],[11,"step","","Convert to the unit value of a Step.",3,null],[11,"to_step","","Convert to a floating point MIDI-esque Step.",3,null],[11,"add","","",3,null],[11,"sub","","",3,null],[11,"mul","","",3,null],[11,"div","","",3,null],[11,"rem","","",3,null],[11,"neg","","",3,null],[11,"eq","","",3,null],[11,"partial_cmp","","",3,null],[11,"cmp","","",3,null],[0,"mel","pitch_calc","",null,null],[3,"Mel","pitch_calc::mel","Mel value representation\n- based on the Mel scale coined by Stevens, Volkmann and Newman in 1937.",null,null],[12,"0","","",4,null],[11,"decode","","",4,{"inputs":[{"name":"__d"}],"output":{"name":"result"}}],[11,"encode","","",4,null],[11,"clone","","",4,null],[11,"fmt","","",4,null],[11,"mel","","Return the unit value of the Mel struct.",4,null],[11,"hz","","Convert to hz.",4,null],[11,"to_hz","","Convert to a Hz struct.",4,null],[11,"letter_octave","","Convert to (Letter, Octave) tuple.",4,null],[11,"letter","","Convert to Letter.",4,null],[11,"octave","","Convert to Octave.",4,null],[11,"to_letter_octave","","Convert to LetterOctave struct with the closest pitch.",4,null],[11,"perc","","Convert to a percentage of the human hearing range.",4,null],[11,"to_perc","","Convert to a Perc struct.",4,null],[11,"scaled_perc_with_weight","","Convert to a scaled percentage of the human hearing range with a given weight.",4,null],[11,"scaled_perc","","Convert to a scaled percentage of the human hearing range.",4,null],[11,"to_scaled_perc_with_weight","","Convert to a scaled percentage of the human hearing range with a given weight.",4,null],[11,"to_scaled_perc","","Convert to a scaled percentage of the human hearing range.",4,null],[11,"step","","Convert to the unit value of a Step.",4,null],[11,"to_step","","Convert to a Step struct.",4,null],[11,"add","","",4,null],[11,"sub","","",4,null],[11,"mul","","",4,null],[11,"div","","",4,null],[11,"rem","","",4,null],[11,"neg","","",4,null],[11,"eq","","",4,null],[11,"partial_cmp","","",4,null],[11,"cmp","","",4,null],[0,"perc","pitch_calc","",null,null],[3,"Perc","pitch_calc::perc","Pitch representation in the form of a percentage between the min and max hz.",null,null],[12,"0","","",5,null],[11,"decode","","",5,{"inputs":[{"name":"__d"}],"output":{"name":"result"}}],[11,"encode","","",5,null],[11,"clone","","",5,null],[11,"fmt","","",5,null],[11,"perc","","Return the value as a percentage.",5,null],[11,"hz","","Convert to unit value of the equivalent frequency in Hz.",5,null],[11,"to_hz","","Convert to the equivalent frequency in Hz.",5,null],[11,"letter_octave","","Convert to a (Letter, Octave).",5,null],[11,"letter","","Convert to Letter.",5,null],[11,"octave","","Convert to Octave.",5,null],[11,"to_letter_octave","","Convert to LetterOctave.",5,null],[11,"mel","","Convert to the unit value of a Mel.",5,null],[11,"to_mel","","Convert to a Mel struct.",5,null],[11,"scaled_perc_with_weight","","Convert to a scaled percentage of the human hearing range with a given weight.",5,null],[11,"scaled_perc","","Convert to a scaled percentage of the human hearing range.",5,null],[11,"to_scaled_perc_with_weight","","Convert to a scaled percentage of the human hearing range with a given weight.",5,null],[11,"to_scaled_perc","","Convert to a scaled percentage of the human hearing range.",5,null],[11,"step","","Convert to the unit value of a Step.",5,null],[11,"to_step","","Convert to a floating point MIDI-esque Step.",5,null],[11,"add","","",5,null],[11,"sub","","",5,null],[11,"mul","","",5,null],[11,"div","","",5,null],[11,"rem","","",5,null],[11,"neg","","",5,null],[11,"eq","","",5,null],[11,"partial_cmp","","",5,null],[11,"cmp","","",5,null],[0,"scaled_perc","pitch_calc","",null,null],[3,"ScaledPerc","pitch_calc::scaled_perc","Pitch representation in the form of a scaled percentage between the min and max hz.",null,null],[12,"0","","",6,null],[12,"1","","",6,null],[6,"ScaleWeight","","",null,null],[17,"DEFAULT_SCALE_WEIGHT","","",null,null],[11,"decode","","",6,{"inputs":[{"name":"__d"}],"output":{"name":"result"}}],[11,"encode","","",6,null],[11,"clone","","",6,null],[11,"fmt","","",6,null],[11,"new","","A constructor for a ScaledPerc that uses the default weight.",6,{"inputs":[{"name":"perc"}],"output":{"name":"scaledperc"}}],[11,"scaled_perc","","Return the value as a scaled percentage.",6,null],[11,"scale_weight","","Return the scale weight.",6,null],[11,"hz","","Convert to the unit value of the equivalent frequency in Hz.",6,null],[11,"to_hz","","Convert to the equivalent frequency in Hz.",6,null],[11,"letter_octave","","Convert to (Letter, Octave) tuple.",6,null],[11,"letter","","Convert to Letter.",6,null],[11,"octave","","Convert to Octave.",6,null],[11,"to_letter_octave","","Convert to LetterOctave.",6,null],[11,"mel","","Convert to the unit value of a Mel.",6,null],[11,"to_mel","","Convert to a Mel struct.",6,null],[11,"perc","","Convert to the unit value of a Perc struct.",6,null],[11,"to_perc","","Convert to Perc.",6,null],[11,"step","","Convert to the unit value of a Step.",6,null],[11,"to_step","","Convert to a floating point MIDI-esque Step.",6,null],[11,"add","","",6,null],[11,"sub","","",6,null],[11,"mul","","",6,null],[11,"div","","",6,null],[11,"rem","","",6,null],[11,"neg","","",6,null],[11,"eq","","",6,null],[11,"partial_cmp","","",6,null],[11,"cmp","","",6,null],[0,"step","pitch_calc","",null,null],[3,"Step","pitch_calc::step","Pitch representation in the form of a MIDI-esque Step.",null,null],[12,"0","","",7,null],[11,"decode","","",7,{"inputs":[{"name":"__d"}],"output":{"name":"result"}}],[11,"encode","","",7,null],[11,"clone","","",7,null],[11,"fmt","","",7,null],[11,"step","","Return the value in steps.",7,null],[11,"hz","","Return the unit value of the equivalent frequency Hz.",7,null],[11,"to_hz","","Convert to the equivalent frequency in Hz.",7,null],[11,"letter_octave","","Convert to the closest equivalent (Letter, Octave).",7,null],[11,"letter","","Convert to the closest equivalent Letter.",7,null],[11,"octave","","Convert to the closest equivalent Octave.",7,null],[11,"to_letter_octave","","Convert to the closest equivalent LetterOctave.",7,null],[11,"mel","","Convert to a Mel unit value.",7,null],[11,"to_mel","","Convert to a Mel struct.",7,null],[11,"perc","","Convert to the unit value of the equivalent Perc.",7,null],[11,"to_perc","","Convert to a percentage of the human hearing range.",7,null],[11,"scaled_perc_with_weight","","Convert to a scaled percentage of the human hearing range with a given weight.",7,null],[11,"scaled_perc","","Convert to a scaled percentage of the human hearing range.",7,null],[11,"to_scaled_perc_with_weight","","Convert to a scaled percentage of the human hearing range with a given weight.",7,null],[11,"to_scaled_perc","","Convert to a scaled percentage of the human hearing range.",7,null],[11,"add","","",7,null],[11,"sub","","",7,null],[11,"mul","","",7,null],[11,"div","","",7,null],[11,"rem","","",7,null],[11,"neg","","",7,null],[11,"eq","","",7,null],[11,"partial_cmp","","",7,null],[11,"cmp","","",7,null],[0,"utils","pitch_calc","",null,null],[5,"modulo","pitch_calc::utils","The modulo function (handles negatives differently to Rust's remainder `%` operator).",null,{"inputs":[{"name":"i"},{"name":"i"}],"output":{"name":"i"}}]],"paths":[[3,"Hz"],[4,"Letter"],[8,"ToLetter"],[3,"LetterOctave"],[3,"Mel"],[3,"Perc"],[3,"ScaledPerc"],[3,"Step"]]}; initSearch(searchIndex);