Oliver Fabel 1 год назад
Родитель
Сommit
5a370d3b3d
3 измененных файлов с 484 добавлено и 0 удалено
  1. 107 0
      genhdr/qstrdefs.generated.h
  2. 243 0
      mp_flipper_modflipperzero.c
  3. 134 0
      mp_flipper_modflipperzero.h

+ 107 - 0
genhdr/qstrdefs.generated.h

@@ -195,7 +195,114 @@ QDEF1(MP_QSTR_LIGHT_BACKLIGHT, 17, 15, "LIGHT_BACKLIGHT")
 QDEF1(MP_QSTR_LIGHT_BLUE, 90, 10, "LIGHT_BLUE")
 QDEF1(MP_QSTR_LIGHT_GREEN, 95, 11, "LIGHT_GREEN")
 QDEF1(MP_QSTR_LIGHT_RED, 215, 9, "LIGHT_RED")
+QDEF1(MP_QSTR_SPEAKER_NOTE_A0, 95, 15, "SPEAKER_NOTE_A0")
+QDEF1(MP_QSTR_SPEAKER_NOTE_A1, 94, 15, "SPEAKER_NOTE_A1")
+QDEF1(MP_QSTR_SPEAKER_NOTE_A2, 93, 15, "SPEAKER_NOTE_A2")
+QDEF1(MP_QSTR_SPEAKER_NOTE_A3, 92, 15, "SPEAKER_NOTE_A3")
+QDEF1(MP_QSTR_SPEAKER_NOTE_A4, 91, 15, "SPEAKER_NOTE_A4")
+QDEF1(MP_QSTR_SPEAKER_NOTE_A5, 90, 15, "SPEAKER_NOTE_A5")
+QDEF1(MP_QSTR_SPEAKER_NOTE_A6, 89, 15, "SPEAKER_NOTE_A6")
+QDEF1(MP_QSTR_SPEAKER_NOTE_A7, 88, 15, "SPEAKER_NOTE_A7")
+QDEF1(MP_QSTR_SPEAKER_NOTE_A8, 87, 15, "SPEAKER_NOTE_A8")
+QDEF1(MP_QSTR_SPEAKER_NOTE_AS0, 140, 16, "SPEAKER_NOTE_AS0")
+QDEF1(MP_QSTR_SPEAKER_NOTE_AS1, 141, 16, "SPEAKER_NOTE_AS1")
+QDEF1(MP_QSTR_SPEAKER_NOTE_AS2, 142, 16, "SPEAKER_NOTE_AS2")
+QDEF1(MP_QSTR_SPEAKER_NOTE_AS3, 143, 16, "SPEAKER_NOTE_AS3")
+QDEF1(MP_QSTR_SPEAKER_NOTE_AS4, 136, 16, "SPEAKER_NOTE_AS4")
+QDEF1(MP_QSTR_SPEAKER_NOTE_AS5, 137, 16, "SPEAKER_NOTE_AS5")
+QDEF1(MP_QSTR_SPEAKER_NOTE_AS6, 138, 16, "SPEAKER_NOTE_AS6")
+QDEF1(MP_QSTR_SPEAKER_NOTE_AS7, 139, 16, "SPEAKER_NOTE_AS7")
+QDEF1(MP_QSTR_SPEAKER_NOTE_AS8, 132, 16, "SPEAKER_NOTE_AS8")
+QDEF1(MP_QSTR_SPEAKER_NOTE_B0, 60, 15, "SPEAKER_NOTE_B0")
+QDEF1(MP_QSTR_SPEAKER_NOTE_B1, 61, 15, "SPEAKER_NOTE_B1")
+QDEF1(MP_QSTR_SPEAKER_NOTE_B2, 62, 15, "SPEAKER_NOTE_B2")
+QDEF1(MP_QSTR_SPEAKER_NOTE_B3, 63, 15, "SPEAKER_NOTE_B3")
+QDEF1(MP_QSTR_SPEAKER_NOTE_B4, 56, 15, "SPEAKER_NOTE_B4")
+QDEF1(MP_QSTR_SPEAKER_NOTE_B5, 57, 15, "SPEAKER_NOTE_B5")
+QDEF1(MP_QSTR_SPEAKER_NOTE_B6, 58, 15, "SPEAKER_NOTE_B6")
+QDEF1(MP_QSTR_SPEAKER_NOTE_B7, 59, 15, "SPEAKER_NOTE_B7")
+QDEF1(MP_QSTR_SPEAKER_NOTE_B8, 52, 15, "SPEAKER_NOTE_B8")
 QDEF1(MP_QSTR_SPEAKER_NOTE_C0, 29, 15, "SPEAKER_NOTE_C0")
