data-raw/notesDict.R

## conversion from Hz to musical notes (for UI only). See http://www.phy.mtu.edu/~suits/notefreqs.html for reference table. The commented-out section shows how the dictionary was originally compiled
# notes = c('C', 'C\U266F', 'D', 'D\U266F', 'E', 'F', 'F\U266F', 'G', 'G\U266F', 'A', 'B\U266D', 'B')
# nOct = 11
# notes_all = paste0(notes, rep(0:(nOct - 1), each = 12))
# c0 = 13.75 * 2 ^ (3 / 12) # 16.3516 Hz exactly. 440 / 32 = 13.75  # A-1, and C0 is 3 semitones higher
# notes_freq = round (c0 * 2^(0:(12 * nOct - 1) / 12), 1) # paste0(notes_freq, collapse=', ')
notesDict = data.frame (
  note = c('C0','C♯0','D0','D♯0','E0','F0','F♯0','G0','G♯0','A0','B♭0','B0',
           'C1','C♯1','D1','D♯1','E1','F1','F♯1','G1','G♯1','A1','B♭1','B1',
           'C2','C♯2','D2','D♯2','E2','F2','F♯2','G2','G♯2','A2','B♭2','B2',
           'C3','C♯3','D3','D♯3','E3','F3','F♯3','G3','G♯3','A3','B♭3','B3',
           'C4','C♯4','D4','D♯4','E4','F4','F♯4','G4','G♯4','A4','B♭4','B4',
           'C5','C♯5','D5','D♯5','E5','F5','F♯5','G5','G♯5','A5','B♭5','B5',
           'C6','C♯6','D6','D♯6','E6','F6','F♯6','G6','G♯6','A6','B♭6','B6',
           'C7','C♯7','D7','D♯7','E7','F7','F♯7','G7','G♯7','A7','B♭7','B7',
           'C8','C♯8','D8','D♯8','E8','F8','F♯8','G8','G♯8','A8','B♭8','B8',
           'C9','C♯9','D9','D♯9','E9','F9','F♯9','G9','G♯9','A9','B♭9','B9',
           'C10','C♯10','D10','D♯10','E10','F10','F♯10','G10','G♯10','A10',
           'B♭10','B10'),
  freq = c(16.4, 17.3, 18.4, 19.4, 20.6, 21.8, 23.1, 24.5, 26, 27.5, 29.1,
           30.9, 32.7, 34.6, 36.7, 38.9, 41.2, 43.7, 46.2, 49, 51.9, 55, 58.3,
           61.7, 65.4, 69.3, 73.4, 77.8, 82.4, 87.3, 92.5, 98, 103.8, 110,
           116.5, 123.5, 130.8, 138.6, 146.8, 155.6, 164.8, 174.6, 185, 196,
           207.7, 220, 233.1, 246.9, 261.6, 277.2, 293.7, 311.1, 329.6, 349.2,
           370, 392, 415.3, 440, 466.2, 493.9, 523.3, 554.4, 587.3, 622.3, 659.3,
           698.5, 740, 784, 830.6, 880, 932.3, 987.8, 1046.5, 1108.7, 1174.7,
           1244.5, 1318.5, 1396.9, 1480, 1568, 1661.2, 1760, 1864.7, 1975.5, 2093,
           2217.5, 2349.3, 2489, 2637, 2793.8, 2960, 3136, 3322.4, 3520, 3729.3,
           3951.1, 4186, 4434.9, 4698.6, 4978, 5274, 5587.7, 5919.9, 6271.9,
           6644.9, 7040, 7458.6, 7902.1, 8372, 8869.8, 9397.3, 9956.1, 10548.1,
           11175.3, 11839.8, 12543.9, 13289.8, 14080, 14917.2, 15804.3, 16744,
           17739.7, 18794.5, 19912.1, 21096.2, 22350.6, 23679.6, 25087.7,
           26579.5, 28160, 29834.5, 31608.5),
  stringsAsFactors=F)
# devtools::use_data(notesDict)
tatters/soundgen_beta documentation built on May 14, 2019, 9 a.m.