Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

problems with converting to wav with config #64

Closed
ultrasound1372 opened this issue Aug 15, 2022 · 4 comments
Closed

problems with converting to wav with config #64

ultrasound1372 opened this issue Aug 15, 2022 · 4 comments

Comments

@ultrasound1372
Copy link

This issue is a sort of roll-up of two issues, but one of them apparently has to be fixed by @jprjr and the other can be fixed by someone else.
The first issue is with nsf2wav. It's very explicit Posix assumptions makes it near impossible to compile on Windows, which appears to be the only place nsfconfig_ini works. Can something be adapted so I can specify something like --config /path/to/in_yansf.ini to bring custom settings? Especially the setting of master volume? Multi-expansion audio tends to clip in renders and so I need to turn master volume down.
The second issue is related to the way NSFPlay handles being passed wave arguments. Yes I can render a wave file with it, but since it's a GUI application my console returns immediately. Furthermore since it partially initializes the GUI and then completely blocks until the wave file is written then closes it, my screen reader comes to a dead stop until the process is finished. I am a blind PC user with access to MinGW via MSYS2 and Ubuntu via WSL v2, but am unable to batch render some NSFs from Famicompo with the settings I like no matter what I try. The reason my screen reader comes to a dead stop upon rendering a wave file is because accessibility applications send queries to created UIs, and if those UIs don't answer that query they just lock up. This is unfortunately just a part of Windows and cannot be worked around. Perhaps checking for rendering to a wave file before creating the outer window would fix this?
Either way, I just want some way to have a custom config file and use something like xargs to render a batch of NSFs. Can't do batch renders with the Winamp plug-in, no Foobar plug-in, NSFPlay command line breaks my interaction entirely and nsf2wav doesn't except settings. Can anyone do something about one of these?

@bbbradsmith
Copy link
Owner

bbbradsmith commented Oct 25, 2022

Under windows, a program can only be a GUI application, or a console application, so unfortunately I don't think there is anything I can do to make NSFPlay.exe behave like a console application.

So, yes, something like nsf2wav to make it a separate executable would have to be done. I haven't investigated how to compile nsf2wav on windows.

a command line version of NSFPlay is on my wishlist for NSFPlay 3, but there is no ETA for that at this time.

@bbbradsmith
Copy link
Owner

I have improved the command line interface for NSFPlay a little bit. Now all config entries from in_yansf.cfg can be given a temporary override on the command line (e.g. "-FADE_TIME=300").

Added in: d0d8d70

Additionally, though I cannot output to the command console since this is a GUI application, I added some diagnostic messages to stdout and you can use >logfile.txt on the command line to redirect those to a file and at least get feedback for errors.

I don't yet have a way to override the config file yet, but it should also be possible.

Until this becomes part of an official release, it can be tested here: https://ci.appveyor.com/project/bbbradsmith/nsfplay/branch/master/artifacts

@bbbradsmith
Copy link
Owner

I managed to add a command-line INI file override. You can use -INI=file.ini to override in_yansf.ini and -NSFPLAYINI=file.ini to override nsfplay.ini.

@bbbradsmith
Copy link
Owner

Try this out in 2.6 release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants