Hornresp

HI David, I actually don't have much choice concerning the options suggested, as my plans for the workbooks include an "Import" option, which would allow the user to import a Hornresp data file to use as a "target sim" - this is because many builds first start as a sim and then the user tries to figure out how to convert the sim into a build. My aim is to include this feature in the series-tuned 6th order BP workbook, and then add it to the other workbooks if it works out well.

So, it looks like option #1 is the way to go.
 
This import/export thingy is actually working better than I expected. I've attached a screenshot of the latest version of the workbook, which shows the imported parameters of the Hornresp sim (in yellow), and workbook-derived parameters using the workbook's "Best Fit" option. Took me about three or four import/export routines to get a perfect match. I'm definitely going to include this feature in the final version of this workbook. Enabling the F6 option for the wizard will make it even easier to determine the best driver offset.
 

Attachments

  • 2019-08-08.png
    2019-08-08.png
    128.3 KB · Views: 236
I actually don't have much choice concerning the options suggested, as my plans for the workbooks include an "Import" option

Hi Brian,

I can't see why your planned Import feature should place any constraint on the format or contents of the Export file. I have investigated further and if you would prefer something different to option #1 for the output, then please let me know and I will see what can be done.

Kind regards,

David
 
Hi Brian,

I can't see why your planned Import feature should place any constraint on the format or contents of the Export file.

If the Hornresp user exports a sim that has the semi-inductance values in it, it might lead to some confusion and possible error when he imports that result from the workbook and those values are missing. This is what I'm trying to avoid.


I have investigated further and if you would prefer something different to option #1 for the output, then please let me know and I will see what can be done.

It would be great if Hornresp assumes default values (when it can) for parameters that are not included in the import file, rather than declaring that the file is invalid. See example below - I've highlighted in bold those parameters where I think default values can be assumed, at least for this type of sim.

ID=48.20
Ang=2.0 x Pi
Eg=30.00
Rg=0.00
Cir=0.00
Vc1=49.00
Lc1=64.30
Ap1=500.00
Lp1=23.00
Vc2=33.20
Lc2=46.30
Ap2=190.00
Lp2=48.70
S3=0.00
Lo1=30.40
L34=0.00
F34=0.00
S4=0.00

Lo2=15.90
L45=0.00
F45=0.00

Sd=545.40
Bl=14.57
Cms=2.53E-04
Rms=2.09
Mmd=69.92
Le=0.66
Re=3.89
BP6S=1
Vrc=0.00
Lrc=0.00
Fr=0.00
Tal=0.00
Vtc=0.00
Atc=0.00

Pmax=100
Xmax=5.0
Path=0.0
Mass=0.00

Re'=3.16
Leb=0.47
Le=22.96
Ke=0.08
Rss=50.07
Rms=0.00
Ams=0.00E+00
Fr1=0.00
Fr2=0.00
Fr3=0.00
Fr4=0.00
Tal1=100
Tal2=100
Tal3=100
Tal4=100


(and of course all the settings for the filtering options)

There's one more option I'd love to see included - include the index number for the Honresp sim in the export file, and if it's re-imported into Hornresp, offer the option to overwrite the existing sim with the same index number. Or maybe use the "Comment" field as the index - if the Hornresp data file already has a sim that has an identical Comment, offer the option to overwrite it. While the process I've put together for the workbook works well, it can lead to multiple copies of the same sim in Hornresp if the export/import routine is repeated a few times.
 
Hi Brian,

If the Hornresp user exports a sim that has the semi-inductance values in it, it might lead to some confusion and possible error when he imports that result from the workbook and those values are missing. This is what I'm trying to avoid.

I will set things up so that Hornresp will accept a file exported from your BOXPLAN workbooks that complies with the format shown in the attachment. The only difference to your example in Post #9792 is that the absorbent filling material parameters have been removed.

It would be great if Hornresp assumes default values (when it can) for parameters that are not included in the import file, rather than declaring that the file is invalid.

