stripwax / SAASound

SAASound is a software implementation of the SAA-1099 soundchip found in a variety of mid/late 1980s computing and gaming devices. SAASound provides the audio for the SimCoupe retro emulator
Other
24 stars 6 forks source link

Feature request: record mixed + individual channels #9

Closed stefandrissen closed 3 years ago

stefandrissen commented 5 years ago

Hi Dave,

I wanted to put some SAM tunes into SidWiz 2 (https://appdb.winehq.org/objectManager.php?sClass=application&iId=18581).

The workflow with six channels is a bit boring. The same song needs to be started and recorded seven times (master + each channel separately).

It would be really cool if the audio recording option of SimCoupe could coax SAASound to output all seven versions at once! :-)

Cheers!

stripwax commented 5 years ago

Yep! I'm looking to rearchitect SAASound a bit (hopefully not too extensively in one go though), so it's a great time to have feature requests :) Adding an API to provide output streams immediately prior to the final mix is definitely doable.

stripwax commented 5 years ago

So, I've had a think, and right now (given that the UI of simcoupe is not directly extensible from saasound), I reckon the easiest way to do this is for me to provide a kind of "saasound.cfg" file, where you could put in your preferred output file names, and saasound does the write directly into those files. As raw pcm, since that's easier. Would that work for you? Also, pls try out the 3.3 release of SAASound when you can

stefandrissen commented 5 years ago

A config file would be fine. Could a wav header be added to the raw pcm (https://stackoverflow.com/questions/28231198/how-to-add-playablesuch-as-wav-wmv-header-with-pcm-data-buffer-in-ios)?

I'll try 3.3 soon.

stripwax commented 5 years ago

 That's easy enough too - but requires playback to be stopped, so I'll have to check whether SimCoupe shuts SAASound down cleanly or not (since wav header can only be written after total file length is known).

stripwax commented 3 years ago

My next task is to finish the plumbing around creating the saasound.cfg (nearly done). I'll then be picking up this issue.

stripwax commented 3 years ago

@stefandrissen All done :-)

stefandrissen commented 3 years ago

Fantastic! Quick noob question here, what do I need to do to use the bleeding edge saasound.dll in SimCoupe? Just popping it and the cfg file in the SimCoupe folder results in:

SimCoupe.exe - Application Error

The application was unable to start correctly (0xc000007b). Click OK to close the application.

stripwax commented 3 years ago

Hm that doesn't seem great! I've not yet tried the bleeding edge binaries built via the github automation yet, I naively assumed they would work the same as my local build. But yes it should be exactly as you described, plop the files into the simcoupe directory overwriting the existing saasound.dll . I'll take a look later!

stripwax commented 3 years ago

Which version of SimCoupe are you using?

stefandrissen commented 3 years ago

The latest - https://github.com/simonowen/simcoupe/releases/tag/20200827 - SimCoupe.exe dated 2020-08-28

stripwax commented 3 years ago

@stefandrissen ok. I think I've squashed that problem. The GitHub workflow seemed hard to convince into doing a x86 build instead of an x64 build by default, which is a problem I hadn't even contemplated, especially since my local toolchain defaulted to x86 build. Anyway, after a few false starts, I've hacked the pipeline to invoke a different command for Windows builds, I've confirmed it's indeed now building for x86 not x64, and I've downloaded the release binary and confirmed it works (for me). And I'm actually using an older SimCoupe build so you should be fine.