leafo / sightreading.training

🎹 Sight reading training tool
http://sightreading.training
430 stars 75 forks source link

Melody Playback Any Key Triggers Repeat #134

Open dj-jayu opened 1 year ago

dj-jayu commented 1 year ago

I use a Casio Px-750 digital piano as midi input. In the melody playback mode, any key of the piano I enter triggers a melody repeat, not just the pedals or sliders. Others parts of the app work normally with my piano.

leafo commented 1 year ago

It could be possible that your keyboard is sending a MIDI CC message along with key presses when you press a key. Perhaps a setting of the keyboard?

dj-jayu commented 1 year ago

Hi, thanks for the answer. I downloaded a midi monitor. This is what is sent to the PC when I press the middle C note. image

dj-jayu commented 1 year ago

Every note always comes with the Controller 88 + a different number, before the on and off signals. image

dj-jayu commented 1 year ago

Here are the pedal signals: image

dj-jayu commented 1 year ago

And here some buttons: image

dj-jayu commented 1 year ago

After more research, here's what I've found. In the Casio Px-750 midi specification available here (https://support.casio.com/storage/en/manual/pdf/EN/008/PX150-1200_AP250-650_MIDI_E_B_EN.pdf): image

Apparently the Control 88 message is sent every time 'the tone is changed'.

dj-jayu commented 1 year ago

I found two forum posts where the issue happened to other users. Here's the explanations (https://www.casiomusicforums.com/index.php?/topic/6784-solved-what-is-controller-88-being-used-for/): image

And here (https://www.casiomusicforums.com/index.php?/topic/8081-px350-odd-midi-input-behavior/) image

And here (https://www.casiomusicforums.com/index.php?/topic/7918-px-5s-transmitting-midi-controller-88-to-daw/): image

dj-jayu commented 1 year ago

Apparently the midi specification has changed over the years, and old devices have this issue. I searched the piano manuals, googled, and asked ChatGPT if there's a way to turn off the Control 88 message, all without success.

So @leafo , if you have no other suggestions, would it be possible to make the 'repeat when pressing any function key on your midi controller' feature optional? As a checkbox? This would solve the issue for me and possible other users who might also have an older midi controller.

Thanks.

leafo commented 1 year ago

Thanks for the extensive testing. I think it's probably best to ignore that type of CC event when checking to replay the melody.

dj-jayu commented 1 year ago

@leafo , I cloned the repo on my computer, and run 'node install.js'. But I can't start the application with npm run. I would like to run it locally in order to help with the development and make some tests. If the test are successful, maybe I could contribute to the project. I know javascript and some react. I don't know moonscript. Do you have a guide on how should I proceed? Thanks