+QDEF1(MP_QSTR_SPEAKER_NOTE_C1, 28, 15, "SPEAKER_NOTE_C1")
+QDEF1(MP_QSTR_SPEAKER_NOTE_C2, 31, 15, "SPEAKER_NOTE_C2")
+QDEF1(MP_QSTR_SPEAKER_NOTE_C3, 30, 15, "SPEAKER_NOTE_C3")
+QDEF1(MP_QSTR_SPEAKER_NOTE_C4, 25, 15, "SPEAKER_NOTE_C4")
+QDEF1(MP_QSTR_SPEAKER_NOTE_C5, 24, 15, "SPEAKER_NOTE_C5")
+QDEF1(MP_QSTR_SPEAKER_NOTE_C6, 27, 15, "SPEAKER_NOTE_C6")
+QDEF1(MP_QSTR_SPEAKER_NOTE_C7, 26, 15, "SPEAKER_NOTE_C7")
+QDEF1(MP_QSTR_SPEAKER_NOTE_C8, 21, 15, "SPEAKER_NOTE_C8")
+QDEF1(MP_QSTR_SPEAKER_NOTE_CS0, 14, 16, "SPEAKER_NOTE_CS0")
+QDEF1(MP_QSTR_SPEAKER_NOTE_CS1, 15, 16, "SPEAKER_NOTE_CS1")
+QDEF1(MP_QSTR_SPEAKER_NOTE_CS2, 12, 16, "SPEAKER_NOTE_CS2")
+QDEF1(MP_QSTR_SPEAKER_NOTE_CS3, 13, 16, "SPEAKER_NOTE_CS3")
+QDEF1(MP_QSTR_SPEAKER_NOTE_CS4, 10, 16, "SPEAKER_NOTE_CS4")
+QDEF1(MP_QSTR_SPEAKER_NOTE_CS5, 11, 16, "SPEAKER_NOTE_CS5")
+QDEF1(MP_QSTR_SPEAKER_NOTE_CS6, 8, 16, "SPEAKER_NOTE_CS6")
+QDEF1(MP_QSTR_SPEAKER_NOTE_CS7, 9, 16, "SPEAKER_NOTE_CS7")
+QDEF1(MP_QSTR_SPEAKER_NOTE_CS8, 6, 16, "SPEAKER_NOTE_CS8")
+QDEF1(MP_QSTR_SPEAKER_NOTE_D0, 250, 15, "SPEAKER_NOTE_D0")
+QDEF1(MP_QSTR_SPEAKER_NOTE_D1, 251, 15, "SPEAKER_NOTE_D1")
+QDEF1(MP_QSTR_SPEAKER_NOTE_D2, 248, 15, "SPEAKER_NOTE_D2")
+QDEF1(MP_QSTR_SPEAKER_NOTE_D3, 249, 15, "SPEAKER_NOTE_D3")
+QDEF1(MP_QSTR_SPEAKER_NOTE_D4, 254, 15, "SPEAKER_NOTE_D4")
+QDEF1(MP_QSTR_SPEAKER_NOTE_D5, 255, 15, "SPEAKER_NOTE_D5")
+QDEF1(MP_QSTR_SPEAKER_NOTE_D6, 252, 15, "SPEAKER_NOTE_D6")
+QDEF1(MP_QSTR_SPEAKER_NOTE_D7, 253, 15, "SPEAKER_NOTE_D7")
+QDEF1(MP_QSTR_SPEAKER_NOTE_D8, 242, 15, "SPEAKER_NOTE_D8")
+QDEF1(MP_QSTR_SPEAKER_NOTE_DS0, 137, 16, "SPEAKER_NOTE_DS0")
+QDEF1(MP_QSTR_SPEAKER_NOTE_DS1, 136, 16, "SPEAKER_NOTE_DS1")
+QDEF1(MP_QSTR_SPEAKER_NOTE_DS2, 139, 16, "SPEAKER_NOTE_DS2")
+QDEF1(MP_QSTR_SPEAKER_NOTE_DS3, 138, 16, "SPEAKER_NOTE_DS3")
+QDEF1(MP_QSTR_SPEAKER_NOTE_DS4, 141, 16, "SPEAKER_NOTE_DS4")
+QDEF1(MP_QSTR_SPEAKER_NOTE_DS5, 140, 16, "SPEAKER_NOTE_DS5")
+QDEF1(MP_QSTR_SPEAKER_NOTE_DS6, 143, 16, "SPEAKER_NOTE_DS6")
+QDEF1(MP_QSTR_SPEAKER_NOTE_DS7, 142, 16, "SPEAKER_NOTE_DS7")
+QDEF1(MP_QSTR_SPEAKER_NOTE_DS8, 129, 16, "SPEAKER_NOTE_DS8")
+QDEF1(MP_QSTR_SPEAKER_NOTE_E0, 219, 15, "SPEAKER_NOTE_E0")
+QDEF1(MP_QSTR_SPEAKER_NOTE_E1, 218, 15, "SPEAKER_NOTE_E1")
+QDEF1(MP_QSTR_SPEAKER_NOTE_E2, 217, 15, "SPEAKER_NOTE_E2")
+QDEF1(MP_QSTR_SPEAKER_NOTE_E3, 216, 15, "SPEAKER_NOTE_E3")
+QDEF1(MP_QSTR_SPEAKER_NOTE_E4, 223, 15, "SPEAKER_NOTE_E4")
+QDEF1(MP_QSTR_SPEAKER_NOTE_E5, 222, 15, "SPEAKER_NOTE_E5")
+QDEF1(MP_QSTR_SPEAKER_NOTE_E6, 221, 15, "SPEAKER_NOTE_E6")
+QDEF1(MP_QSTR_SPEAKER_NOTE_E7, 220, 15, "SPEAKER_NOTE_E7")
+QDEF1(MP_QSTR_SPEAKER_NOTE_E8, 211, 15, "SPEAKER_NOTE_E8")
+QDEF1(MP_QSTR_SPEAKER_NOTE_F0, 184, 15, "SPEAKER_NOTE_F0")
+QDEF1(MP_QSTR_SPEAKER_NOTE_F1, 185, 15, "SPEAKER_NOTE_F1")
+QDEF1(MP_QSTR_SPEAKER_NOTE_F2, 186, 15, "SPEAKER_NOTE_F2")
+QDEF1(MP_QSTR_SPEAKER_NOTE_F3, 187, 15, "SPEAKER_NOTE_F3")
+QDEF1(MP_QSTR_SPEAKER_NOTE_F4, 188, 15, "SPEAKER_NOTE_F4")
+QDEF1(MP_QSTR_SPEAKER_NOTE_F5, 189, 15, "SPEAKER_NOTE_F5")
+QDEF1(MP_QSTR_SPEAKER_NOTE_F6, 190, 15, "SPEAKER_NOTE_F6")
+QDEF1(MP_QSTR_SPEAKER_NOTE_F7, 191, 15, "SPEAKER_NOTE_F7")
+QDEF1(MP_QSTR_SPEAKER_NOTE_F8, 176, 15, "SPEAKER_NOTE_F8")
+QDEF1(MP_QSTR_SPEAKER_NOTE_FS0, 11, 16, "SPEAKER_NOTE_FS0")
+QDEF1(MP_QSTR_SPEAKER_NOTE_FS1, 10, 16, "SPEAKER_NOTE_FS1")
+QDEF1(MP_QSTR_SPEAKER_NOTE_FS2, 9, 16, "SPEAKER_NOTE_FS2")
+QDEF1(MP_QSTR_SPEAKER_NOTE_FS3, 8, 16, "SPEAKER_NOTE_FS3")
+QDEF1(MP_QSTR_SPEAKER_NOTE_FS4, 15, 16, "SPEAKER_NOTE_FS4")
+QDEF1(MP_QSTR_SPEAKER_NOTE_FS5, 14, 16, "SPEAKER_NOTE_FS5")
+QDEF1(MP_QSTR_SPEAKER_NOTE_FS6, 13, 16, "SPEAKER_NOTE_FS6")
+QDEF1(MP_QSTR_SPEAKER_NOTE_FS7, 12, 16, "SPEAKER_NOTE_FS7")
+QDEF1(MP_QSTR_SPEAKER_NOTE_FS8, 3, 16, "SPEAKER_NOTE_FS8")
+QDEF1(MP_QSTR_SPEAKER_NOTE_G0, 153, 15, "SPEAKER_NOTE_G0")
+QDEF1(MP_QSTR_SPEAKER_NOTE_G1, 152, 15, "SPEAKER_NOTE_G1")
+QDEF1(MP_QSTR_SPEAKER_NOTE_G2, 155, 15, "SPEAKER_NOTE_G2")
+QDEF1(MP_QSTR_SPEAKER_NOTE_G3, 154, 15, "SPEAKER_NOTE_G3")
+QDEF1(MP_QSTR_SPEAKER_NOTE_G4, 157, 15, "SPEAKER_NOTE_G4")
+QDEF1(MP_QSTR_SPEAKER_NOTE_G5, 156, 15, "SPEAKER_NOTE_G5")
+QDEF1(MP_QSTR_SPEAKER_NOTE_G6, 159, 15, "SPEAKER_NOTE_G6")
+QDEF1(MP_QSTR_SPEAKER_NOTE_G7, 158, 15, "SPEAKER_NOTE_G7")
+QDEF1(MP_QSTR_SPEAKER_NOTE_G8, 145, 15, "SPEAKER_NOTE_G8")
+QDEF1(MP_QSTR_SPEAKER_NOTE_GS0, 10, 16, "SPEAKER_NOTE_GS0")
+QDEF1(MP_QSTR_SPEAKER_NOTE_GS1, 11, 16, "SPEAKER_NOTE_GS1")
+QDEF1(MP_QSTR_SPEAKER_NOTE_GS2, 8, 16, "SPEAKER_NOTE_GS2")
+QDEF1(MP_QSTR_SPEAKER_NOTE_GS3, 9, 16, "SPEAKER_NOTE_GS3")
+QDEF1(MP_QSTR_SPEAKER_NOTE_GS4, 14, 16, "SPEAKER_NOTE_GS4")
+QDEF1(MP_QSTR_SPEAKER_NOTE_GS5, 15, 16, "SPEAKER_NOTE_GS5")
+QDEF1(MP_QSTR_SPEAKER_NOTE_GS6, 12, 16, "SPEAKER_NOTE_GS6")
+QDEF1(MP_QSTR_SPEAKER_NOTE_GS7, 13, 16, "SPEAKER_NOTE_GS7")
+QDEF1(MP_QSTR_SPEAKER_NOTE_GS8, 2, 16, "SPEAKER_NOTE_GS8")
 QDEF0(MP_QSTR___add__, 196, 7, "__add__")
 QDEF0(MP_QSTR___bool__, 43, 8, "__bool__")
 QDEF1(MP_QSTR___build_class__, 66, 15, "__build_class__")

