├── d3d9.dll ├── freepiano.cfg ├── freepiano.exe ├── keymap ├── flashpiano.map ├── freepiano.map └── idreampiano.map ├── plugins ├── plugin_sf2.dll └── plugin_xfmp4.exe ├── readme.md ├── song ├── Demo - 1981.fpm ├── Demo - A Comme Amour.fpm ├── Demo - Aries Sadness.fpm ├── Demo - Ballade pour Adeline.fpm ├── Demo - Canon.fpm ├── Demo - Comptine D'un Autre Ete-L'Apres.fpm ├── Demo - Flower dance.fpm ├── Demo - For Elise.fpm ├── Demo - Forrest Gump Suite.fpm ├── Demo - I Like Chopin.fpm ├── Demo - Impromptu Canon.fpm ├── Demo - Innocent.fpm ├── Demo - Kiss the rain.fpm ├── Demo - Love Is Blue.fpm ├── Demo - Lyphard Melody.fpm ├── Demo - Melody Of The Night 5.fpm ├── Demo - Murmures.fpm ├── Demo - Nocturne No 2.fpm ├── Demo - Pirates of the Caribbean.fpm ├── Demo - River Flowers In You.fpm ├── Demo - Secret.fpm ├── Demo - Snow Dream.fpm ├── Demo - Tears.fpm ├── Demo - The First Snowflakes.fpm ├── Demo - The dawn.fpm ├── Demo - The entertainer.fpm ├── Demo - The truth that you leave.fpm ├── Demo - Through the arbor.fpm ├── Demo - Triste Coeur.fpm ├── Demo - Turkey March.fpm ├── Demo - Vanessa's First Smiles.fpm ├── Demo - What Are Words.fpm ├── Demo - Wind in the street.fpm ├── Demo - 星の在り処.fpm ├── Demo - 残酷な天使のように.fpm ├── Demo - 流恋.fpm ├── Demo - 童话.fpm ├── Lesson 1 - Twlnkle Twlnkle Little Star.fpm ├── Lesson 2 - Song Of Farewell.fpm ├── Lesson 3 - Lonely.fpm ├── Lesson 4 - Childhood Memory.fpm ├── Lesson 5 - Innocent.fpm └── helloworld.mid ├── src ├── codeing_piano.sln ├── codeing_piano.suo ├── d3d9.cpp ├── hook.cpp ├── hook.h └── injkey.vcproj └── vsti └── mdaPiano.dll /d3d9.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anhkgg/coding_piano/37c5f7cf169c3971d6a0d800fc67a13000875bfb/d3d9.dll -------------------------------------------------------------------------------- /freepiano.cfg: -------------------------------------------------------------------------------- 1 | instrument type VSTi 2 | instrument path mdaPiano 3 | instrument showui 0 4 | keyboard map freepiano.map 5 | key-fade 60 6 | gui-auto-color 2 7 | -------------------------------------------------------------------------------- /freepiano.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anhkgg/coding_piano/37c5f7cf169c3971d6a0d800fc67a13000875bfb/freepiano.exe -------------------------------------------------------------------------------- /keymap/flashpiano.map: -------------------------------------------------------------------------------- 1 | FreePiano 2.0 2 | 3 | Sustain 0 Set 127 4 | Velocity 0 Set 100 5 | Velocity 1 Set 100 6 | 7 | key a NoteOn 0 c2 8 | key b NoteOn 0 d2 9 | key c NoteOn 0 e2 10 | key d NoteOn 0 f2 11 | key e NoteOn 0 g2 12 | key f NoteOn 0 a2 13 | key g NoteOn 0 b2 14 | key - NoteOn 0 c#2 15 | key [ NoteOn 0 d#2 16 | key ` NoteOn 0 f#2 17 | key ; NoteOn 0 g#2 18 | key 1 NoteOn 0 a#2 19 | 20 | key h NoteOn 0 c3 21 | key i NoteOn 0 d3 22 | key j NoteOn 0 e3 23 | key k NoteOn 0 f3 24 | key l NoteOn 0 g3 25 | key m NoteOn 0 a3 26 | key n NoteOn 0 b3 27 | key 2 NoteOn 0 c#3 28 | key 3 NoteOn 0 d#3 29 | key 4 NoteOn 0 f#3 30 | key 5 NoteOn 0 g#3 31 | key 6 NoteOn 0 a#3 32 | 33 | key o NoteOn 0 c4 34 | key p NoteOn 0 d4 35 | key q NoteOn 0 e4 36 | key r NoteOn 0 f4 37 | key s NoteOn 0 g4 38 | key t NoteOn 0 a4 39 | key u NoteOn 0 b4 40 | key 7 NoteOn 0 c#4 41 | key 8 NoteOn 0 d#4 42 | key 9 NoteOn 0 f#4 43 | key 0 NoteOn 0 g#4 44 | key ' NoteOn 0 a#4 45 | 46 | key v NoteOn 0 c5 47 | key w NoteOn 0 d5 48 | key x NoteOn 0 e5 49 | key y NoteOn 0 f5 50 | key z NoteOn 0 g5 51 | key tab NoteOn 0 a5 52 | key space NoteOn 0 b5 53 | key , NoteOn 0 c#5 54 | key . NoteOn 0 d#5 55 | key / NoteOn 0 f#5 56 | key = NoteOn 0 g#5 57 | key f1 NoteOn 0 a#5 58 | 59 | key caps NoteOn 0 c6 60 | key ] NoteOn 0 d6 61 | key enter NoteOn 0 e6 62 | key \ NoteOn 0 f6 63 | key f5 NoteOn 0 g6 64 | key f7 NoteOn 0 a6 65 | key f9 NoteOn 0 b6 66 | key f2 NoteOn 0 c#6 67 | key f3 NoteOn 0 d#6 68 | key f4 NoteOn 0 f#6 69 | key f6 NoteOn 0 g#6 70 | key f8 NoteOn 0 a#6 71 | 72 | keydown up KeySignature Inc 1 73 | label up Key+ 74 | keydown down KeySignature Dec 1 75 | label down Key- 76 | keydown right KeyboardVeolcity 0 Inc 10 77 | label right Vel+ 78 | keydown left KeyboardVeolcity 0 Dec 10 79 | label left Vel- 80 | 81 | keydown ScrollLock Record 82 | label ScrollLock Rec 83 | keydown PrintScreen Play 84 | label PrintScreen Play 85 | keydown Pause Stop 86 | label Pause Stop 87 | 88 | 89 | label Esc Esc 90 | label F1 F1 91 | label F2 F2 92 | label F3 F3 93 | label F4 F4 94 | label F5 F5 95 | label F6 F6 96 | label F7 F7 97 | label F8 F8 98 | label F9 F9 99 | label F10 F10 100 | label F11 F11 101 | label F12 F12 102 | label ~ ~ 103 | label 1 1 104 | label 2 2 105 | label 3 3 106 | label 4 4 107 | label 5 5 108 | label 6 6 109 | label 7 7 110 | label 8 8 111 | label 9 9 112 | label 0 0 113 | label - - 114 | label = = 115 | label Backspace Backspace 116 | label Tab Tab 117 | label Q Q 118 | label W W 119 | label E E 120 | label R R 121 | label T T 122 | label Y Y 123 | label U U 124 | label I I 125 | label O O 126 | label P P 127 | label [ [ 128 | label ] ] 129 | label \ \ 130 | label Caps Caps 131 | label A A 132 | label S S 133 | label D D 134 | label F F 135 | label G G 136 | label H H 137 | label J J 138 | label K K 139 | label L L 140 | label ; ; 141 | label ' ' 142 | label Enter Enter 143 | label Shift Shift 144 | label Z Z 145 | label X X 146 | label C C 147 | label V V 148 | label B B 149 | label N N 150 | label M M 151 | label , , 152 | label . . 153 | label / / 154 | label RShift Shift 155 | label Ctrl Ctrl 156 | label Win Win 157 | label Alt Alt 158 | label Space 159 | label RAlt Alt 160 | label RWin Win 161 | label Apps Menu 162 | label RCtrl Ctrl 163 | 164 | label Insert Ins 165 | label Home Home 166 | label Pgup PgUp 167 | label Delete Del 168 | label End End 169 | label Pgdn PgDn 170 | 171 | label NumLock Num 172 | label Num0 0 173 | label Num. . 174 | label NumEnter Ret 175 | label Num1 1 176 | label Num2 2 177 | label Num3 3 178 | label Num4 4 179 | label Num5 5 180 | label Num6 6 181 | label Num7 7 182 | label Num8 8 183 | label Num9 9 184 | label Num* * 185 | label Num/ / 186 | label Num+ + 187 | label Num- - 188 | -------------------------------------------------------------------------------- /keymap/freepiano.map: -------------------------------------------------------------------------------- 1 | FreePiano 2.0 2 | 3 | Velocity In_0 80 4 | Velocity In_1 100 5 | Sustain In_0 127 6 | 7 | # keyname action channel note 8 | key left NoteOn 1 c3 9 | key down NoteOn 1 d3 10 | key right NoteOn 1 e3 11 | key up NoteOn 1 f3 12 | key num0 NoteOn 1 g3 13 | key num. NoteOn 1 a3 14 | key numenter NoteOn 1 b3 15 | key num1 NoteOn 1 c4 16 | key num2 NoteOn 1 d4 17 | key num3 NoteOn 1 e4 18 | key num4 NoteOn 1 f4 19 | key num5 NoteOn 1 g4 20 | key num6 NoteOn 1 a4 21 | key num7 NoteOn 1 b4 22 | key num8 NoteOn 1 c5 23 | key num9 NoteOn 1 d5 24 | key num+ NoteOn 1 e5 25 | key numlock NoteOn 1 f5 26 | key num/ NoteOn 1 g5 27 | key num* NoteOn 1 a5 28 | key num- NoteOn 1 b5 29 | key delete NoteOn 1 c6 30 | key end NoteOn 1 d6 31 | key pgdn NoteOn 1 e6 32 | key insert NoteOn 1 f6 33 | key home NoteOn 1 g6 34 | key pgup NoteOn 1 a6 35 | 36 | key shift NoteOn 0 b1 37 | key z NoteOn 0 c2 38 | key x NoteOn 0 d2 39 | key c NoteOn 0 e2 40 | key v NoteOn 0 f2 41 | key b NoteOn 0 g2 42 | key n NoteOn 0 a2 43 | key m NoteOn 0 b2 44 | key , NoteOn 0 c3 45 | key . NoteOn 0 d3 46 | key / NoteOn 0 e3 47 | key rshift NoteOn 0 f3 48 | 49 | key caps NoteOn 0 b2 50 | key a NoteOn 0 c3 51 | key s NoteOn 0 d3 52 | key d NoteOn 0 e3 53 | key f NoteOn 0 f3 54 | key g NoteOn 0 g3 55 | key h NoteOn 0 a3 56 | key j NoteOn 0 b3 57 | key k NoteOn 0 c4 58 | key l NoteOn 0 d4 59 | key ; NoteOn 0 e4 60 | key ' NoteOn 0 f4 61 | key enter NoteOn 0 g4 62 | 63 | key tab NoteOn 0 b3 64 | key q NoteOn 0 c4 65 | key w NoteOn 0 d4 66 | key e NoteOn 0 e4 67 | key r NoteOn 0 f4 68 | key t NoteOn 0 g4 69 | key y NoteOn 0 a4 70 | key u NoteOn 0 b4 71 | key i NoteOn 0 c5 72 | key o NoteOn 0 d5 73 | key p NoteOn 0 e5 74 | key [ NoteOn 0 f5 75 | key ] NoteOn 0 g5 76 | key \ NoteOn 0 a5 77 | 78 | key ` NoteOn 0 b4 79 | key 1 NoteOn 0 c5 80 | key 2 NoteOn 0 d5 81 | key 3 NoteOn 0 e5 82 | key 4 NoteOn 0 f5 83 | key 5 NoteOn 0 g5 84 | key 6 NoteOn 0 a5 85 | key 7 NoteOn 0 b5 86 | key 8 NoteOn 0 c6 87 | key 9 NoteOn 0 d6 88 | key 0 NoteOn 0 e6 89 | key - NoteOn 0 f6 90 | key = NoteOn 0 g6 91 | key back NoteOn 0 a6 92 | 93 | keydown ESC Sustain In_0 Release 0 94 | 95 | keydown F1 Group Inc 1 96 | keydown F2 Group Dec 1 97 | keydown F3 KeySignature Inc 1 98 | keydown F4 KeySignature Dec 1 99 | 100 | keydown F5 Octshift 0 Inc 1 101 | keydown F6 Octshift 0 Dec 1 102 | keydown F7 Octshift 1 Inc 1 103 | keydown F8 Octshift 1 Dec 1 104 | 105 | keydown F9 Velocity In_0 Inc 1 106 | keydown F10 Velocity In_0 Dec 1 107 | keydown F11 Velocity In_1 Inc 1 108 | keydown F12 Velocity In_1 Dec 1 109 | 110 | keydown PrintScreen Play 111 | keydown ScrollLock Record 112 | keydown Pause Menu 113 | 114 | label space FreePiano 115 | -------------------------------------------------------------------------------- /keymap/idreampiano.map: -------------------------------------------------------------------------------- 1 | FreePiano 2.0 2 | 3 | Sustain 0 127 4 | Velocity 0 80 5 | Velocity 1 100 6 | 7 | key left NoteOn 1 c3 8 | key down NoteOn 1 d3 9 | key right NoteOn 1 e3 10 | key up NoteOn 1 f3 11 | key num0 NoteOn 1 g3 12 | key num. NoteOn 1 a3 13 | key numenter NoteOn 1 b3 14 | key num1 NoteOn 1 c4 15 | key num2 NoteOn 1 d4 16 | key num3 NoteOn 1 e4 17 | key num4 NoteOn 1 f4 18 | key num5 NoteOn 1 g4 19 | key num6 NoteOn 1 a4 20 | key num7 NoteOn 1 b4 21 | key num8 NoteOn 1 c5 22 | key num9 NoteOn 1 d5 23 | key num+ NoteOn 1 e5 24 | key numlock NoteOn 1 f5 25 | key num/ NoteOn 1 g5 26 | key num* NoteOn 1 a5 27 | key num- NoteOn 1 b5 28 | key delete NoteOn 1 c6 29 | key end NoteOn 1 d6 30 | key pgdn NoteOn 1 e6 31 | key insert NoteOn 1 f6 32 | key home NoteOn 1 g6 33 | key pgup NoteOn 1 a6 34 | 35 | key z NoteOn 0 c2 36 | key x NoteOn 0 d2 37 | key c NoteOn 0 e2 38 | key v NoteOn 0 f2 39 | key b NoteOn 0 g2 40 | key n NoteOn 0 a2 41 | key m NoteOn 0 b2 42 | key , NoteOn 0 c3 43 | key . NoteOn 0 d3 44 | key / NoteOn 0 e3 45 | 46 | key a NoteOn 0 c3 47 | key s NoteOn 0 d3 48 | key d NoteOn 0 e3 49 | key f NoteOn 0 f3 50 | key g NoteOn 0 g3 51 | key h NoteOn 0 a3 52 | key j NoteOn 0 b3 53 | key k NoteOn 0 c4 54 | key l NoteOn 0 d4 55 | key ; NoteOn 0 e4 56 | key ' NoteOn 0 f4 57 | 58 | key q NoteOn 0 c4 59 | key w NoteOn 0 d4 60 | key e NoteOn 0 e4 61 | key r NoteOn 0 f4 62 | key t NoteOn 0 g4 63 | key y NoteOn 0 a4 64 | key u NoteOn 0 b4 65 | key i NoteOn 0 c5 66 | key o NoteOn 0 d5 67 | key p NoteOn 0 e5 68 | key [ NoteOn 0 f5 69 | key ] NoteOn 0 g5 70 | 71 | key 1 NoteOn 0 c5 72 | key 2 NoteOn 0 d5 73 | key 3 NoteOn 0 e5 74 | key 4 NoteOn 0 f5 75 | key 5 NoteOn 0 g5 76 | key 6 NoteOn 0 a5 77 | key 7 NoteOn 0 b5 78 | key 8 NoteOn 0 c6 79 | key 9 NoteOn 0 d6 80 | key 0 NoteOn 0 e6 81 | key - NoteOn 0 f6 82 | key = NoteOn 0 g6 83 | key \ NoteOn 0 a6 84 | 85 | label space FreePiano 86 | -------------------------------------------------------------------------------- /plugins/plugin_sf2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anhkgg/coding_piano/37c5f7cf169c3971d6a0d800fc67a13000875bfb/plugins/plugin_sf2.dll -------------------------------------------------------------------------------- /plugins/plugin_xfmp4.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anhkgg/coding_piano/37c5f7cf169c3971d6a0d800fc67a13000875bfb/plugins/plugin_xfmp4.exe -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | # 概述 2 | 3 | 给[freepiano](http://freepiano.tiwb.com/cn/)装了个小插件,让它可以在任何位置接受到键盘输入,这样程序员在写代码时,也可以听到悠扬的钢琴声 4 | 5 | 我的愿景: 6 | 7 | 让代码变成一首钢琴曲,让程序员也成为钢琴大师! 8 | 9 | # 其他 10 | 11 | 感谢freepiano的作者,让我可以完成这个小功能,让我写代码也听到好听的琴声! 12 | 13 | 更多详情请看:[http://anhkgg.github.io/coding-piano-hook](http://anhkgg.github.io/coding-piano-hook) 14 | 15 | -------------------------------------------------------------------------------- /song/Demo - 1981.fpm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anhkgg/coding_piano/37c5f7cf169c3971d6a0d800fc67a13000875bfb/song/Demo - 1981.fpm -------------------------------------------------------------------------------- /song/Demo - A Comme Amour.fpm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anhkgg/coding_piano/37c5f7cf169c3971d6a0d800fc67a13000875bfb/song/Demo - A Comme Amour.fpm -------------------------------------------------------------------------------- /song/Demo - Aries Sadness.fpm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anhkgg/coding_piano/37c5f7cf169c3971d6a0d800fc67a13000875bfb/song/Demo - Aries Sadness.fpm -------------------------------------------------------------------------------- /song/Demo - Ballade pour Adeline.fpm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anhkgg/coding_piano/37c5f7cf169c3971d6a0d800fc67a13000875bfb/song/Demo - Ballade pour Adeline.fpm -------------------------------------------------------------------------------- /song/Demo - Canon.fpm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anhkgg/coding_piano/37c5f7cf169c3971d6a0d800fc67a13000875bfb/song/Demo - Canon.fpm -------------------------------------------------------------------------------- /song/Demo - Comptine D'un Autre Ete-L'Apres.fpm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anhkgg/coding_piano/37c5f7cf169c3971d6a0d800fc67a13000875bfb/song/Demo - Comptine D'un Autre Ete-L'Apres.fpm -------------------------------------------------------------------------------- /song/Demo - Flower dance.fpm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anhkgg/coding_piano/37c5f7cf169c3971d6a0d800fc67a13000875bfb/song/Demo - Flower dance.fpm -------------------------------------------------------------------------------- /song/Demo - For Elise.fpm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anhkgg/coding_piano/37c5f7cf169c3971d6a0d800fc67a13000875bfb/song/Demo - For Elise.fpm -------------------------------------------------------------------------------- /song/Demo - Forrest Gump Suite.fpm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anhkgg/coding_piano/37c5f7cf169c3971d6a0d800fc67a13000875bfb/song/Demo - Forrest Gump Suite.fpm -------------------------------------------------------------------------------- /song/Demo - I Like Chopin.fpm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anhkgg/coding_piano/37c5f7cf169c3971d6a0d800fc67a13000875bfb/song/Demo - I Like Chopin.fpm -------------------------------------------------------------------------------- /song/Demo - Impromptu Canon.fpm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anhkgg/coding_piano/37c5f7cf169c3971d6a0d800fc67a13000875bfb/song/Demo - Impromptu Canon.fpm -------------------------------------------------------------------------------- /song/Demo - Innocent.fpm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anhkgg/coding_piano/37c5f7cf169c3971d6a0d800fc67a13000875bfb/song/Demo - Innocent.fpm -------------------------------------------------------------------------------- /song/Demo - Kiss the rain.fpm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anhkgg/coding_piano/37c5f7cf169c3971d6a0d800fc67a13000875bfb/song/Demo - Kiss the rain.fpm -------------------------------------------------------------------------------- /song/Demo - Love Is Blue.fpm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anhkgg/coding_piano/37c5f7cf169c3971d6a0d800fc67a13000875bfb/song/Demo - Love Is Blue.fpm -------------------------------------------------------------------------------- /song/Demo - Lyphard Melody.fpm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anhkgg/coding_piano/37c5f7cf169c3971d6a0d800fc67a13000875bfb/song/Demo - Lyphard Melody.fpm -------------------------------------------------------------------------------- /song/Demo - Melody Of The Night 5.fpm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anhkgg/coding_piano/37c5f7cf169c3971d6a0d800fc67a13000875bfb/song/Demo - Melody Of The Night 5.fpm -------------------------------------------------------------------------------- /song/Demo - Murmures.fpm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anhkgg/coding_piano/37c5f7cf169c3971d6a0d800fc67a13000875bfb/song/Demo - Murmures.fpm -------------------------------------------------------------------------------- /song/Demo - Nocturne No 2.fpm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anhkgg/coding_piano/37c5f7cf169c3971d6a0d800fc67a13000875bfb/song/Demo - Nocturne No 2.fpm -------------------------------------------------------------------------------- /song/Demo - Pirates of the Caribbean.fpm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anhkgg/coding_piano/37c5f7cf169c3971d6a0d800fc67a13000875bfb/song/Demo - Pirates of the Caribbean.fpm -------------------------------------------------------------------------------- /song/Demo - River Flowers In You.fpm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anhkgg/coding_piano/37c5f7cf169c3971d6a0d800fc67a13000875bfb/song/Demo - River Flowers In You.fpm -------------------------------------------------------------------------------- /song/Demo - Secret.fpm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anhkgg/coding_piano/37c5f7cf169c3971d6a0d800fc67a13000875bfb/song/Demo - Secret.fpm -------------------------------------------------------------------------------- /song/Demo - Snow Dream.fpm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anhkgg/coding_piano/37c5f7cf169c3971d6a0d800fc67a13000875bfb/song/Demo - Snow Dream.fpm -------------------------------------------------------------------------------- /song/Demo - Tears.fpm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anhkgg/coding_piano/37c5f7cf169c3971d6a0d800fc67a13000875bfb/song/Demo - Tears.fpm -------------------------------------------------------------------------------- /song/Demo - The First Snowflakes.fpm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anhkgg/coding_piano/37c5f7cf169c3971d6a0d800fc67a13000875bfb/song/Demo - The First Snowflakes.fpm -------------------------------------------------------------------------------- /song/Demo - The dawn.fpm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anhkgg/coding_piano/37c5f7cf169c3971d6a0d800fc67a13000875bfb/song/Demo - The dawn.fpm -------------------------------------------------------------------------------- /song/Demo - The entertainer.fpm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anhkgg/coding_piano/37c5f7cf169c3971d6a0d800fc67a13000875bfb/song/Demo - The entertainer.fpm -------------------------------------------------------------------------------- /song/Demo - The truth that you leave.fpm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anhkgg/coding_piano/37c5f7cf169c3971d6a0d800fc67a13000875bfb/song/Demo - The truth that you leave.fpm -------------------------------------------------------------------------------- /song/Demo - Through the arbor.fpm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anhkgg/coding_piano/37c5f7cf169c3971d6a0d800fc67a13000875bfb/song/Demo - Through the arbor.fpm -------------------------------------------------------------------------------- /song/Demo - Triste Coeur.fpm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anhkgg/coding_piano/37c5f7cf169c3971d6a0d800fc67a13000875bfb/song/Demo - Triste Coeur.fpm -------------------------------------------------------------------------------- /song/Demo - Turkey March.fpm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anhkgg/coding_piano/37c5f7cf169c3971d6a0d800fc67a13000875bfb/song/Demo - Turkey March.fpm -------------------------------------------------------------------------------- /song/Demo - Vanessa's First Smiles.fpm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anhkgg/coding_piano/37c5f7cf169c3971d6a0d800fc67a13000875bfb/song/Demo - Vanessa's First Smiles.fpm -------------------------------------------------------------------------------- /song/Demo - What Are Words.fpm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anhkgg/coding_piano/37c5f7cf169c3971d6a0d800fc67a13000875bfb/song/Demo - What Are Words.fpm -------------------------------------------------------------------------------- /song/Demo - Wind in the street.fpm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anhkgg/coding_piano/37c5f7cf169c3971d6a0d800fc67a13000875bfb/song/Demo - Wind in the street.fpm -------------------------------------------------------------------------------- /song/Demo - 星の在り処.fpm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anhkgg/coding_piano/37c5f7cf169c3971d6a0d800fc67a13000875bfb/song/Demo - 星の在り処.fpm -------------------------------------------------------------------------------- /song/Demo - 残酷な天使のように.fpm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anhkgg/coding_piano/37c5f7cf169c3971d6a0d800fc67a13000875bfb/song/Demo - 残酷な天使のように.fpm -------------------------------------------------------------------------------- /song/Demo - 流恋.fpm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anhkgg/coding_piano/37c5f7cf169c3971d6a0d800fc67a13000875bfb/song/Demo - 流恋.fpm -------------------------------------------------------------------------------- /song/Demo - 童话.fpm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anhkgg/coding_piano/37c5f7cf169c3971d6a0d800fc67a13000875bfb/song/Demo - 童话.fpm -------------------------------------------------------------------------------- /song/Lesson 1 - Twlnkle Twlnkle Little Star.fpm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anhkgg/coding_piano/37c5f7cf169c3971d6a0d800fc67a13000875bfb/song/Lesson 1 - Twlnkle Twlnkle Little Star.fpm -------------------------------------------------------------------------------- /song/Lesson 2 - Song Of Farewell.fpm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anhkgg/coding_piano/37c5f7cf169c3971d6a0d800fc67a13000875bfb/song/Lesson 2 - Song Of Farewell.fpm -------------------------------------------------------------------------------- /song/Lesson 3 - Lonely.fpm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anhkgg/coding_piano/37c5f7cf169c3971d6a0d800fc67a13000875bfb/song/Lesson 3 - Lonely.fpm -------------------------------------------------------------------------------- /song/Lesson 4 - Childhood Memory.fpm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anhkgg/coding_piano/37c5f7cf169c3971d6a0d800fc67a13000875bfb/song/Lesson 4 - Childhood Memory.fpm -------------------------------------------------------------------------------- /song/Lesson 5 - Innocent.fpm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anhkgg/coding_piano/37c5f7cf169c3971d6a0d800fc67a13000875bfb/song/Lesson 5 - Innocent.fpm -------------------------------------------------------------------------------- /song/helloworld.mid: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anhkgg/coding_piano/37c5f7cf169c3971d6a0d800fc67a13000875bfb/song/helloworld.mid -------------------------------------------------------------------------------- /src/codeing_piano.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 10.00 3 | # Visual Studio 2008 4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "coding_piano", "injkey.vcproj", "{E69F9F42-5F9B-409F-ABA1-25F11E279A46}" 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 8 | Debug|Win32 = Debug|Win32 9 | Release|Win32 = Release|Win32 10 | EndGlobalSection 11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 12 | {E69F9F42-5F9B-409F-ABA1-25F11E279A46}.Debug|Win32.ActiveCfg = Debug|Win32 13 | {E69F9F42-5F9B-409F-ABA1-25F11E279A46}.Debug|Win32.Build.0 = Debug|Win32 14 | {E69F9F42-5F9B-409F-ABA1-25F11E279A46}.Release|Win32.ActiveCfg = Release|Win32 15 | {E69F9F42-5F9B-409F-ABA1-25F11E279A46}.Release|Win32.Build.0 = Release|Win32 16 | EndGlobalSection 17 | GlobalSection(SolutionProperties) = preSolution 18 | HideSolutionNode = FALSE 19 | EndGlobalSection 20 | EndGlobal 21 | -------------------------------------------------------------------------------- /src/codeing_piano.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anhkgg/coding_piano/37c5f7cf169c3971d6a0d800fc67a13000875bfb/src/codeing_piano.suo -------------------------------------------------------------------------------- /src/d3d9.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anhkgg/coding_piano/37c5f7cf169c3971d6a0d800fc67a13000875bfb/src/d3d9.cpp -------------------------------------------------------------------------------- /src/hook.cpp: -------------------------------------------------------------------------------- 1 | //#include "stdafx.h" 2 | #include "hook.h" 3 | #include 4 | 5 | #pragma data_seg(".CODING_PIANO") 6 | HHOOK g_Hook = NULL; 7 | #pragma data_seg() 8 | #pragma comment(linker, "/section:.CODING_PIANO,rws") 9 | 10 | typedef struct _KeyboardLL_Msg 11 | { 12 | int nCode; 13 | WPARAM wParam; 14 | KBDLLHOOKSTRUCT lParam; 15 | }KeyboardLL_Msg, *PKeyboardLL_Msg; 16 | 17 | bool keydown = true; 18 | HWND FindFreepiano() 19 | { 20 | HWND hwnd = FindWindow("FreePianoMainWindow", "Wispow Freepiano 2"); 21 | if(hwnd == NULL) 22 | { 23 | hwnd = FindWindow("FreePianoMainWindow", NULL); 24 | if(hwnd == NULL) 25 | { 26 | hwnd = FindWindow(NULL, "Wispow Freepiano 2"); 27 | } 28 | } 29 | 30 | return hwnd; 31 | } 32 | 33 | typedef 34 | LRESULT (CALLBACK* pfn_LowLevelKeyboardProc)( int nCode, // hook code 35 | WPARAM wParam, // message identifier 36 | LPARAM lParam // message data 37 | ); 38 | 39 | pfn_LowLevelKeyboardProc g_LowLevelKeyboardProc = (pfn_LowLevelKeyboardProc)0x49b60; 40 | 41 | typedef LRESULT (WINAPI* pfn_WindProc)(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); 42 | 43 | pfn_WindProc g_WndProc = NULL; 44 | 45 | 46 | LRESULT WINAPI fakeWindowProc( 47 | HWND hWnd, // handle to window 48 | UINT Msg, // message 49 | WPARAM wParam, // first message parameter 50 | LPARAM lParam // second message parameter 51 | ) 52 | { 53 | 54 | if(Msg == WM_COPYDATA) 55 | { 56 | COPYDATASTRUCT* CopyData = (COPYDATASTRUCT*)lParam; 57 | //if(CopyData->cbData == sizeof(KeyboardLL_Msg)) 58 | { 59 | KeyboardLL_Msg* Msg = (KeyboardLL_Msg*)CopyData->lpData; 60 | g_LowLevelKeyboardProc(Msg->nCode, Msg->wParam, (LPARAM)&Msg->lParam); 61 | } 62 | } 63 | return g_WndProc(hWnd, Msg, wParam, lParam); 64 | } 65 | 66 | void HookWinProc() 67 | { 68 | while(1) 69 | { 70 | HWND hwnd = FindFreepiano(); 71 | if(hwnd) 72 | { 73 | g_WndProc = (pfn_WindProc)GetWindowLong(hwnd, GWL_WNDPROC); 74 | if(g_WndProc) 75 | { 76 | SetWindowLong(hwnd, GWL_WNDPROC, (LONG)fakeWindowProc); 77 | break; 78 | } 79 | } 80 | } 81 | } 82 | 83 | LRESULT CALLBACK LowLevelKeyboardProc( int nCode, // hook code 84 | WPARAM wParam, // message identifier 85 | LPARAM lParam // message data 86 | ) 87 | { 88 | 89 | COPYDATASTRUCT CopyData = {0}; 90 | KeyboardLL_Msg Msg = {0}; 91 | 92 | Msg.nCode = nCode; 93 | Msg.wParam = wParam; 94 | memcpy(&Msg.lParam, (char*)lParam, sizeof(KBDLLHOOKSTRUCT)); 95 | 96 | CopyData.cbData = sizeof(KeyboardLL_Msg); 97 | CopyData.dwData = 0; 98 | CopyData.lpData = &Msg; 99 | 100 | HWND hwnd = FindFreepiano(); 101 | if(hwnd) 102 | { 103 | SendMessage(hwnd, WM_COPYDATA, (WPARAM)hwnd, (LPARAM)&CopyData); 104 | } 105 | 106 | return CallNextHookEx(g_Hook, nCode, wParam, lParam); 107 | } 108 | 109 | BOOL Hook(HMODULE hMod) 110 | { 111 | if(g_Hook== NULL) 112 | { 113 | HMODULE hExe = GetModuleHandle(NULL); 114 | 115 | g_LowLevelKeyboardProc = (pfn_LowLevelKeyboardProc)((DWORD)hExe + (DWORD)g_LowLevelKeyboardProc); 116 | 117 | CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)HookWinProc, NULL, 0, NULL); 118 | } 119 | 120 | g_Hook = SetWindowsHookEx(WH_KEYBOARD_LL, LowLevelKeyboardProc, hMod, 0); 121 | 122 | return g_Hook?TRUE:FALSE; 123 | } 124 | 125 | VOID Unhook() 126 | { 127 | if(g_Hook) 128 | { 129 | UnhookWindowsHookEx(g_Hook); 130 | } 131 | } 132 | -------------------------------------------------------------------------------- /src/hook.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | BOOL Hook(HMODULE hMod); 6 | VOID Unhook(); -------------------------------------------------------------------------------- /src/injkey.vcproj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anhkgg/coding_piano/37c5f7cf169c3971d6a0d800fc67a13000875bfb/src/injkey.vcproj -------------------------------------------------------------------------------- /vsti/mdaPiano.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anhkgg/coding_piano/37c5f7cf169c3971d6a0d800fc67a13000875bfb/vsti/mdaPiano.dll --------------------------------------------------------------------------------