Sound Generator Library
Fork of Sound_Generator by
Embed:
(wiki syntax)
Show/hide line numbers
piano4int.h
00001 /****************************************************************************** 00002 * DISCLAIMER 00003 * This software is supplied by Renesas Electronics Corporation and is only 00004 * intended for use with Renesas products. No other uses are authorized. This 00005 * software is owned by Renesas Electronics Corporation and is protected under 00006 * all applicable laws, including copyright laws. 00007 * THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING 00008 * THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT 00009 * LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE 00010 * AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED. 00011 * TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS 00012 * ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE 00013 * FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR 00014 * ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE 00015 * BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 00016 * Renesas reserves the right, without notice, to make changes to this software 00017 * and to discontinue the availability of this software. By using this software, 00018 * you agree to the additional terms and conditions found by accessing the 00019 * following link: 00020 * http://www.renesas.com/disclaimer 00021 * Copyright (C) 2012 - 2015 Renesas Electronics Corporation. All 00022 * rights reserved. 00023 ******************************************************************************/ 00024 00025 #ifndef __PIANO4INT_H 00026 #define __PIANO4INT_H 00027 00028 /****************************************************************************** 00029 Includes <System Includes> , "Project Includes" 00030 ******************************************************************************/ 00031 00032 00033 /****************************************************************************** 00034 Macro definitions 00035 ******************************************************************************/ 00036 #define OCTAVE0_CHAR ('-') 00037 #define OCTAVE1_CHAR (' ') 00038 #define OCTAVE2_CHAR ('+') 00039 #define OCTAVE3_CHAR ('*') 00040 00041 #define NOTE_DO_CHAR ('C') 00042 #define NOTE_RE_CHAR ('D') 00043 #define NOTE_MI_CHAR ('E') 00044 #define NOTE_FA_CHAR ('F') 00045 #define NOTE_SO_CHAR ('G') 00046 #define NOTE_RA_CHAR ('A') 00047 #define NOTE_SI_CHAR ('B') 00048 #define NOTE_REST_CHAR ('R') 00049 00050 #define NOTE_SHARP ('#') 00051 00052 #define NOTE_TIE ('_') 00053 00054 #define NOTE_DOT ('.') 00055 00056 #define NOTE_MARKER ('@') 00057 00058 /* base time */ 00059 #define BASESPEED (60 * 1000 * 4) 00060 00061 #define MAXOCTAVE (4) 00062 #define MAXNOTE (13) 00063 00064 #define DEFLOUDNESS (4) 00065 00066 /* octave level value */ 00067 #define OCTAVE_LEVEL_0 (0) 00068 #define OCTAVE_LEVEL_1 (1) 00069 #define OCTAVE_LEVEL_2 (2) 00070 #define OCTAVE_LEVEL_3 (3) 00071 00072 /* key value */ 00073 #define KEY_C (3) 00074 #define KEY_D (5) 00075 #define KEY_E (7) 00076 #define KEY_F (8) 00077 #define KEY_G (10) 00078 #define KEY_A (0) 00079 #define KEY_B (2) 00080 #define KEY_R (12) 00081 00082 /* dotted note value */ 00083 #define DOTTED_NOTE (1) 00084 #define NOT_DOTTED_NONE (0) 00085 00086 /* tied note value */ 00087 #define TIED_NOTE (0) 00088 #define NOT_TIED_NONE (4) 00089 00090 /****************************************************************************** 00091 Typedef definitions 00092 ******************************************************************************/ 00093 typedef void (*PIANO4INT_CB)(uint32_t channel, uint32_t value); 00094 00095 /****************************************************************************** 00096 Imported global variables and functions (from other files) 00097 ******************************************************************************/ 00098 00099 00100 /****************************************************************************** 00101 Exported global variables and functions (to be accessed by other files) 00102 ******************************************************************************/ 00103 extern void piano4int_start(const int8_t *scores[SDG_CH_TOTAL], PIANO4INT_CB callback); 00104 extern void piano4int_stop(bool force); 00105 extern bool piano4int_status(void); 00106 00107 00108 #endif /*__PIANO4INT_H*/ 00109 00110 /* End of File */
Generated on Fri Jul 15 2022 04:21:34 by
1.7.2