+ 243 - 0
mp_flipper_modflipperzero.c

@@ -65,7 +65,129 @@ static mp_obj_t flipperzero_vibro_set(mp_obj_t state) {
 }
 static MP_DEFINE_CONST_FUN_OBJ_1(flipperzero_vibro_set_obj, flipperzero_vibro_set);
 
+/*
+Python script for notes generation
+
+# coding: utf-8
+# Python script for notes generation
+
+from typing import List
+
+note_names: List = ['C', 'CS', 'D', 'DS', 'E', 'F', 'FS', 'G', 'GS', 'A', 'AS', 'B']
+
+for octave in range(9):
+    for name in note_names:
+        print("const mp_obj_t flipperzero_speaker_note_%s%s = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_%s%s};" % (name.lower(),octave,name,octave))
+*/
+
 const mp_obj_t flipperzero_speaker_note_c0 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_C0};
+const mp_obj_t flipperzero_speaker_note_cs0 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_CS0};
+const mp_obj_t flipperzero_speaker_note_d0 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_D0};
+const mp_obj_t flipperzero_speaker_note_ds0 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_DS0};
+const mp_obj_t flipperzero_speaker_note_e0 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_E0};
+const mp_obj_t flipperzero_speaker_note_f0 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_F0};
+const mp_obj_t flipperzero_speaker_note_fs0 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_FS0};
+const mp_obj_t flipperzero_speaker_note_g0 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_G0};
+const mp_obj_t flipperzero_speaker_note_gs0 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_GS0};
+const mp_obj_t flipperzero_speaker_note_a0 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_A0};
+const mp_obj_t flipperzero_speaker_note_as0 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_AS0};
+const mp_obj_t flipperzero_speaker_note_b0 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_B0};
+const mp_obj_t flipperzero_speaker_note_c1 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_C1};
+const mp_obj_t flipperzero_speaker_note_cs1 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_CS1};
+const mp_obj_t flipperzero_speaker_note_d1 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_D1};
+const mp_obj_t flipperzero_speaker_note_ds1 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_DS1};
+const mp_obj_t flipperzero_speaker_note_e1 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_E1};
+const mp_obj_t flipperzero_speaker_note_f1 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_F1};
+const mp_obj_t flipperzero_speaker_note_fs1 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_FS1};
+const mp_obj_t flipperzero_speaker_note_g1 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_G1};
+const mp_obj_t flipperzero_speaker_note_gs1 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_GS1};
+const mp_obj_t flipperzero_speaker_note_a1 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_A1};
+const mp_obj_t flipperzero_speaker_note_as1 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_AS1};
+const mp_obj_t flipperzero_speaker_note_b1 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_B1};
+const mp_obj_t flipperzero_speaker_note_c2 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_C2};
+const mp_obj_t flipperzero_speaker_note_cs2 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_CS2};
+const mp_obj_t flipperzero_speaker_note_d2 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_D2};
+const mp_obj_t flipperzero_speaker_note_ds2 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_DS2};
+const mp_obj_t flipperzero_speaker_note_e2 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_E2};
+const mp_obj_t flipperzero_speaker_note_f2 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_F2};
+const mp_obj_t flipperzero_speaker_note_fs2 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_FS2};
+const mp_obj_t flipperzero_speaker_note_g2 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_G2};
+const mp_obj_t flipperzero_speaker_note_gs2 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_GS2};
+const mp_obj_t flipperzero_speaker_note_a2 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_A2};
+const mp_obj_t flipperzero_speaker_note_as2 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_AS2};
+const mp_obj_t flipperzero_speaker_note_b2 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_B2};
+const mp_obj_t flipperzero_speaker_note_c3 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_C3};
+const mp_obj_t flipperzero_speaker_note_cs3 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_CS3};
+const mp_obj_t flipperzero_speaker_note_d3 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_D3};
+const mp_obj_t flipperzero_speaker_note_ds3 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_DS3};
+const mp_obj_t flipperzero_speaker_note_e3 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_E3};
+const mp_obj_t flipperzero_speaker_note_f3 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_F3};
+const mp_obj_t flipperzero_speaker_note_fs3 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_FS3};
+const mp_obj_t flipperzero_speaker_note_g3 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_G3};
+const mp_obj_t flipperzero_speaker_note_gs3 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_GS3};
+const mp_obj_t flipperzero_speaker_note_a3 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_A3};
+const mp_obj_t flipperzero_speaker_note_as3 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_AS3};
+const mp_obj_t flipperzero_speaker_note_b3 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_B3};
+const mp_obj_t flipperzero_speaker_note_c4 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_C4};
+const mp_obj_t flipperzero_speaker_note_cs4 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_CS4};
+const mp_obj_t flipperzero_speaker_note_d4 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_D4};
+const mp_obj_t flipperzero_speaker_note_ds4 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_DS4};
+const mp_obj_t flipperzero_speaker_note_e4 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_E4};
+const mp_obj_t flipperzero_speaker_note_f4 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_F4};
+const mp_obj_t flipperzero_speaker_note_fs4 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_FS4};
+const mp_obj_t flipperzero_speaker_note_g4 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_G4};
+const mp_obj_t flipperzero_speaker_note_gs4 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_GS4};
+const mp_obj_t flipperzero_speaker_note_a4 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_A4};
+const mp_obj_t flipperzero_speaker_note_as4 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_AS4};
+const mp_obj_t flipperzero_speaker_note_b4 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_B4};
+const mp_obj_t flipperzero_speaker_note_c5 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_C5};
+const mp_obj_t flipperzero_speaker_note_cs5 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_CS5};
+const mp_obj_t flipperzero_speaker_note_d5 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_D5};
+const mp_obj_t flipperzero_speaker_note_ds5 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_DS5};
+const mp_obj_t flipperzero_speaker_note_e5 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_E5};
+const mp_obj_t flipperzero_speaker_note_f5 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_F5};
+const mp_obj_t flipperzero_speaker_note_fs5 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_FS5};
+const mp_obj_t flipperzero_speaker_note_g5 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_G5};
+const mp_obj_t flipperzero_speaker_note_gs5 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_GS5};
+const mp_obj_t flipperzero_speaker_note_a5 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_A5};
+const mp_obj_t flipperzero_speaker_note_as5 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_AS5};
+const mp_obj_t flipperzero_speaker_note_b5 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_B5};
+const mp_obj_t flipperzero_speaker_note_c6 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_C6};
+const mp_obj_t flipperzero_speaker_note_cs6 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_CS6};
+const mp_obj_t flipperzero_speaker_note_d6 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_D6};
+const mp_obj_t flipperzero_speaker_note_ds6 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_DS6};
+const mp_obj_t flipperzero_speaker_note_e6 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_E6};
+const mp_obj_t flipperzero_speaker_note_f6 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_F6};
+const mp_obj_t flipperzero_speaker_note_fs6 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_FS6};
+const mp_obj_t flipperzero_speaker_note_g6 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_G6};
+const mp_obj_t flipperzero_speaker_note_gs6 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_GS6};
+const mp_obj_t flipperzero_speaker_note_a6 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_A6};
+const mp_obj_t flipperzero_speaker_note_as6 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_AS6};
+const mp_obj_t flipperzero_speaker_note_b6 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_B6};
+const mp_obj_t flipperzero_speaker_note_c7 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_C7};
+const mp_obj_t flipperzero_speaker_note_cs7 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_CS7};
+const mp_obj_t flipperzero_speaker_note_d7 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_D7};
+const mp_obj_t flipperzero_speaker_note_ds7 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_DS7};
+const mp_obj_t flipperzero_speaker_note_e7 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_E7};
+const mp_obj_t flipperzero_speaker_note_f7 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_F7};
+const mp_obj_t flipperzero_speaker_note_fs7 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_FS7};
+const mp_obj_t flipperzero_speaker_note_g7 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_G7};
+const mp_obj_t flipperzero_speaker_note_gs7 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_GS7};
+const mp_obj_t flipperzero_speaker_note_a7 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_A7};
+const mp_obj_t flipperzero_speaker_note_as7 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_AS7};
+const mp_obj_t flipperzero_speaker_note_b7 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_B7};
+const mp_obj_t flipperzero_speaker_note_c8 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_C8};
+const mp_obj_t flipperzero_speaker_note_cs8 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_CS8};
+const mp_obj_t flipperzero_speaker_note_d8 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_D8};
+const mp_obj_t flipperzero_speaker_note_ds8 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_DS8};
+const mp_obj_t flipperzero_speaker_note_e8 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_E8};
+const mp_obj_t flipperzero_speaker_note_f8 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_F8};
+const mp_obj_t flipperzero_speaker_note_fs8 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_FS8};
+const mp_obj_t flipperzero_speaker_note_g8 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_G8};
+const mp_obj_t flipperzero_speaker_note_gs8 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_GS8};
+const mp_obj_t flipperzero_speaker_note_a8 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_A8};
+const mp_obj_t flipperzero_speaker_note_as8 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_AS8};
+const mp_obj_t flipperzero_speaker_note_b8 = {{&mp_type_float}, (mp_float_t)MP_FLIPPER_SPEAKER_NOTE_B8};
 
 static mp_obj_t flipperzero_speaker_start(mp_obj_t frequency_obj, mp_obj_t volume_obj) {
     mp_float_t frequency = mp_obj_get_float(frequency_obj);
@@ -357,7 +479,128 @@ static const mp_rom_map_elem_t flipperzero_module_globals_table[] = {
     {MP_ROM_QSTR(MP_QSTR_light_blink_set_color), MP_ROM_PTR(&flipperzero_light_blink_set_color_obj)},
     {MP_ROM_QSTR(MP_QSTR_light_blink_stop), MP_ROM_PTR(&flipperzero_light_blink_stop_obj)},
     {MP_ROM_QSTR(MP_QSTR_vibro_set), MP_ROM_PTR(&flipperzero_vibro_set_obj)},
+    /*
+Python script for notes generation
+
+# coding: utf-8
+# Python script for notes generation
+
+from typing import List
+
+note_names: List = ['C', 'CS', 'D', 'DS', 'E', 'F', 'FS', 'G', 'GS', 'A', 'AS', 'B']
+
+for octave in range(9):
+    for name in note_names:
+        print("{MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_%s%s), MP_ROM_PTR(&flipperzero_speaker_note_%s%s)}," % (name,octave,name.lower(),octave))
+*/
     {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_C0), MP_ROM_PTR(&flipperzero_speaker_note_c0)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_CS0), MP_ROM_PTR(&flipperzero_speaker_note_cs0)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_D0), MP_ROM_PTR(&flipperzero_speaker_note_d0)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_DS0), MP_ROM_PTR(&flipperzero_speaker_note_ds0)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_E0), MP_ROM_PTR(&flipperzero_speaker_note_e0)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_F0), MP_ROM_PTR(&flipperzero_speaker_note_f0)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_FS0), MP_ROM_PTR(&flipperzero_speaker_note_fs0)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_G0), MP_ROM_PTR(&flipperzero_speaker_note_g0)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_GS0), MP_ROM_PTR(&flipperzero_speaker_note_gs0)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_A0), MP_ROM_PTR(&flipperzero_speaker_note_a0)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_AS0), MP_ROM_PTR(&flipperzero_speaker_note_as0)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_B0), MP_ROM_PTR(&flipperzero_speaker_note_b0)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_C1), MP_ROM_PTR(&flipperzero_speaker_note_c1)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_CS1), MP_ROM_PTR(&flipperzero_speaker_note_cs1)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_D1), MP_ROM_PTR(&flipperzero_speaker_note_d1)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_DS1), MP_ROM_PTR(&flipperzero_speaker_note_ds1)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_E1), MP_ROM_PTR(&flipperzero_speaker_note_e1)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_F1), MP_ROM_PTR(&flipperzero_speaker_note_f1)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_FS1), MP_ROM_PTR(&flipperzero_speaker_note_fs1)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_G1), MP_ROM_PTR(&flipperzero_speaker_note_g1)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_GS1), MP_ROM_PTR(&flipperzero_speaker_note_gs1)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_A1), MP_ROM_PTR(&flipperzero_speaker_note_a1)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_AS1), MP_ROM_PTR(&flipperzero_speaker_note_as1)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_B1), MP_ROM_PTR(&flipperzero_speaker_note_b1)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_C2), MP_ROM_PTR(&flipperzero_speaker_note_c2)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_CS2), MP_ROM_PTR(&flipperzero_speaker_note_cs2)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_D2), MP_ROM_PTR(&flipperzero_speaker_note_d2)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_DS2), MP_ROM_PTR(&flipperzero_speaker_note_ds2)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_E2), MP_ROM_PTR(&flipperzero_speaker_note_e2)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_F2), MP_ROM_PTR(&flipperzero_speaker_note_f2)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_FS2), MP_ROM_PTR(&flipperzero_speaker_note_fs2)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_G2), MP_ROM_PTR(&flipperzero_speaker_note_g2)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_GS2), MP_ROM_PTR(&flipperzero_speaker_note_gs2)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_A2), MP_ROM_PTR(&flipperzero_speaker_note_a2)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_AS2), MP_ROM_PTR(&flipperzero_speaker_note_as2)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_B2), MP_ROM_PTR(&flipperzero_speaker_note_b2)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_C3), MP_ROM_PTR(&flipperzero_speaker_note_c3)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_CS3), MP_ROM_PTR(&flipperzero_speaker_note_cs3)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_D3), MP_ROM_PTR(&flipperzero_speaker_note_d3)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_DS3), MP_ROM_PTR(&flipperzero_speaker_note_ds3)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_E3), MP_ROM_PTR(&flipperzero_speaker_note_e3)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_F3), MP_ROM_PTR(&flipperzero_speaker_note_f3)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_FS3), MP_ROM_PTR(&flipperzero_speaker_note_fs3)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_G3), MP_ROM_PTR(&flipperzero_speaker_note_g3)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_GS3), MP_ROM_PTR(&flipperzero_speaker_note_gs3)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_A3), MP_ROM_PTR(&flipperzero_speaker_note_a3)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_AS3), MP_ROM_PTR(&flipperzero_speaker_note_as3)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_B3), MP_ROM_PTR(&flipperzero_speaker_note_b3)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_C4), MP_ROM_PTR(&flipperzero_speaker_note_c4)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_CS4), MP_ROM_PTR(&flipperzero_speaker_note_cs4)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_D4), MP_ROM_PTR(&flipperzero_speaker_note_d4)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_DS4), MP_ROM_PTR(&flipperzero_speaker_note_ds4)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_E4), MP_ROM_PTR(&flipperzero_speaker_note_e4)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_F4), MP_ROM_PTR(&flipperzero_speaker_note_f4)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_FS4), MP_ROM_PTR(&flipperzero_speaker_note_fs4)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_G4), MP_ROM_PTR(&flipperzero_speaker_note_g4)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_GS4), MP_ROM_PTR(&flipperzero_speaker_note_gs4)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_A4), MP_ROM_PTR(&flipperzero_speaker_note_a4)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_AS4), MP_ROM_PTR(&flipperzero_speaker_note_as4)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_B4), MP_ROM_PTR(&flipperzero_speaker_note_b4)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_C5), MP_ROM_PTR(&flipperzero_speaker_note_c5)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_CS5), MP_ROM_PTR(&flipperzero_speaker_note_cs5)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_D5), MP_ROM_PTR(&flipperzero_speaker_note_d5)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_DS5), MP_ROM_PTR(&flipperzero_speaker_note_ds5)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_E5), MP_ROM_PTR(&flipperzero_speaker_note_e5)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_F5), MP_ROM_PTR(&flipperzero_speaker_note_f5)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_FS5), MP_ROM_PTR(&flipperzero_speaker_note_fs5)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_G5), MP_ROM_PTR(&flipperzero_speaker_note_g5)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_GS5), MP_ROM_PTR(&flipperzero_speaker_note_gs5)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_A5), MP_ROM_PTR(&flipperzero_speaker_note_a5)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_AS5), MP_ROM_PTR(&flipperzero_speaker_note_as5)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_B5), MP_ROM_PTR(&flipperzero_speaker_note_b5)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_C6), MP_ROM_PTR(&flipperzero_speaker_note_c6)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_CS6), MP_ROM_PTR(&flipperzero_speaker_note_cs6)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_D6), MP_ROM_PTR(&flipperzero_speaker_note_d6)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_DS6), MP_ROM_PTR(&flipperzero_speaker_note_ds6)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_E6), MP_ROM_PTR(&flipperzero_speaker_note_e6)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_F6), MP_ROM_PTR(&flipperzero_speaker_note_f6)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_FS6), MP_ROM_PTR(&flipperzero_speaker_note_fs6)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_G6), MP_ROM_PTR(&flipperzero_speaker_note_g6)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_GS6), MP_ROM_PTR(&flipperzero_speaker_note_gs6)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_A6), MP_ROM_PTR(&flipperzero_speaker_note_a6)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_AS6), MP_ROM_PTR(&flipperzero_speaker_note_as6)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_B6), MP_ROM_PTR(&flipperzero_speaker_note_b6)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_C7), MP_ROM_PTR(&flipperzero_speaker_note_c7)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_CS7), MP_ROM_PTR(&flipperzero_speaker_note_cs7)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_D7), MP_ROM_PTR(&flipperzero_speaker_note_d7)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_DS7), MP_ROM_PTR(&flipperzero_speaker_note_ds7)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_E7), MP_ROM_PTR(&flipperzero_speaker_note_e7)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_F7), MP_ROM_PTR(&flipperzero_speaker_note_f7)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_FS7), MP_ROM_PTR(&flipperzero_speaker_note_fs7)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_G7), MP_ROM_PTR(&flipperzero_speaker_note_g7)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_GS7), MP_ROM_PTR(&flipperzero_speaker_note_gs7)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_A7), MP_ROM_PTR(&flipperzero_speaker_note_a7)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_AS7), MP_ROM_PTR(&flipperzero_speaker_note_as7)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_B7), MP_ROM_PTR(&flipperzero_speaker_note_b7)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_C8), MP_ROM_PTR(&flipperzero_speaker_note_c8)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_CS8), MP_ROM_PTR(&flipperzero_speaker_note_cs8)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_D8), MP_ROM_PTR(&flipperzero_speaker_note_d8)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_DS8), MP_ROM_PTR(&flipperzero_speaker_note_ds8)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_E8), MP_ROM_PTR(&flipperzero_speaker_note_e8)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_F8), MP_ROM_PTR(&flipperzero_speaker_note_f8)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_FS8), MP_ROM_PTR(&flipperzero_speaker_note_fs8)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_G8), MP_ROM_PTR(&flipperzero_speaker_note_g8)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_GS8), MP_ROM_PTR(&flipperzero_speaker_note_gs8)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_A8), MP_ROM_PTR(&flipperzero_speaker_note_a8)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_AS8), MP_ROM_PTR(&flipperzero_speaker_note_as8)},
