Hornresp

My laptop takes 9 sec to render. C2D 2GHz.

I was just hoping it would be relatively easy to adapt the code.
But it works great now so no reason to break it =)

"In such piece of software as Hornresp we have to manage carefully with the number and size of the tables and arrays and we have also to reduce nested loops"

When running Octave I quickly ran out of memory and hang the VM. So I'm surprised how little memory Hornresp needs to run this. I guess these optimizations play a large role in it.
 
Hello David,

You are right, the optimization of the spectrogram routine for Hornresp was a bit tricky and I have my own secrets but you'll be amazed as simple is the resulting code .

But, as it seems that the run time to obtain the spectrogram is long on certain computers I have an idea that I'll submit to David McBean to reduce some more the duration of the calculation....

Best regards from Paris, France

Jean-Michel Le Cléac'h



When running Octave I quickly ran out of memory and hang the VM. So I'm surprised how little memory Hornresp needs to run this. I guess these optimizations play a large role in it.
 
Hi GM,

I am fast coming to the conclusion that something is not quite right with your computer - you seem to have more problems running Hornresp than the rest of us put together :).

The spectrogram for the attached input parameters takes 15 seconds to produce on my computer, which runs Windows XP and has a 2.8GHz Intel Pentium 4 processor with 256MB of RAM - not exactly a "top-of-the-line" system... :).

Kind regards,

David

Ya think?! ;) I've been wondering for quite awhile now. It's a hand-me-down XP Pro/SP2 ASUS 2.4 GHz P4/2 GB ram that a buddy had built for an on-line gamer. Over time, I've had quite a few 'inconsistencies' with HR that I've just accepted, figuring it was an XP Pro 'thing' since I've had problems with other older programs, especially BoxPlot 3.07, that I didn't have with 98SE. SPEAK won't even load in it and old DOS programs only partially work, if at all.

I had the builder go through it recently and he couldn't find anything wrong with it, but went ahead and installed a wiped clean, newer, larger HD and did a fresh install of everything, which helped some in overall performance, but my core problems with older programs are still happening.

Anyway, for four times, it varied from 23-25 sec to do your test TH spectrogram, but haven't installed the latest revision, if that should make a difference.

GM
 
Hello GM,

23 seconds is the run time for the test spectrogram on my old laptop, so it seems quite OK (while a bit slow on your quite recent computer).

David McBean will correct me if what I say is wrong but it seems to me that when we launch the "Spectrogram" routine it recalculates the "Impulse Response" first, even if the "Impulse Response" has been yet calculated and displayed.

May be we should add a button called "Spectrogram" on teh side of the "Impulse Response" window, as for the export button, so we will be sure that the IR has been yet calculated in order to earn several precious seconds there...

Best regards from Paris, France

Jean-Michel Le Cléac'h

Anyway, for four times, it varied from 23-25 sec to do your test TH spectrogram, but haven't installed the latest revision, if that should make a difference.

GM
 
Last edited:
I also have a very old box here, an AMD Athlon XP@1,8Ghz and while working with Windows XP/SP3 it takes about 5-8 Seconds till the spectrogram ist finished.
You could run some benchmarks (sisoft sandra) to check and compare if your system is "ok". Regarding old Programs: for very old DOS-Programs, try out Dosbox which simulates another PC running plain DOS (even works for old games).
Regarding old windows programs: id you try the compatibility mode build into windows XP?

hornresp, however, doesn´t need any special treatment whasoever and runs on every odd, old and weird configured peace of hardware I have (quite a lot..) on plain windows installs.
 
Impulse Response Problems?

Hi David,

When looking over a simulation for a tapped horn w/ throat chamber I noticed that the impulse response graph showed pronounced differences with only minute changes in the length of the throat chamber coupling duct. When listening to the respective .wav files I can hear a difference. There should not be an audible difference, the change is just too small.

As expected the SPL response only shows the slightest of differences, if any.

I plotted out impulse response data for Lpt=1.78 to Lpt=1.82. Also, you may notice how hard it is to see the red line in the comparison graphs.

Regards,
 

Attachments

  • 2010_Jun17_Input_Impulses_smaller.jpg
    2010_Jun17_Input_Impulses_smaller.jpg
    81.5 KB · Views: 165
David McBean will correct me if what I say is wrong but it seems to me that when we launch the "Spectrogram" routine it recalculates the "Impulse Response" first, even if the "Impulse Response" has been yet calculated and displayed.

May be we should add a button called "Spectrogram" on the side of the "Impulse Response" window, as for the export button, so we will be sure that the IR has been yet calculated in order to earn several precious seconds there...

Hi Jean-Michel,

You are correct - the Impulse Response and Impulse Spectrogram tools operate completely independently. I originally thought about doing something similar to what you now suggest, but came to the conclusion that I would rather have slightly longer spectrogram run times in the interests of keeping the overall operation of the tools as direct and as straight-forward as possible. Hopefully a few seconds either way will not present a significant problem to users :).

Kind regards,

David
 
When looking over a simulation for a tapped horn w/ throat chamber I noticed that the impulse response graph showed pronounced differences with only minute changes in the length of the throat chamber coupling duct.

Hi Oliver,

Interesting results - I am not sure why there should be such large differences.

Jean-Michel would be the best person to comment on this.

Kind regards,

David
 
re impulse code

Thanks David

Just a note to say thanks and a vote to keep the impulse codes separate--I run hornresp in wine on linux and the "regular" code works and the new thing is just a hard crash (apparently due to partial implem of OleLoadPictureEx & OLEPictureImpl_SaveAsFile). I know, not your problem, but I appreciate having the functionality present. Thanks to Jean-Michel, too, btw--didn't mean to sound ungrateful.
 
May be we should add a button called "Spectrogram" on the side of the "Impulse Response" window, as for the export button, so we will be sure that the IR has been yet calculated in order to earn several precious seconds there...

Hi Jean-Michel,

Further to my Post #1253, the next release of Hornresp will re-calculate the impulse response and spectrogram results only if:

* They have not already been calculated once.
* Any of the input parameter values have changed.

This process will occur automatically, with no requirement for the user to click any buttons.

Run times on my computer using the tapped horn test record given in Post #1235 are as follows, assuming no changes to input parameter values between steps:

Scenario 1:

Step 1 - Run impulse response tool - 7 seconds
Step 2 - Run spectrogram tool - 9 seconds
Step 3 - Re-run impulse response tool - 1 second
Step 4 - Re-run spectrogram tool - 2 seconds

Scenario 2:

Step 1 - Run spectrogram tool - 15 seconds
Step 2 - Run impulse response tool - 1 second
Step 3 - Re-run spectrogram tool - 2 seconds
Step 4 - Re-run impulse response tool - 1 second

Kind regards,

David
 
Last edited:
* All existing records in the Hornresp.dat data file will be automatically updated to include fields for the Pmax and Xmax parameters. The two new fields will be initially auto-populated with values of 100 watts and 5.0 mm respectively. These default values can then be changed by the user when actual Pmax and Xmax values for a particular driver are known.
It is impossible to change Pmax and Xmax for all older projects. The Maximum SPL window never shows "Press Ctrl+S to save new data" only "Enter a blank for normal SPL response"