public void loadMidi(boolean toLoop, String sourcename,
			FilenameURL filenameURL) {
		if (filenameURL == null) {
			errorMessage("Filename/URL not specified in method 'loadMidi'.");
			return;
		}

		if (!filenameURL.getFilename()
				.matches(SoundSystemConfig.EXTENSION_MIDI)) {
			errorMessage("Filename/identifier doesn't end in '.mid' or"
					+ "'.midi' in method loadMidi.");
			return;
		}

		if (midiChannel == null) {
			midiChannel = new MidiChannel(toLoop, sourcename, filenameURL);
		} else {
			midiChannel.switchSource(toLoop, sourcename, filenameURL);
		}
	}