bbbradsmith / nsfplay

Nintendo NES sound file NSF music player
https://bbbradsmith.github.io/nsfplay/
277 stars 42 forks source link

Request: Negative Harmony Mode #71

Closed brunomontoya17 closed 1 year ago

brunomontoya17 commented 1 year ago

Hello, I would like to make a request, but I'm honestly not sure if it's technically possible. But here I go. I would like to know if it is possible to add a functionality that translates the melodies of the .NSF files to Negative Harmony. It's a relatively new concept that would require knowledge of music composition to program and would depend on many factors, as each game uses a different range of chips. I would like to know how viable it would be. Here I attach two Youtube links as an example of Negative Harmony: Original: Contra Jungle Theme Converted into Negative Harmony: Contra Jungle Theme NH

Greetings!!!

bbbradsmith commented 1 year ago

NSFPlay is just an emulator that runs sound code, so it doesn't have very good utility for transforming something at the composition level like this.

There is no built-in concept of notes and pitches when playing back NSF code. All of that was baked in when the program was originally assembled. NSFPlay as an NSF Player isn't aware of any of those higher level ideas, it just simulates the hardware sound output based on machine instructions.

I think what you might want to try is to hack the NSF files. If this "negative harmony" idea is what I think it is, you could probably accomplish it by searching the ROM for the note pitch table, and then reversing the order. You could then play the hacked NSF with NSFPlay, or on a PowerPak maybe.

NSFPlay can't automate this process, though. Every program has different arbitrary ways of representing notes in its data. You need to do some manual reverse enginerring of the NSF ROM to figure out how it makes notes, and then engage it at that level.

bbbradsmith commented 1 year ago

Alternatively, you might try the old NSF Importer project: http://rainwarrior.ca/projects/nes/nsfimport.html

That can help you transcribe an NSF into Famitracker, where maybe you can edit it to do what you want. It might be easier to start from there, if you don't have the knowledge of how to reverse engineer an NSF ROM directly.