It is currently Sun Nov 19, 2017 3:12 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Sound effects editor
PostPosted: Tue Sep 09, 2014 6:36 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19227
Location: NE Indiana, USA (NTSC)
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.


Top
 Profile  
 
 Post subject: Re: Sound effects editor
PostPosted: Tue Sep 09, 2014 7:12 pm 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 6442
Location: UK (temporarily)
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)


Top
 Profile  
 
 Post subject: Re: Sound effects editor
PostPosted: Wed Sep 10, 2014 2:13 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19227
Location: NE Indiana, USA (NTSC)
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:
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?


Top
 Profile  
 
 Post subject: Re: Sound effects editor
PostPosted: Wed Sep 10, 2014 8:18 pm 
Offline
Formerly 43110
User avatar

Joined: Wed Feb 05, 2014 7:01 am
Posts: 313
Location: us-east
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.


Top
 Profile  
 
 Post subject: Re: Sound effects editor
PostPosted: Wed Sep 10, 2014 9:33 pm 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 6442
Location: UK (temporarily)
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█":
Attachment:
incorrect.png
incorrect.png [ 1.35 KiB | Viewed 1622 times ]


Top
 Profile  
 
 Post subject: Re: Sound effects editor
PostPosted: Sun Oct 26, 2014 8:18 pm 
Offline
Formerly 43110
User avatar

Joined: Wed Feb 05, 2014 7:01 am
Posts: 313
Location: us-east
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: Yahoo [Bot] and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group