nesdev.com
http://forums.nesdev.com/

Logging an NSF to make instruments
http://forums.nesdev.com/viewtopic.php?f=6&t=15110
Page 1 of 1

Author:  tepples [ Sun Nov 13, 2016 9:57 am ]
Post subject:  Logging an NSF to make instruments

I'm trying to extract instrument definitions from NSFs, so I can make mash-ups and parodies using tools such as FamiTracker. I figured I could do this by logging an NSF's writes to APU ports $4000 through $4015 over time and then analyzing the logs for exact frame-by-frame pitch, duty, and volume parameters. Which NSF players can log writes to this range?

If it matters, I'm using 32-bit Linux at the moment, and I have a working copy of Wine installed. And I'd like to include only writes to this range, not every single instruction whose logging would bog the player down with formatting and I/O. If there's no such tool, I guess I'll have to start with fake6502.c by miker00lz.

Author:  rainwarrior [ Sun Nov 13, 2016 3:44 pm ]
Post subject:  Re: Logging an NSF to make instruments

If Famitracker runs in Wine, this Famitracker-derived tool I made years ago should do the trick:
http://rainwarrior.ca/projects/nes/nsfimport.html

If NSFPlay runs in Wine, it also has a feature for logging register to text (not exposed in UI, but through .ini file and documented in readme):
http://rainwarrior.ca/projects/nsfplay/

Before these two tools I used to use NSFPlay's keyboard view with its time dilation feature. You can watch the register values played back at slow speed.

Author:  Rahsennor [ Sun Nov 13, 2016 6:10 pm ]
Post subject:  Re: Logging an NSF to make instruments

Debug version of repeat can log writes. Quick hack to limit it to $4000-$4015 attatched.

Attachments:
repeat-0.11a-debug.gz [22.4 KiB]
Downloaded 53 times

Author:  tepples [ Sun Nov 13, 2016 9:05 pm ]
Post subject:  Re: Logging an NSF to make instruments

Thanks rainwarrior. Both executables worked in Wine. In nsfplay.exe, I had to change NCH=1 to make wave export not be one second of music then a second of silence and repeat. In NSFImport.exe, I was able to save a .ftm that I could open in my normal FT installation and export a text file. From there, I read out the envelopes.

Your reward is a little contest: The first user to identify the game that I mashed up with Blaster Master in this NSF gets a golden cookie.

Attachments:
Try.nsf [8.02 KiB]
Downloaded 64 times

Author:  tepples [ Tue Nov 22, 2016 6:39 am ]
Post subject:  Re: Logging an NSF to make instruments

Nobody? After a week?

I guess only NovaSquirrel was on the ball enough to figure out that the part just before the end of the loop was secretly replaced with Folgers Crystals "Concrete Jungle" in Cameltry.

Page 1 of 1 All times are UTC - 7 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/