+    {MP_ROM_QSTR(MP_QSTR_SPEAKER_NOTE_B8), MP_ROM_PTR(&flipperzero_speaker_note_b8)},
     {MP_ROM_QSTR(MP_QSTR_speaker_start), MP_ROM_PTR(&flipperzero_speaker_start_obj)},
     {MP_ROM_QSTR(MP_QSTR_speaker_set_volume), MP_ROM_PTR(&flipperzero_speaker_set_volume_obj)},
     {MP_ROM_QSTR(MP_QSTR_speaker_stop), MP_ROM_PTR(&flipperzero_speaker_stop_obj)},

+ 134 - 0
mp_flipper_modflipperzero.h

@@ -40,7 +40,141 @@ void mp_flipper_light_blink_stop();
 
 void mp_flipper_vibro(bool state);
 
+/*
+Python script for notes generation
+
+# coding: utf-8
+# Python script for notes generation
+
+from typing import List
+
+note_names: List = ['C', 'CS', 'D', 'DS', 'E', 'F', 'FS', 'G', 'GS', 'A', 'AS', 'B']
+base_note: float = 16.3515979
+cf: float = 2 ** (1.0 / 12)
+
+note: float = base_note
+for octave in range(9):
+    for name in note_names:
+        print(f"#define MP_FLIPPER_SPEAKER_NOTE_{name}{octave} {round(note, 2)}f")
+        note = note * cf
+*/
+
 #define MP_FLIPPER_SPEAKER_NOTE_C0 16.35f
