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

Exporting separate channels using spccmd #50

Closed
dakrk opened this issue Aug 5, 2022 · 2 comments
Closed

Exporting separate channels using spccmd #50

dakrk opened this issue Aug 5, 2022 · 2 comments
Assignees
Labels
enhancement New feature or request fixed This issue was fixed, waiting for stable release

Comments

@dakrk
Copy link

dakrk commented Aug 5, 2022

Having to manually click to mute and unmute each channel, and then saving with a different file name to export each channel as its own file can be annoying, so preferably there should be a way in spccmd to easily specify which channels should be played when exporting to WAV with the -cw option.
Then to output all channels as it's own file, you could just do a for /L from 1 to 8 in CMD.

@dgrfactory dgrfactory self-assigned this Aug 6, 2022
@dgrfactory dgrfactory added the enhancement New feature or request label Aug 6, 2022
@dgrfactory
Copy link
Owner

Hi, @dakrk
Thank you for reporting the new request.

https://github.com/dgrfactory/spcplay/releases/tag/2.19.4.7792
The -sm option to switch the channel to be muted separately and the -gm option to retrieve the current mute setting have been added to spccmd.
By using the -sm option immediately before the -cw option, it would be possible to output only the sound of the desired channel.

-sm option is used as follows.

REM Mute only channel 1
spccmd -sm 1

REM Mute channel 1, 2, and 3
spccmd -sm 123

REM Mute all exclude channel 1
spccmd -sm 1 --rev

The following batch shows an example of obtaining output-<ch>.spc, where each channel is separated from input.spc.

FOR /f "DELIMS=" %%A IN ('spccmd -gm --ch') DO SET MUTE=%%A
FOR %%I IN (1 2 3 4 5 6 7 8) DO (
  spccmd -sm %%I --rev --quiet
  spccmd -cw input.spc output-%%I.wav
)
spccmd -sm %MUTE% --quiet

By the way, the first blank adjustment is not performed when even a channel is muted, in other words, the WAVBLANK setting in spcplay.ini is ignored now.

@dakrk
Copy link
Author

dakrk commented Aug 7, 2022

It works, thank you!

@dakrk dakrk closed this as completed Aug 7, 2022
@dgrfactory dgrfactory added the fixed This issue was fixed, waiting for stable release label Aug 8, 2022
dgrfactory added a commit that referenced this issue Oct 5, 2022
* spccmd に -o, -gm, -sm オプションを追加
* チャンネルがミュートされている場合は、WAVE 出力時に先頭のブランク調整を無視するように変更
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request fixed This issue was fixed, waiting for stable release
Projects
None yet
Development

No branches or pull requests

2 participants