Play sound on wrong notes

Have questions? Just saying hello? This is the place.
No explicit, hateful, or hurtful language. Nothing illegal.
Post Reply
elfstone
Posts: 4

Post by elfstone »

Hi,
I'm using synthesia to practice songs that I have as sheet music. I created midi-files for the songs, but since the sheet-music view in synthesia is not yet up to par, I prefer looking at my printed sheet music. Is there a way to make Synhtesia play a sound when I hit a wrong note, but otherwise continue the song?
In the option I only found "pause" or "ignore" as option, for me it would be really helpful to have some kind of "meeeep" noise when I hit a wrong note.
elfstone
Posts: 4

Post by elfstone »

Hi, is there any way this can be done? If not, I'll probably head over to the feature requests..
User avatar
Anonymous997
Posts: 50

Post by Anonymous997 »

I don't think there's a way to do this. Maybe you could by literally changing the code of the files in the game, and find the variable that determines when a wrong note is hit to decrease the score, and add code to that to play a sound. But, otherwise, this is more of a feature request.
Nicholas
Posts: 13135

Post by Nicholas »

I think I've heard something like this before. It's one of the reasons the little points box shakes when you make a mistake: so you can catch it out of your peripheral vision.

Games like Guitar Hero and Beat Saber do employ a small, distinct sound effect to let you know whenever an error is made. A strong argument could be made that it's helpful in those games, so it should also be helpful in Synthesia.

As far as implementation is concerned, that's where it gets a little tricky. Synthesia doesn't have the infrastructure to play arbitrary sounds. (Imagine the case where you're sending your output to a digital piano; Synthesia can only generate the sounds your digital piano is capable of producing.)

The easy answer---since the built in synth and most personal keyboards can play percussion---would be to find some suitable sound from the GM Percussion map and play that. Maybe with an option to use a piano voice instead, if your digital piano doesn't support percussion?
User avatar
jimhenry
Posts: 1899

Post by jimhenry »

You could play a minor second with the wrong note. That sound terribly wrong with just about any voice.
Jim Henry
Author of the Miditzer, a free virtual theatre pipe organ
http://www.Miditzer.org/
User avatar
Anonymous997
Posts: 50

Post by Anonymous997 »

Yeah, I guess that could work. But, how do you actually do that when just a wrong note is hit? Maybe you could, like, set a variable every time a note comes in a certain distance with the on-screen keyboard (enough time for the computer to compute it) that would have a value set to that specific note and "look for" when a note that is hit's value doesn't match the variable's value and play a sound.(sorry, I got a little technical there) But, that's a little complicated. Or, this post could go to the Modding Synthesia forum?
elfstone
Posts: 4

Post by elfstone »

Ok, if it's not possible right now - could a mod move this post the the correct forum (either modding or feature request, depending on what makes more sense).
About sound Infrastructure: Another option is to output the highest and lowest sound to the piano which (at least in case of 88 keys) will stand out quite strong too (might be interesting in cases where synthesia is run on a muted device, with all the sounds coming from the keyboard.
Nicholas
Posts: 13135

Post by Nicholas »

That minor second idea is cute. I like that. Highest/lowest isn't bad, either. (Even if a synth doesn't have 88 keys, it can usually play A0 and C8 regardless, so it wouldn't even have to be as complicated as "my keyboard's highest and lowest notes".)

When it comes time, I'll try each of those out and see which one feels the best.
espriella
Posts: 4

Post by espriella »

In the meantime, injecting a beep in the code every time the Errors counter increment instruction is called, does the trick, at least for the Windows version. Probably a lot more work than it makes sense to go through if you're not from a coding background, but a possibly fun technical challenge.

Using the Cheat Engine application or similar memory manipulation program, you'll find that the code to increment the Errors variable is at "Synthesia.exe"+14DA10 for Synthesia's latest version 10.6.5311. You can inject a kernel32.Beep call after it.
For example

newmem:

code:
inc [eax+1C] //this is the Errors increment
mov esp,ebp
push #300 //this is the Beep call with its 2 parameters
push #750
call kernel32.Beep

jmp return //returns to the normal flow

address:
jmp newmem
return:


Anyway, here's the Cheat Engine file I did to test it
https://www.dropbox.com/s/9ywjy3xlp44vu ... on.CT?dl=0

And a small video of it working:
https://www.dropbox.com/s/otdm23qxwgr4q ... 0.mp4?dl=0
Nicholas
Posts: 13135

Post by Nicholas »

Wow, that's um... nice work! :lol:

The little delay isn't great for keeping the rhythm, but as far as workarounds go, I think you might have just gotten the award for the most hardcore.
Post Reply