function [] = loadSoundSourceFile() %LOADSOUNDSOURCEFILE Creates a file selection dialog and reads the file into memory. global artoaGui artoaDataInput; %% Initialize variables artoaDataInput.soundsources = false; %% Create file dialog and filename [file, path] = uigetfile('*.soso'); filepath = fullfile(path, file); %% Check if file exists if ~isfile(filepath) error([mfilename ': Selected file ' filepath ' is not a file! Please try again!']); end %% Load file into memory artoaDataInput.soundsources = artoa.load.soundsources(filepath); %% Update workspace artoa.controller.generateSoundSourceColors(); %artoa.controller.copyRfbToWorkspace(); %% Update menu buttons if ~islogical(artoaDataInput.soundsources) artoaGui.main.menus.edit.Enable = 'on'; end end