Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /storage/content/49/145849/famitracker.com/public_html/forum/classes/dbHandler.php on line 29 FamiTracker
Login:
Menu:
Post: Author:
FamiTracker > General > Bug Reports & Feature Requests > Request: N163/FDS wave table macros. Owner: B00daW New post
Page 1 of 1 Sort:  
Request: N163/FDS wave table macros. Posted: 2012-08-27 19:08 Reply | Quote
B00daW

Avatar

Member for: 4986 days
Status: Offline

#38731
Like N163, it would be nice to add wavetable macro support to FDS.

Also it would be nice to have WAV/RAW sample input; 4-bit conversion for N163 and 6-bit for FDS. The exportation process could show how long the waveform could be within NSF file limitation; let you cut crop sections of the waveform; show in alternating coloration 32 sample segmentations for N163 and 64 segmentations for FDS -- N163 samples being multiples of 32 and FDS being multiples of 64; then finally making an automated envelope macro in the instrument file.

Posted: 2012-08-27 22:07 Reply | Quote
FlashingYoshi



Member for: 3722 days
Location: There
Status: Offline

#38740
I was about to post the same. =P

_______________________
I have turned into a sausage.
Posted: 2012-08-28 01:09 Reply | Quote
jsr
Administrator

Avatar

Member for: 5924 days
Location: Sweden
Status: Offline

#38751
A Vxx command for switching waves is planned for the FDS channel, but not a macro at the moment. The reason is that the wave cannot be changed without halting the channel, which won't sound good when doing too often. This is not a problem on N163.

I'll take a note on a tool for converting waves to instruments. However I've seen several tools around for it so it's already possible, but I'm not sure if any supports multiple segments?

_______________________
Programmer and developer
Posted: 2012-08-29 12:48  (Last Edited: 2012-08-29 12:49) Reply | Quote
za909

Avatar

Member for: 3962 days
Location: Hungary
Status: Offline

#38803
As far as I can tell, the popping noise can be masked fairly well when you use the FDS as a PWM channel, especially if you're not at full volume. [url=http://famitracker.com/forum/attachments/37020/fds.ftm]Necrophageon's ftm

_______________________
Rectangular sh*t ©
Posted: 2012-08-29 16:57 Reply | Quote
B00daW

Avatar

Member for: 4986 days
Status: Offline

#38805
Well it would depend on the composer/artist to make waveforms that allow for less popping as well.

As for the segmentation, it's just so that people can see what how the RAW/WAV file will be segmented.

Posted: 2012-08-29 19:41 Reply | Quote
rainwarrior

Avatar

Member for: 4150 days
Location: Canada
Status: Offline

#38812
za909, try that in an NSF player and the problem should be very apparent. (e.g. NSFPlay, NotSoFatso, GME, VirtuaNSF.) The problem is the CPU needs a significant amount of time to upload an entire waveform to the FDS, during which the FDS sound has to be halted. I don't think FamiTracker really emulates the full length of that pause.

I did once see an NSF that did a neat trick. Basically it started with a soft/sine kinda wave, and slowly moved just one sample up and down, gradually introducing a harsh buzz as it moves in and out. Because it was only changing one sample at a time, the pause could be made small enough to be unnoticeable.

Posted: 2012-08-29 20:38 Reply | Quote
jsr
Administrator

Avatar

Member for: 5924 days
Location: Sweden
Status: Offline

#38815
Actually the delay is fully simulated in famitracker, I counted the number of cycles necessary to write the full wave and halted the channel accordingly.