The file was declared invalid because the number of parameters listed in the file was different to that expected to be seen by Hornresp. Default values are automatically assumed for parameters legitimately not included in the file. For the proposed new file, default values (in most cases zero) will be assumed for the absorbent filling material and filter parameters (which will not be included in your exported file).

There's one more option I'd love to see included - include the index number for the Honresp sim in the export file, and if it's re-imported into Hornresp, offer the option to overwrite the existing sim with the same index number.

I can foresee all sorts of problems arising in attempting to implement the suggested feature in a robust fashion - it's not going to happen :).

While the process I've put together for the workbook works well, it can lead to multiple copies of the same sim in Hornresp if the export/import routine is repeated a few times.

Once the F6 import functionality is added to the band pass loudspeaker wizard, you will be able to export to the wizard as many times as you like to check the performance of modified systems, without creating multiple copies of the Hornresp record.

Unless you have any serious objections to the course of action proposed above, I will proceed along these lines. If for some reason you also want to include the absorbent filling material parameters in your export file, then please let me know. I am not sure that they would be of much use to you though, in the context of optimising the physical dimensions of a system.

If it is okay to proceed as proposed, then it will be necessary for you to modify all of your workbooks to export the list of parameters shown in the attached file, and in the order shown. The label names will of course need to be changed to some degree in the various workbooks, depending upon the loudspeaker type.

Kind regards,

David
 

Attachments

  • BOXPLAN.TXT
    423 bytes · Views: 51
Unless you have any serious objections to the course of action proposed above, I will proceed along these lines. If for some reason you also want to include the absorbent filling material parameters in your export file, then please let me know. I am not sure that they would be of much use to you though, in the context of optimising the physical dimensions of a system.

Hi David, having had a bit more time to think about it, I think just going with Hornresp's current standard data export/import file format might be the best approach. It's pretty trivial for me to add in code in the Excel workbooks to write the additional data to the files for input to Hornresp [probably easier than it is for you to modify the program], and if I'm going to do so to include some of the parameters, I may as well go ahead and do it for all of them, even if they're not going to be used in the workbook.

Plus, who knows if future versions of the workbooks will allow the user to set values for filling and for the desired filtering options? :) The overall intent of the workbooks is to "map" a box design that's being considered as close as possible to a sim (and in some cases, vice-versa), so it makes sense to eventually account for ALL parameters that may affect the design, even if they're unused by the workbooks at the moment.

This should also make it easier for you to update the "F6" option in the wizard - just re-use the same routine normally used to import a Hornresp data file, rather than having a special one for the Wizard...
 
I've come across a minor "bug"...

To recreate:

1. Create a Hornresp sim
2. Select a driver from the database that has the semi-inductance parameters set
3. Turn off the semi-inductance option
4. Export the sim, then import it back into Hornresp

When you import the sim, you should see the semi-inductance turned back on again. I did some digging around in the data files, and it seems that Hornresp stores the flag that turns off the semi-inductance option in the driver database, not in the sim's record. I think it really should be stored in the sim's record, as the user might want to turn it on or off for a particular sim. Ditto for the "Lossy Le" option.

I have a few questions about the driver database too, but I'll use another post for that.
 
Ok on to Hornresp's driver database.

Hornresp's driver database is basically a folder that contains text files, one for each driver in the database. The text files are name according to who you named the drivers in Hornresp, and each text file contains data that looks like the following example:

Eminence KappaLite 3012LF-4

Sd=545.40
Bl=14.57
Cms=2.53E-04
Rms=2.09
Mmd=69.92
Le=0.66
Re=3.89
Pmax=1100
Xmax=9.1
Re'=3.16
Leb=0.47
Le=22.96
Ke=0.08
Rss=50.07
Rms=0.00
Ams=0.00E+00
LossyLe=0
SemiInductance=1
Damping=0



