Recent posts

#51
General Board / Re: Soundshaper - problem when...
Last post by Robert Fraser - June 05, 2025, 08:44:52 AM
Hi,

I'm sorry you had such a bad experience for your first attempt to load a Soundshaper patch. Thank you for giving such a detailed account of what happened.

The problem was with the message you got that "previous patch files may not all be cleared". The program checks to see if there are files in the TEMP folder that would stop the patch loading properly, and it found something - and the patch failed. (The report window rubbish was CDP's responses and should not be taken too seriously.) I'm puzzled as to why there seemed to be no parameter file (.prm) for REVERB (it would need that, which is why the parameter page didn't work), but that's not the main issue here.

1) Were there actually any temporary files left in the TEMP folder? - these have a tilde (~) as their first character. If Windows fails to delete these (it does occasionally), the workaround is to open the folder and delete them yourself, not through Soundshaper. I suggest you try this check.

2) Or maybe my CheckPatchCleared function (which triggers that messsage) has some faulty logic - I can't see it, but will work on that, anyway. However, the message is only a warning, so I think this was not the problem.

3) I recreated a patch similar to your one (Source-Reverb-Speed-FiltVari-Speed) and it ran OK. I actually tried to crash this patch (and trigger the message) by leaving a different source file (~A_0.wav) in my TEMP folder, but this didn't stop the patch loading correctly, with its own source. Unfortunately I can't share the patch, as it uses paths specific to this machine.


Hope this may help a little.
Robert
#52
Mac installation / Re: Fixed filter banks hang on...
Last post by j_p_higgins - June 05, 2025, 12:27:19 AM
Thanks for the update Richard and for figuring out the issue!
#53
Mac installation / Re: Fixed filter banks hang on...
Last post by rwdobson - June 04, 2025, 03:42:40 PM
Hello,

there is indeed a bug here, a memory error unsurprisingly. The array allocated for internal parameters ("param") is too small, currently 18, needs to be at least 21. When that location is written to, it happens, on this Mac, to corrupt the internal sfsys file ID for the infile, so that calls to write data fail, in this case causing an endless loop.

The short-term fix to make is in the library file tklib3.c (folder "cdp2k"), at and after line 175. Before the malloc call, the value of "storage_cnt" needs to be increased, e.g. "storage_cnt += 8".

Then recompile the library, and relink "filter".

This is a bug that I need to report directly to Trevor Wishart, who can provide the necessary changes to the parameter count. I will only update sources on GitHub once I have that from him.

Well done to all for diving into the code - not as you see, for the faint-hearted. Any time a program fails "sometimes", or not at all in some cases, the culprit is very likely to be a memory error of this kind. Easier to describe than find...
#54
Mac installation / Re: Fixed filter banks hang on...
Last post by j_p_higgins - June 04, 2025, 01:05:08 AM
Sorry to keep spamming the forum, I hope this info is useful to someone. I have a somewhat working solution.

Adding a lot of cleanup to free all the filter arrays in dz that I can find in the code after print_messages_and_close_sndfiles seems to make the process want to run multiple times with different filter modes and settings. What I have done is giving me a segfault error (exit code 11) when its done although it does run the filtering fine and produce the outfile. I think the segfault is probably just me trying to free something twice.

Seems like maybe mac is being picky about reallocating memory between runs and trying to reuse old things.

Not sure if this is the real fix, think I might just be sticking a plaster on the issue and hiding it. But, hopefully knowing that changing this and replacing soundseekx make this process want to run properly on mac will point someone who actually knows what they're doing in the right direction of the fault.

