Frequency2Notes.cpp
上传用户:gelin96
上传日期:2017-01-08
资源大小:20993k
文件大小:6k
- /*****************************************************************************
- * Copyright Statement:
- * --------------------
- * This software is protected by Copyright and the information contained
- * herein is confidential. The software may not be copied and the information
- * contained herein may not be used or disclosed except with the written
- * permission of MediaTek Inc. (C) 2005
- *
- * BY OPENING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
- * THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
- * RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON
- * AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
- * NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
- * SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
- * SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK ONLY TO SUCH
- * THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO
- * NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S
- * SPECIFICATION OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM.
- *
- * BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE
- * LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
- * AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE,
- * OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY BUYER TO
- * MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
- *
- * THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE
- * WITH THE LAWS OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF
- * LAWS PRINCIPLES. ANY DISPUTES, CONTROVERSIES OR CLAIMS ARISING THEREOF AND
- * RELATED THERETO SHALL BE SETTLED BY ARBITRATION IN SAN FRANCISCO, CA, UNDER
- * THE RULES OF THE INTERNATIONAL CHAMBER OF COMMERCE (ICC).
- *
- *****************************************************************************/
- /*****************************************************************************
- *
- * Filename:
- * ---------
- * Frequency2Notes.cpp
- *
- * Project:
- * --------
- * Maui META APP
- *
- * Description:
- * ------------
- * Frequency to notes transform source
- *
- * Author:
- * -------
- * Andy Ueng (mtk00490)
- *
- *============================================================================
- * HISTORY
- * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
- *------------------------------------------------------------------------------
- * $Revision$
- * $Modtime$
- * $Log$
- *
- *------------------------------------------------------------------------------
- * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
- *============================================================================
- ****************************************************************************/
- #include "Frequency2Notes.hpp"
- unsigned char *NotesFrequency[]={
- // octave = 0
-
- "8.1757989156",
- "8.6619572180",
- "9.1770239974",
- "9.7227182413",
- "10.3008611535",
- "10.9133822323",
- "11.5623257097",
- "12.2498573744",
- "12.9782717994",
- "13.7500000000",
- "14.5676175474",
- "15.4338531643",
- // octave = 1
- "16.3515978313",
- "17.3239144361",
- "18.3540479948",
- "19.4454364826",
- "20.6017223071",
- "21.8267644646",
- "23.1246514195",
- "24.4997147489",
- "25.9565435987",
- "27.5000000000",
- "29.1352350949",
- "30.8677063285",
- // octave = 2
- "32.7031956626",
- "34.6478288721",
- "36.7080959897",
- "38.8908729653",
- "41.2034446141",
- "43.6535289291",
- "46.2493028390",
- "48.9994294977",
- "51.9130871975",
- "55.0000000000",
- "58.2704701898",
- "61.7354126570",
- // octave = 3
- "65.4063913251",
- "69.2956577442",
- "73.4161919794",
- "77.7817459305",
- "82.4068892282",
- "87.3070578583",
- "92.4986056779",
- "97.9988589954",
- "103.8261743950",
- "110.0000000000",
- "116.5409403795",
- "123.4708253140",
- // octave = 4
- "130.8127826503",
- "138.5913154884",
- "146.8323839587",
- "155.5634918610",
- "164.8137784564",
- "174.6141157165",
- "184.9972113558",
- "195.9977179909",
- "207.6523487900",
- "220.0000000000",
- "233.0818807590",
- "246.9416506281",
- // octave = 5
- "261.6255653006",
- "277.1826309769",
- "293.6647679174",
- "311.1269837221",
- "329.6275569129",
- "349.2282314330",
- "369.9944227116",
- "391.9954359817",
- "415.3046975799",
- "440.0000000000",
- "466.1637615181",
- "493.8833012561",
- // octave = 6
- "523.2511306012",
- "554.3652619537",
- "587.3295358348",
- "622.2539674442",
- "659.2551138257",
- "698.4564628660",
- "739.9888454233",
- "783.9908719635",
- "830.6093951599",
- "880.0000000000",
- "932.3275230362",
- "987.7666025122",
- // octave = 7
- "1046.5022612024",
- "1108.7305239075",
- "1174.6590716696",
- "1244.5079348883",
- "1318.5102276515",
- "1396.9129257320",
- "1479.9776908465",
- "1567.9817439270",
- "1661.2187903198",
- "1760.0000000000",
- "1864.6550460724",
- "1975.5332050245",
- // octave = 8
- "2093.0045224048",
- "2217.4610478150",
- "2349.3181433393",
- "2489.0158697766",
- "2637.0204553030",
- "2793.8258514640",
- "2959.9553816931",
- "3135.9634878540",
- "3322.4375806396",
- "3520.0000000000",
- "3729.3100921447",
- "3951.0664100490",
- // octave = 9
- // {
- // 4186.0090448096,
- // 4434.9220956300,
- // 4698.6362866785,
- // 4978.0317395533,
- // 5274.0409106059,
- // 5587.6517029281,
- // 5919.9107633862,
- // 6271.9269757080,
- // 6644.8751612791,
- // 7040.0000000000,
- // 7458.6201842894,
- // 7902.1328200980,
- // },
- // octave = 10
- // {
- // 8372.0180896192,
- // 8869.8441912599,
- // 9397.2725733570,
- // 9956.0634791066,
- // 10548.0818212118,
- // 11175.3034058561,
- // 11839.8215267723,
- // 12543.8539514160,
- // 0,
- // 0,
- // 0,
- // 0
- // }
- };