+#define MP_FLIPPER_SPEAKER_NOTE_CS0 17.32f
+#define MP_FLIPPER_SPEAKER_NOTE_D0 18.35f
+#define MP_FLIPPER_SPEAKER_NOTE_DS0 19.45f
+#define MP_FLIPPER_SPEAKER_NOTE_E0 20.6f
+#define MP_FLIPPER_SPEAKER_NOTE_F0 21.83f
+#define MP_FLIPPER_SPEAKER_NOTE_FS0 23.12f
+#define MP_FLIPPER_SPEAKER_NOTE_G0 24.5f
+#define MP_FLIPPER_SPEAKER_NOTE_GS0 25.96f
+#define MP_FLIPPER_SPEAKER_NOTE_A0 27.5f
+#define MP_FLIPPER_SPEAKER_NOTE_AS0 29.14f
+#define MP_FLIPPER_SPEAKER_NOTE_B0 30.87f
+
+#define MP_FLIPPER_SPEAKER_NOTE_C1 32.7f
+#define MP_FLIPPER_SPEAKER_NOTE_CS1 34.65f
+#define MP_FLIPPER_SPEAKER_NOTE_D1 36.71f
+#define MP_FLIPPER_SPEAKER_NOTE_DS1 38.89f
+#define MP_FLIPPER_SPEAKER_NOTE_E1 41.2f
+#define MP_FLIPPER_SPEAKER_NOTE_F1 43.65f
+#define MP_FLIPPER_SPEAKER_NOTE_FS1 46.25f
+#define MP_FLIPPER_SPEAKER_NOTE_G1 49.0f
+#define MP_FLIPPER_SPEAKER_NOTE_GS1 51.91f
+#define MP_FLIPPER_SPEAKER_NOTE_A1 55.0f
+#define MP_FLIPPER_SPEAKER_NOTE_AS1 58.27f
+#define MP_FLIPPER_SPEAKER_NOTE_B1 61.74f
+
+#define MP_FLIPPER_SPEAKER_NOTE_C2 65.41f
+#define MP_FLIPPER_SPEAKER_NOTE_CS2 69.3f
+#define MP_FLIPPER_SPEAKER_NOTE_D2 73.42f
+#define MP_FLIPPER_SPEAKER_NOTE_DS2 77.78f
+#define MP_FLIPPER_SPEAKER_NOTE_E2 82.41f
+#define MP_FLIPPER_SPEAKER_NOTE_F2 87.31f
+#define MP_FLIPPER_SPEAKER_NOTE_FS2 92.5f
+#define MP_FLIPPER_SPEAKER_NOTE_G2 98.0f
+#define MP_FLIPPER_SPEAKER_NOTE_GS2 103.83f
+#define MP_FLIPPER_SPEAKER_NOTE_A2 110.0f
+#define MP_FLIPPER_SPEAKER_NOTE_AS2 116.54f
+#define MP_FLIPPER_SPEAKER_NOTE_B2 123.47f
+
+#define MP_FLIPPER_SPEAKER_NOTE_C3 130.81f
+#define MP_FLIPPER_SPEAKER_NOTE_CS3 138.59f
+#define MP_FLIPPER_SPEAKER_NOTE_D3 146.83f
+#define MP_FLIPPER_SPEAKER_NOTE_DS3 155.56f
+#define MP_FLIPPER_SPEAKER_NOTE_E3 164.81f
+#define MP_FLIPPER_SPEAKER_NOTE_F3 174.61f
+#define MP_FLIPPER_SPEAKER_NOTE_FS3 185.0f
+#define MP_FLIPPER_SPEAKER_NOTE_G3 196.0f
+#define MP_FLIPPER_SPEAKER_NOTE_GS3 207.65f
+#define MP_FLIPPER_SPEAKER_NOTE_A3 220.0f
+#define MP_FLIPPER_SPEAKER_NOTE_AS3 233.08f
+#define MP_FLIPPER_SPEAKER_NOTE_B3 246.94f
+
+#define MP_FLIPPER_SPEAKER_NOTE_C4 261.63f
+#define MP_FLIPPER_SPEAKER_NOTE_CS4 277.18f
+#define MP_FLIPPER_SPEAKER_NOTE_D4 293.66f
+#define MP_FLIPPER_SPEAKER_NOTE_DS4 311.13f
+#define MP_FLIPPER_SPEAKER_NOTE_E4 329.63f
+#define MP_FLIPPER_SPEAKER_NOTE_F4 349.23f
+#define MP_FLIPPER_SPEAKER_NOTE_FS4 369.99f
+#define MP_FLIPPER_SPEAKER_NOTE_G4 392.0f
+#define MP_FLIPPER_SPEAKER_NOTE_GS4 415.3f
+#define MP_FLIPPER_SPEAKER_NOTE_A4 440.0f
+#define MP_FLIPPER_SPEAKER_NOTE_AS4 466.16f
+#define MP_FLIPPER_SPEAKER_NOTE_B4 493.88f
+
+#define MP_FLIPPER_SPEAKER_NOTE_C5 523.25f
+#define MP_FLIPPER_SPEAKER_NOTE_CS5 554.37f
+#define MP_FLIPPER_SPEAKER_NOTE_D5 587.33f
+#define MP_FLIPPER_SPEAKER_NOTE_DS5 622.25f
+#define MP_FLIPPER_SPEAKER_NOTE_E5 659.26f
+#define MP_FLIPPER_SPEAKER_NOTE_F5 698.46f
+#define MP_FLIPPER_SPEAKER_NOTE_FS5 739.99f
+#define MP_FLIPPER_SPEAKER_NOTE_G5 783.99f
+#define MP_FLIPPER_SPEAKER_NOTE_GS5 830.61f
+#define MP_FLIPPER_SPEAKER_NOTE_A5 880.0f
+#define MP_FLIPPER_SPEAKER_NOTE_AS5 932.33f
+#define MP_FLIPPER_SPEAKER_NOTE_B5 987.77f
+
+#define MP_FLIPPER_SPEAKER_NOTE_C6 1046.5f
+#define MP_FLIPPER_SPEAKER_NOTE_CS6 1108.73f
+#define MP_FLIPPER_SPEAKER_NOTE_D6 1174.66f
+#define MP_FLIPPER_SPEAKER_NOTE_DS6 1244.51f
+#define MP_FLIPPER_SPEAKER_NOTE_E6 1318.51f
+#define MP_FLIPPER_SPEAKER_NOTE_F6 1396.91f
+#define MP_FLIPPER_SPEAKER_NOTE_FS6 1479.98f
+#define MP_FLIPPER_SPEAKER_NOTE_G6 1567.98f
+#define MP_FLIPPER_SPEAKER_NOTE_GS6 1661.22f
+#define MP_FLIPPER_SPEAKER_NOTE_A6 1760.0f
+#define MP_FLIPPER_SPEAKER_NOTE_AS6 1864.66f
+#define MP_FLIPPER_SPEAKER_NOTE_B6 1975.53f
+
+#define MP_FLIPPER_SPEAKER_NOTE_C7 2093.0f
+#define MP_FLIPPER_SPEAKER_NOTE_CS7 2217.46f
+#define MP_FLIPPER_SPEAKER_NOTE_D7 2349.32f
+#define MP_FLIPPER_SPEAKER_NOTE_DS7 2489.02f
+#define MP_FLIPPER_SPEAKER_NOTE_E7 2637.02f
+#define MP_FLIPPER_SPEAKER_NOTE_F7 2793.83f
+#define MP_FLIPPER_SPEAKER_NOTE_FS7 2959.96f
+#define MP_FLIPPER_SPEAKER_NOTE_G7 3135.96f
+#define MP_FLIPPER_SPEAKER_NOTE_GS7 3322.44f
+#define MP_FLIPPER_SPEAKER_NOTE_A7 3520.0f
+#define MP_FLIPPER_SPEAKER_NOTE_AS7 3729.31f
+#define MP_FLIPPER_SPEAKER_NOTE_B7 3951.07f
+
+#define MP_FLIPPER_SPEAKER_NOTE_C8 4186.01f
+#define MP_FLIPPER_SPEAKER_NOTE_CS8 4434.92f
+#define MP_FLIPPER_SPEAKER_NOTE_D8 4698.64f
+#define MP_FLIPPER_SPEAKER_NOTE_DS8 4978.03f
+#define MP_FLIPPER_SPEAKER_NOTE_E8 5274.04f
+#define MP_FLIPPER_SPEAKER_NOTE_F8 5587.65f
+#define MP_FLIPPER_SPEAKER_NOTE_FS8 5919.91f
+#define MP_FLIPPER_SPEAKER_NOTE_G8 6271.93f
+#define MP_FLIPPER_SPEAKER_NOTE_GS8 6644.88f
+#define MP_FLIPPER_SPEAKER_NOTE_A8 7040.0f
+#define MP_FLIPPER_SPEAKER_NOTE_AS8 7458.62f
+#define MP_FLIPPER_SPEAKER_NOTE_B8 7902.13f
 
 bool mp_flipper_speaker_start(float frequency, float volume);
 bool mp_flipper_speaker_set_volume(float volume);