My guess is that as SoundLoom calls each process and closes it up fully after run, that that is why it works when called directly in SoundLoom but that calling it multiple times in the same terminal session or batch file doesn't close it fully and that is why some stuff is getting left over and is causing issues on subsequent runs.
#55
Mac installation / Re: Fixed filter banks hang on...
Last post by j_p_higgins - June 03, 2025, 04:14:34 PM
I thought sndseekex might be the problem so added the function below and tried calling that instead. Doing this allows the process to run multiple times (at least on intel macs I don't have an arm mac for testing) although if I change any of the filter settings between runs the filter still loops around the processing section forever. I've tried adding some additional cleanup of dz at the end of main.c but it doesn't seem to be making any difference.

int safe_sndseek(dataptr dz) {
    // Get the input filename before closing
    const char* filename_tmp = snd_getfilename(dz->ifd[0]);
    if (!filename_tmp) {
        fprintf(stderr, "safe_sndseek: ERROR — could not retrieve filename from ifd[0] = %d\n", dz->ifd[0]);
        return -1;
    }

    // Allocate memory and copy the filename
    char* filename_buf = malloc(strlen(filename_tmp) + 1);
    if (!filename_buf) {
        fprintf(stderr, "safe_sndseek: ERROR — memory allocation failed for filename copy\n");
        return -1;
    }
    strcpy(filename_buf, filename_tmp);

    fprintf(stderr, "safe_sndseek: Retrieved filename = %s\n", filename_buf);

    // Close the input file
    fprintf(stderr, "safe_sndseek: Closing input file descriptor %d\n", dz->ifd[0]);
    sndcloseEx(dz->ifd[0]);

    // Reopen the input file
    dz->ifd[0] = sndopenEx(filename_buf, 0, 0);
    if (dz->ifd[0] < 0) {
        fprintf(stderr, "safe_sndseek: ERROR — failed to reopen input file: %s\n", filename_buf);
        free(filename_buf);
        return -2;
    }

    fprintf(stderr, "safe_sndseek: Reopened input file. New ifd[0] = %d\n", dz->ifd[0]);

    // Clean up
    free(filename_buf);

    // Reset internal counters for reading
    reset_filedata_counters(dz);
    fprintf(stderr, "safe_sndseek: reset_filedata_counters completed.\n");

    return 0;
}

#56
General Board / Re: Soundshaper - problem when...
Last post by Vasilakis - June 03, 2025, 10:34:35 AM
Hello,

Thanks for looking into my problem.

So it was a simple patch where I had one sound source and then Reverb, Speed, FltVari, Speed cells.
It was saved with "include source(s)" and "whole patch" options (I think both are enabled by default).

Then, what happens when I try to load it.

I press "load" button, choose the patch (with .ssp extension), then I get warning window telling me "previous patch files may not all be cleared..." (which suprises me as I try to load patch right after starting Soundshaper, before doing anything else), I press "ok", then it says "Missing source for cell A_0 Load original if possible", I press "yes". Then, if I click at A0 and press "play", the original file plays fine ("snd1.wav" and with correct folder path). If I try clicking on process cells, playback options are greyed out.

Then I press "Run" button. Something happens. On the bottom of the page, it says "Infile length not available. File may not exist". Then, if I click any cells, it says "file does not exist". If I click on A0 and press "play", it still plays fine. If I try "play" on any cells, then error window appears with same note (file does not exist).

Report window, of opened, still shows unreadable symbols ("~A_4.bat" �Ґ пў«пҐвбп ў�гваҐ��Ґ© Ё«Ё ў�Ґи�Ґ©
Є®¬ �¤®©, ЁбЇ®«�塞®© Їа®Ја ¬¬®© Ё«Ё Ї ЄҐв�л¬ д ©«®¬.)

Now, if I do double-click on any of the processes, as you suggest above. Let's try with Reverb. Firstly, it greets me with message "parameter file does not exist". Then it loads parameters page and another warning message ('''' is not a valid integer value). I press "ok", then click "render" and then it says "Expected output file was not found". After which, report window changes content to the following:

rgain    : set level of dense reverb (0.0 <= rgain <= 1.0)
mix      : dry/wet balance (source and reverb): 1.0<-- mix -->= 0.0
rvbtime  : reverb decay time (to -60dB) in seconds
absorb  : degree of hf damping to suggest air absorption: 0.0 <= absorb <= 1.0
lpfreq  : lowpass filter cutoff freq (Hz) applied at input to reverb
to disable either filter (absorb, lpfreq), use the value 0
trtime  : trailer time added to outfile for reverb tail (secs)
times.txt: list of delay times (msecs) for 6 comb and 4 allpass filters

Then, if I click "run" again it says "multi processing finished", but nothing actually changes as I still get "file does not exist" messages etc.

Now, if I try double-clicking Speed instead, it firstly talks about lack of .prm, and then says "Cell's input file does not exist. Cannot re-edit cell".

So that's what happens to me. Now, if I restart Soundshaper and load patch again, and say "NO" when asked, and then manually choose snd1.wav. Soundfile loads fine in A0 again, and then software asks me to press "run". However, after that it's all just the same behaviour.



So, long story short, this was my first experience trying to save and load patch, and it ended up not working as I hoped :) Maybe I did some error when saving? Maybe there are other reasons for this behaviour? Still, I hoped that it would be a straightforward process, where you could work on your cell sequence and save it, and then load it the next day, use same or different source and the process sequence would be applied without problems and overall it would feel like opening the saved project to continue working on it.

One more detail I've now noticed, though. When opening parameters for reverb, I notice that Delaytimes datafile is in orange, and if you click on it, the text preview is empty (and there is no filepath displayed under "delaytimes data"). Meanwhile earlyref datafile is just black and if you click, it previews values just fine (and filepath displayed under "earlyref data"). Could this be important?

On a side note, I'm under impression that I've rewritten some of default .brk files for some of processes (for filters, for example), should I just copy the whole txt folder from installation files to restore those?

Thanks, and I hoped I described details now, anything else needed?
#57
General Board / Re: Soundshaper troubles with ...
Last post by Robert Fraser - June 03, 2025, 10:03:58 AM
Hi,

I'm afraid I haven't been able to repeat this problem. I used Speed (Transpose semitones) as a test process. I clicked T-V (automation) and edited the default values graphically, then clicked the SAVE CHANGES button and hit PREVIEW. I repeated this several times, editing the values manually in the edit memo. I could go back through the earlier previews and they were still correct. For the final change, I again edited the data graphically.

The important thing is to click SAVE CHANGES before clicking the PREVIEW button. This seems fussy, but the button appears when changes might not have been saved, and disappears after being clicked.

Maybe you (or others) could reproduce my test and let us know if it doesn't work for you.

Robert
#58
General Board / Re: Soundshaper troubles with ...
Last post by Robert Fraser - June 02, 2025, 10:20:39 PM
Hi,
I'll look into this tomorrow and get back to you.
Robert
#59
General Board / Re: Soundshaper - problem when...
Last post by Robert Fraser - June 02, 2025, 10:18:05 PM
Hi,

There can be issues when running a patch with a different source sound. Where the first cell fails, showing "File does not exist", it's often fixed by re-editing the cell (double-click on it to bring up parameters) and then clicking RUN (PATCH) when the cell has rendered correctly.  What was the process sequence and (especially) what was the process that failed?

On your second point, if your source was called "snd1.wav" and you process it (A1- A4) it shows the original filename preceded by an asterisk to show it's changed. If you then save one of those outputs to file, it'll show that filename instead.

~A_4.bat" �Ґ пў«пҐвбп ў�гваҐ��Ґ© Ё«Ё ў�Ґи�Ґ©
Є®¬ �¤®©, ЁбЇ®«�塞®© Їа®Ја ¬¬®© Ё«Ё Ї ЄҐв�л¬ д ©«®¬.
Well that does seem like a bug! I've never seen that before. Again, I'd need further details of what produced the message.
#60
Mac installation / Re: Fixed filter banks hang on...
Last post by j_p_higgins - June 02, 2025, 03:18:58 AM
Some progress, the issue is being caused by the normalisation step although both that and the filtering seem to work fine individually. If I bypass normalisation by setting do_norm = 0 the process doesn't get stuck looping. I am not really sure though what is causing it to not get stuck. Some things to note:

  • sndseekEx is returning 0, although I haven't yet checked that it is actually succeeding at all steps
  • reset_filedata_counters doesn't reset ssampsread although manually resetting this to 0 didn't make any difference
  • I have now recreated the bug where it runs first time after a reboot but not any subsequent time, it will also sometimes run correctly if I duplicate the input file and run it again with the new file

I might have to stop trying to troubleshoot this now, I haven't done any programming in C since I was a teenager and this is getting a bit beyond me but hopefully these will be helpful pointers for someone who actually knows what they are doing!