Sound effects editor

A place where you can keep others updated about your NES-related projects through screenshots, videos or information in general.

Moderator: Moderators

Post Reply
tepples
Posts: 22816
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Sound effects editor

Post by tepples »

I was inspired by the sound effects editor that NovaSquirrel threw together in a couple days to create an NES sound effects editor of my own. I'd like you to download it, bang on it, and see what you can come up with. If you've used MOD trackers, you'll pick it up easily. You can save your work with the Start button; try opening the .sav in a text editor for a nice surprise. And like Thwaite, it even supports a Super NES Mouse.
lidnariq
Site Admin
Posts: 11592
Joined: Sun Apr 13, 2008 11:12 am

Re: Sound effects editor

Post by lidnariq »

Random thoughts:
- Maybe an option to detune the tonal channels so they're in tune with the odd noise channel tuning
- Converting a channel from noise to tonal produces hilariously incorrect values, if it originally contained tonal notes
- Converting a channel to/from noise doesn't produce very useful results otherwise
- Support for some kind of keyboard (whether the FC keyboard, Miracle, or whatever)
tepples
Posts: 22816
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Sound effects editor

Post by tepples »

I discovered when I made the editor that 93-step noise is fairly consistently about 40 cents sharp of A440 tuning. You can change the tuning by editing mktables.py and rebuilding the project. But if you tune the tonal channels to be in tune with the noise channels, it'll retune your music too.

Changing the channel doesn't "convert"; it reinterprets the old data in the new format. And the only part of the format that makes sense among all channels is the volume, though pulse and triangle use the same pitch range except for one octave of difference.

Code: Select all

FEDC BA98 7654 3210  Each row is a 16-bit word in network byte order.
||   |||| | || ||||
||   |||| | || ++++- Noise: Period (15=lowest)
||   |||| | ++-++++- Pulse, Triangle: Log frequency (0=lowest)
||   |||| +--------- Noise: Timbre (0=hiss, 1=buzz)
||   ++++----------- Pulse, Noise: Volume (0=silent, 15=loudest)
||   ++++----------- Triangle: Priority (0=silent, 1=lowest, 15=highest)
++------------------ Pulse: Timbre (0=12.5% duty, 1=25% duty, 2=50% duty)
+------------------- Triangle: Bit 15 always set in exported data
It appears you want channel changes to perform some conversion. What should happen to the pitch if the user converts a tonal sound to noise and back?

I'll do a keyboard once I have a keyboard to test with. There's been speculative talk in #nesdev to make some sort of MCU-based translator between PS/2 keyboard protocol and the NES's SPI-like protocol, but it never resulted in any concrete projects. And unfortunately, MCUs are currently not my department. Or do I need to get an Arduino kit already so I can play with AVR?
JRoatch
Formerly 43110
Posts: 426
Joined: Wed Feb 05, 2014 7:01 am
Contact:

Re: Sound effects editor

Post by JRoatch »

tepples wrote:You can change the tuning by editing mktables.py and rebuilding the project
I like how the save file is a source file for the sound data. Maybe it's possible to (but mabye to much trouble in practice) have a tuner in the editor that also exports the tables to the source file save. It'll involve multiplication of a high precision fixed point number with a constant, and some modifications to the editor's table to read from ram.
lidnariq
Site Admin
Posts: 11592
Joined: Sun Apr 13, 2008 11:12 am

Re: Sound effects editor

Post by lidnariq »

tepples wrote:What should happen to the pitch if the user converts a tonal sound to noise and back?
Not certain about the "converting to noise" story. Converting from tonal noise to a tonal channel I would think should convert to closest match.

In any case, my other point was: even if it doesn't do any conversions, reinterpreting the tonal noise data as notes shouldn't cause entries like "G#█" or "4█":
incorrect.png
incorrect.png (1.35 KiB) Viewed 10547 times
JRoatch
Formerly 43110
Posts: 426
Joined: Wed Feb 05, 2014 7:01 am
Contact:

Re: Sound effects editor

Post by JRoatch »

I now see what lidnariq is talking about.

So I what I expect to happen is:
While editing, have the square and triangle channels ignore but preserve bit 7 (Noise Timbre). So that it doesn't factor in the note lookup table;
When saving, if the channel is not noise then clear bit 7. So that the data will work on your engine.
tepples
Posts: 22816
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Sound effects editor

Post by tepples »

This has been absorbed into the latest version of Pently.
Post Reply