Sei sulla pagina 1di 8

Microphones positioning GUI

User Manual

Image and Sound Processing Group


Politecnico di Milano
SCENIC Project
Contents

What is “Microphones positioning GUI”? 2

How to begin 2

GUI structure 2

GUI functions 3
Entering input data . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Linear array . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Circular array . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Regular polygon shaped array . . . . . . . . . . . . . . . . . . 4
Custom array . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Current array (modifications) . . . . . . . . . . . . . . . . . . 5
Data from existing file . . . . . . . . . . . . . . . . . . . . . . 5
Source path . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Executing buttons . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Graphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Creating XML/ZIP file . . . . . . . . . . . . . . . . . . . . . . . . 7

1
What is “Microphones positioning GUI”?
“Microphones positioning GUI” is a graphic user interface, designed in Mat-
lab, for positioning microphones in a specified type of array and generat-
ing a XML file, (or a ZIP archive including it with associated audio files)
that encodes these positions, with other information about room size and
source path. Files are structured as requested for their upload on the online
database created by PoliMi for the SCENIC project.

How to begin
The Matlab script for opening the interface is Microphones positioning.m;
the following Matlab functions are called by the script:

• circular array.m

• control limits.m

• generate xml.m

• generate zip.m

• linear array.m

• read xml.m

• rpolygon array.m

• rpolygon array2.m

All these m-files must be in the Matlab working directory.


For opening the GUI, launch Microphones positioning from the command
window or evaluate the entire Microphones positioning.m file.

GUI structure
The GUI is divided in three different sections:

• input parameter panel (depending on the selected action);

• plot area;

• generating files panel.

2
GUI functions
Entering input data
Room size can be defined in the top of the input parameters area.
The popup menu select action allows choosing among the following func-
tions:
• creating a linear array;
• creating a circular array;
• creating a regular polygon shaped array;
• creating an array with customized microphones positions;
• modifying the current array;
• reading data from an existing XML file or from the ZIP containing it;
• defining source path.
For each possible choice a different input parameter panel is provided.

Linear array

Input parameters:
• Number of microphones.
• Length of the array or spacing between microphones.
• Center coordinates: the z-coordinate represents the (constant) height
of the array with respect to the floor.
• Line inclination in the xy-plane with respect to x-axis.

Circular array

Input parameters:
• Number of microphones.
• Radius of the circle.
• Center coordinates: the z-coordinate represents the (constant) height
of the array with respect to the floor.
• Offset: rotation of the array; if offeset is zero, the first microphone is
positioned in the x-positive direction with respect to the center; offset
value is normalized to the angular distance between microphones.

3
Regular polygon shaped array

Input parameters:

• Number of edges of polygon.

• Number of microphones: total or per edge; if total number is choosen,


it must be a multiple of the number of edges.

• Length of each edge or spacing between microphones or radius of the


inscribing circle.

• Center coordinates: the z-coordinate represents the (constant) height


of the array with respect to the floor.

• Offset: rotation of the polygon; if offset is zero the first edge is drawn
parallel to y-axis, in the x-positive direction with respect to the center;
offset value is normalized to the center angle subtended by an edge.

• Microphones on the angles (Yes/No): it is possible to choose if the


external microphones of each edge are on its extremes or not. However
the distance between each pair of adjacent microphones (even if they
are on different edges) is constant.

Custom array

Input parameters:

• Positions of microphones.

Panel elements:

• Next button, for inserting a new microphone in the list.

• Back button, for going back to the previous microphone selection.

• Custom microphones list.

• General microphones counter.

4
Current array (modifications)

Panel elements:

• List of current microphones positions (added by one of the previous


funcions or loaded by a file).

• Current microphones counter.

• Button for deleting microphones from the list.

• Buttons for moving microphones in the list: the order of microphones


determines their numbering.

• Button for reversing order.

• Number of the reference microphone, which can be modified in this


panel (default value1 is 1; 0 indicates no reference microphone).

Data from existing file

Input parameters:

• Path of the XML file to load or of the ZIP archive that contains it.

Panel elements:

• Load buttons.

• List of loaded microphones positions.

• List of loaded path positions.

• Loaded microphones counter.

• Loaded path positions counter.

Source path

Input parameters:

• Static/Moving source selection.

• Source path positions: one if static source, more if moving source has
been choosen.
1
Except if data are loaded from a file, in which case reference microphone is setted as
in XML.

5
Panel elements:

• List of moving sources path positions.

• Next button, for inserting a new position in the list.

• Back button, for going back to the previous position selection.

• Moving source path position counter.

• Button for deleting path positions from the list.

• Buttons for moving path positions in the list: the order determines
their numbering.

• Button for reversing path position order.

• Number of the reference path position, for static and moving source
(default value2 is 0, that indicates no reference path position).

Executing buttons
Microphones and source path positions are stored/modified/cleared only
when an executing button is pushed. Available executing buttons depend
on the current selected action:

• Add microphones: available when linear, circular, regular polygon


shaped or custom array is selected; in the first three cases, micro-
phones positions are calculated and stored; in the fourth case, all the
positions in the list are stored. New microphones are added to the
previously created ones.

• Apply changes: available when current array is selected; modifications


are effectively applied when this button is pushed.

• Add data: available when data from file is selected; adds all micro-
phones and path positions loaded from the file and shown in the re-
spective lists. New data are added to the previously stored ones.

• Add/Modify path positions: available when source path is selected;


adds (if no path position is present) or modifies (if one or more path
positions have been previously added) source path positions. If pushed
when moving source is selected, all path position shown in the list are
stored.

• Clear buttons: clear all microphones positions or all source path po-
sitions or both (depending on the selected action).
2
See footnote 1.

6
When an add button is pushed, an “out of limits” control is provided for
advertising the user if there are microphones or path positions which coordi-
nates are outside the room. In this case a choice is possible between adding
the microphones anyway or cancel them.

Graphs
All the currently stored microphones, and eventually all source path posi-
tions, are shown in the graph (if their positions are inside the room!). It is
possible to:

• change from the bidimensional (XY ) to the 3D view and vice versa;

• show/hide numbering of microphones and source path positions;

• show/hide source path positions.

Blue markers represent microphones, red ones represent source path posi-
tion. Reference microphone (or path position) is marked by a bold number
(if numbering is shown).

Creating XML/ZIP file


For creating a XML file which encodes stored data or a ZIP archive including
it with the associated audio files, some boxes are provided in the concerning
panel in order to indicate:

• the folder in which the XML file must be saved (if XML is being
created);

• the folder in which the ZIP file must be saved (if ZIP is being created);

• the folder in which audio data are stored (not needed for creating
XML);

• XML file name (if the box is empty file will be named “note.xml”);

• ZIP file name (if the box is empty file will be named “zipfile.zip”; not
needed for creating XML)

• audio files common name3 and extension (the default extension is


WAV). If a ZIP file is being created, all audio files must be in the
indicated folder.

When a ZIP archive generation is required, XML file is created automati-


cally.
3
Audio file must have a common first part of name followed by a number corresponding
to the associated microphone’s one (for example: “audio1.wav”, “audio2.wav”, ecc.).

Potrebbero piacerti anche