Apart from the first two lines (the first one basically being the same as the name of the driver's data file, so I'm not sure why it's included in the actual data), the rest looks pretty straightforward, and should be easy to extract using VB's built-in function for reading INI files.

So....

What I'm planning to do is to put together an Excel workbook that will read in all of the data and display it in table format, to allow for easier updating, and then save the data back into the appropriate text files. If anyone's interested in seeing something like this, let me know.

Now a request - it looks like it's not possible to ADD additional data to the driver data files (I tried and Hornresp reports an error when I try to select the corresponding driver). Can this be changed to allow the files to hold additional data? I'm talking about data that might not be useful to Hornresp, but may be useful for the build process (i.e. the driver's physical dimensions). This will allow me to get away from using two databases to hold driver information - one for the Hornresp parameters, and another for the driver's physical dimensions.
 
I think just going with Hornresp's current standard data export/import file format might be the best approach.

Hi Brian,

Too late, the die is cast :).

It's going to be the file I posted yesterday, the only change being that ID=29 is now ID=BOXPLAN.

One reason for wanting the different file is because when imported into Hornresp, it is checked far more rigorously than files generated by Hornresp itself. This is because I have no control over what a user may specify in your workbooks, so I need to account for all eventualities, as best I can.

Besides, there is no scope for absorbent filling material to be specified in the band pass wizard, and most of the filter data would be redundant anyway.

Kind regards,

David
 
When you import the sim, you should see the semi-inductance turned back on again.

Hi Brian,

If the semi-inductance option is turned off by the user and the recorded then exported, it is exported with the option turned off. When the exported record is then imported, the option will still be turned off because because that's what the user specified.

This functionality is intentional, it's not a bug, and it's not going to change.

Don't turn the option off before exporting, and you won't have a problem... :).

Kind regards,

David
 
I'm not sure why it's included in the actual data)

It's included so that if the contents of the file are posted, as you have done, people know what driver make and model the parameter values refer to.

Can this be changed to allow the files to hold additional data?.

It's not going to happen. If you want to store driver dimensions, you will have to create your own database.
 
Hi Brian,

If the semi-inductance option is turned off by the user and the recorded then exported, it is exported with the option turned off. When the exported record is then imported, the option will still be turned off because because that's what the user specified.

That's the issue I ran into. It's being turned back on again, rather than being left off as expected.
 
One reason for wanting the different file is because when imported into Hornresp, it is checked far more rigorously than files generated by Hornresp itself. This is because I have no control over what a user may specify in your workbooks, so I need to account for all eventualities, as best I can.

But how would Hornresp know that the file the user was trying to import was was actually previously generated by Hornresp? :) Going by the ID isn't sufficient - that can be easily "faked" by the program creating the import file. Right now my latest workbook is setting the ID to 48.20 (to match the ID included in files exported from Hornresp), and Hornresp is successfully importing the files generated by the workbook (after I included filter data, of course).
 

Attachments

  • 2019-08-11.png
    2019-08-11.png
    133.1 KB · Views: 148
Sorry to Hear that ....

Hi Bill,

Sounds complicated :).

I try to keep things as simple as possible so that I can understand what I am doing (this is becoming increasingly difficult the older I get).

Kind regards,

David

…. as what I am proposing permits automation of the design optimization process; and, allows the user to do this without further modification of Hornresp. Bill
 
I've started work on a workbook that will import Hornresp's driver data and present it in a table (the intent being to make it easier to update the information and share it around, and use it in other workbooks). I've got the import function working and immediately noticed something strange - quite a few drivers seem to have the same semi-inductance parameters. Unusual - I'm pretty sure that I didn't save them to the Hornresp driver database that way, but when I examined the corresponding text files, they backed up what was being displayed in the workbook. I'm curious to how that might have happened. Any ideas?
 

Attachments

  • 2019-08-11 (1).png
    2019-08-11 (1).png
    156.9 KB · Views: 126