The reason it sounds worse in some players is because of yet another difference in FDS emulation, probably caused by the wave phase being reset or the channel output being forced to zero rather than just halted (I don't know which). The documentation is unclear on this matter and I do not know the correct behaviour, I'll check this.

_______________________
Programmer and developer
Posted: 2012-08-29 21:24 Reply | Quote
rainwarrior

Avatar

Member for: 4150 days
Location: Canada
Status: Offline

#38818
NSFPlay doesn't reset phase, it just halts. The sound is actually consistent across the four emulators I tried, so I think they're all doing the same thing.

Posted: 2012-08-29 23:50 Reply | Quote
Slimeball

Avatar

Member for: 3719 days
Status: Offline

#38821
I've edited the .ftm a little. It doesn't seem to distort at all in famitracker or NSFplay (for me) when you pick a lower note.

It can definitely make a nice C64-style PWM bass.


Attachments:
fds4_edit.nsf (9 Kb)
fds4_edit.ftm (5 Kb)
Posted: 2012-08-30 00:15 Reply | Quote
rainwarrior

Avatar

Member for: 4150 days
Location: Canada
Status: Offline

#38822
If it's under 60hz and your waveform is a square to begin with, no you won't notice the halts so much, but you should notice that it plays at a lower pitch in NSF players, which again is a result of the longer halt period I believe.

Posted: 2012-08-30 01:23 Reply | Quote
jsr
Administrator

Avatar

Member for: 5924 days
Location: Sweden
Status: Offline

#38825
I tried a few players, and NEZplug++ sounded the same as famitracker. But that is kind of reasonable as that's where the original code comes from (though an older version).
I did some investigation here and I think I found the cause. The simulated delay seems to be correct, but the FDS emulator in famitracker/nezplug does not halt the wave step generator during wave writing, it only stops the output. That would explain why the pitch is altered in other players and also why it sounds more distorted during wave changes. This is probably the correct behaviour, but I'm gonna try to verify it tomorrow on my FDS cart.

_______________________
Programmer and developer
Posted: 2012-08-30 08:17 Reply | Quote
rainwarrior

Avatar

Member for: 4150 days
Location: Canada
Status: Offline

#38837
Ahh, that would explain it. Let me know what you learn. I've been meaning to do some experiments of my own on the FDS.

Posted: 2012-08-30 23:31 Reply | Quote
jsr
Administrator

Avatar

Member for: 5924 days
Location: Sweden
Status: Offline

#38867
Ok, the FDS cart is really difficult to hotswap compared to the other carts for some reason, but now I got some results.

It turned out that the NEZplug++/famitracker behavour was actually correct here, not exactly what I expected.

The first thing I tested was: while a saw wave was running, enable the write flag for some cycles and then disable it again (without actually writing a new wave). I expected the wave step counter to halt and the wave to stop at a phase, and then keep running from that phase again when started. Instead, it jumped to the new phase position where the wave would be as if it wasn't halted at all, indicating that the counter is still actually running in the background. The output is also kept at the wave step level, and not being forced to zero as some players do.

Next step was to actually verify this by testing a PWM effect, similar to what was posted in this thread. A recording from the FDS hardware and the test ROM turned into an NSF file is attached, and this shows that it actually sounds a bit cleaner than most NSF players appears to do. (Still it's not perfect and is likely worse for other types of waves.) Another thing that can be noted is that the FDS channel contains a strong low-pass filter, this is because the volume control is actually done with PWM rather than in the digital domain. This might be worth investigating further.

_______________________
Programmer and developer
Attachments:
pwm.nsf (0 Kb)
pwm.flac (418 Kb)
Posted: 2012-08-31 02:29 Reply | Quote
Xyz_39808

Avatar

Member for: 4180 days
Location: South Texas
Status: Offline

#38874
[quote=rainwarrior]
I did once see an NSF that did a neat trick. Basically it started with a soft/sine kinda wave, and slowly moved just one sample up and down, gradually introducing a harsh buzz as it moves in and out. Because it was only changing one sample at a time, the pause could be made small enough to be unnoticeable.[/quote]
*cough* [url=http://www.youtube.com/watch?v=f5X4ZTQvWyM&t=164]http://www.youtube.com/watch?v=f5X4ZTQvWyM&t=164

Posted: 2012-09-01 00:52 Reply | Quote
jsr
Administrator

Avatar

Member for: 5924 days
Location: Sweden
Status: Offline

#38905
[quote=Xyz_39808][quote=rainwarrior]
I did once see an NSF that did a neat trick. Basically it started with a soft/sine kinda wave, and slowly moved just one sample up and down, gradually introducing a harsh buzz as it moves in and out. Because it was only changing one sample at a time, the pause could be made small enough to be unnoticeable.[/quote]
*cough* [url=http://www.youtube.com/watch?v=f5X4ZTQvWyM&t=164]http://www.youtube.com/watch?v=f5X4ZTQvWyM&t=164[/quote]
Actually that NSF is made in famitracker so the entire wave is changed there, but it would be possible to cut down the time needed to update the wave in this case.

_______________________
Programmer and developer
Page 1 of 1 Sort: