AFMG Network Forum
AFMG Network Forum Index -> EASE 4 -> Creating Speaker Data XHN Files
Post new topic  Reply to topic View previous topic :: View next topic 
Creating Speaker Data XHN Files
PostPosted: Tue Jun 04, 2013 8:10 pm Reply with quote
kbasaran
Member
 
Joined: 04 Jun 2013
Posts: 6




Hello,

I need to create speaker data for a few loudspeakers. These are Voice Alarm speakers and I will use this data to gather STI data in a project.

I am an experienced user of Matlab and of course, Excel. I have devised a code in Matlab for interpolation of 15° resolution measurements to 5° resolution measurements and now I can create the Attenuation Data matrix just the way Ease data files require.

My problem is to import the data to EASE. I could not find a practical way to create the .xhn ASCII files using Excel or Matlab. I have the matrices ready but I don't know how to export to a text file.

Please share your ideas on this subject if you have any. Thanks in advance.
View user's profile Send private message
PostPosted: Tue Jun 04, 2013 9:24 pm Reply with quote
AFMG Pedro Lima
Forum Moderator
 
Joined: 05 Jun 2010
Posts: 266
Location: Germany




Hi,

Maybe these can be helpful:

- http://www.ita-toolbox.org - Here you can find a really nice addition to MatLab. You can probably create an itaAudio object from the data you have in Matlab and then export it directly to one of the compatible file types EASE use, as Monkey Forest .SPK.

However, I'm not sure if creating the .xhn files directly with matlab would be faster.

- http://www.aes.org/e-lib/browse.cfm?elib=14823 - This one is an Award Winning article that should contain important information about modeling of sound sources, including angular and frequency resolution, the need for phase data, etc...

Hope this helps,
Pedro
View user's profile Send private message
PostPosted: Wed Jun 05, 2013 7:43 am Reply with quote
kbasaran
Member
 
Joined: 04 Jun 2013
Posts: 6




Thanks Pedro,

I'm glad you introduced me to ITA-Toolbox. It seems to be a very capable measurement package. I have checked through it to find if there's any option for ASCII export and found that it only supports UFF format exports. I don't think this solves my problem.
View user's profile Send private message
PostPosted: Wed Jun 05, 2013 5:08 pm Reply with quote
AFMG Pedro Lima
Forum Moderator
 
Joined: 05 Jun 2010
Posts: 266
Location: Germany




I see now that you have the directivity data.

Actually, I was thinking that maybe you could get the Frequency Response (TF) data for each 5 degree increment and export then to an .SPK format, so that you end up with a number of "measured data" with 5 degree increment. You would then export those files instead of exporting the directivity data.

Next you would import the files and SpeakerLab would create the attenuation balloon for you (Edit > Balloon Data).

Still, exporting the directivity data seems easier. I believe you already have an .xhn to use as a model? It should not be difficult to understand the syntax used on it.

In the past I have done an excel sheet where you imported a model .xhn file and then the directivity data (exported from a third part program, as MatLab) and a third tab would combine both, getting the directivity data and putting it in the right places so that it had the correct syntax of the .xhn. Then I would just save this third tab/sheet.

I have not tried, but I imagine that a macro could also make this Import/Save process automated.

HTH,
Pedro
View user's profile Send private message
PostPosted: Wed Jun 05, 2013 5:21 pm Reply with quote
AFMG Pedro Lima
Forum Moderator
 
Joined: 05 Jun 2010
Posts: 266
Location: Germany




Have you tried using the fprintf function to write data to a file?

Maybe you could also write a script using the fprintf copying the syntax used in a .xhn file and write the data directly, automating the process.

In any case, for a one-time-use, the excel sheet seems less cumbersome.

Pedro
View user's profile Send private message
PostPosted: Thu Jun 06, 2013 12:03 am Reply with quote
kbasaran
Member
 
Joined: 04 Jun 2013
Posts: 6




I've tried the Excel approach but I could not find a "Save As" method that could enclose the strings in apostrophes and uses commas for delimiters.

I am using fprintf in Matlab now. This solved most of my problems and I don't need Excel now. I build a huge cell table as I would do in Excel and export it to an xhn file using a function I have found online. It's called "cell2cvs".

Now the problem is I have excess commas for empty cells. Apparently EASE does not like these commas, the xhn files do not work unless I delete these commas by hand. I am trying to find a method to get rid of them. I guess the solution is close Smile

"FileType","Speaker Types",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
"Format",4,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
"LengthUnit","m",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
"SpeakerName","testspk1",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
View user's profile Send private message
PostPosted: Thu Jun 06, 2013 12:31 am Reply with quote
kbasaran
Member
 
Joined: 04 Jun 2013
Posts: 6




OK it's solved, i added a logical statement to the loop containing fprintf. I had no idea what the "cell2cvs" function was doing until a few hours ago. I see it uses fprintf to write each character in the file.

Thank you for your concern Pedro. I can send you the code if you think it will ever be of help to you.
View user's profile Send private message
PostPosted: Tue Jun 11, 2013 8:00 pm Reply with quote
AFMG Pedro Lima
Forum Moderator
 
Joined: 05 Jun 2010
Posts: 266
Location: Germany




Hi,

I'm glad you could manage it. Thanks, it might be interesting. Please send to pedro .lima (at) afmg . eu.

Best Regards,
Pedro
View user's profile Send private message
PostPosted: Sat Jun 15, 2013 12:35 pm Reply with quote
kbasaran
Member
 
Joined: 04 Jun 2013
Posts: 6




Hello Pedro,

I have shared the scripts on my website. I'm not a programmer and I'm sure this is not "good coding" but I have tested it thoroughly and it works like a charm Smile

http://www.mtises.com/creating-an-ease-speaker-data-file/
View user's profile Send private message
PostPosted: Wed Jun 19, 2013 2:25 pm Reply with quote
Bruce
Member
 
Joined: 19 Apr 2005
Posts: 459
Location: Minneapolis, MN, USA




The easiest way to use Excel to generate these files is to use the template provided with EASE. It can be found in the C:\Program Files (x86)\EASE 4.3\EaseTools\EASE40_Excel_Templates folder.

_________________
Best Regards,
Bruce C. Olson
View user's profile Send private message Send e-mail Visit poster's website
PostPosted: Tue Dec 30, 2014 9:17 am Reply with quote
calosteward
Member
 
Joined: 30 Dec 2014
Posts: 1




SpeakerLab is the program that is used to create GLL files. It can also be used to export an SPK file. SpeakerBase (a module in EASE) can also be used to create an SPK file. If exporting an SPK from SpeakerLab it is recommended to open the SPK in SpeakerBase to check the data and do some final inspection to make sure everything is as desired.

If you own EASE you also have SpeakerLab (as well as SpeakerBase) so no other programs are needed to create the files.

You will need the measured data of the loudspeaker to create either GLL or SPK files. There are several different measurement programs that can perform these measurements. CLIO will work, as well as EASERA, MLSSA, LMS, and Monkey Forest. Any other programs capable of impulse response measurements that can save to one of these file formats or a wave file can also be used.



_________________
Barcode World Create Barcode
Calo Steward
View user's profile Send private message
PostPosted: Fri Sep 16, 2022 3:25 pm Reply with quote
ldaniel-jmz
Member
 
Joined: 16 Sep 2022
Posts: 1




The Excel template provided with EASE (C:\Program Files (x86)\EASE 4.3\EaseTools\EASE40_Excel_Templates\EASE40_SpeakerModel_Data.xlt) is not working, when I click in the button "Save data as EASE ASCII file" it shows an error. I think it's because of compatibility, the file is too old.

Does someone know a fix for this?
View user's profile Send private message
AFMG Network Forum Index -> EASE 4
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT  
Page 1 of 1  

  
  
 Post new topic  Reply to topic  


Powered by phpBB © 2001-2003 phpBB Group
Theme created by Vjacheslav Trushkin
Variation by CodeWeavers and AFMG