Skip to content

Commit

Permalink
v0.1.10
Browse files Browse the repository at this point in the history
- As of meico v0.8.33, audio export (WAV, MP3) will now use the currently loaded soundfont.
- The window icon will be displayed also in the title bar of dialog windows.
- The root element in MPR files was renamed to `mpmToolboxProject` (in method `mpmToolbox.projectData.ProjectData.saveProjectAs()`). This change is backward compatible, the old `mpmToolkitProject` will also work.
- New method `mpmToolbox.gui.audio.PianoRollPanel.drawMouseCursor()` that simplifies code in the child classes `SpectrogramPanel` and `WaveformPanel`.
- New method `getMillisecondsLength()` in classes `mpmToolbox.projectData.alignment.Alignment` and `Part`. Furthermore, an optimization has been applied to both classes to more quickly retrieve the last note sounding.
- Added a playback position indicator to the audio visualizations.
- In method `mpmToolbox.projectData.alignment.Alignment.getExpressiveMsm()` some cleanup has been added to remove all maps but the `score` elements, as their contents are not affected by the alignment's timing and, after expressive MIDI export, appear at wrong positions.
- The runtime performance of waveform image computation has been significantly increased by method `mpmToolbox.projectData.audio.Audio.convertWaveform2Image()` and its new helper class `mpmToolbox.projectData.audio.PeakList`.
  • Loading branch information
axelberndt committed Feb 11, 2022
1 parent 8eb3f85 commit 04a5f01
Show file tree
Hide file tree
Showing 23 changed files with 559 additions and 219 deletions.
Binary file modified externals/meico.jar
Binary file not shown.
11 changes: 11 additions & 0 deletions history.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
### Version History


#### v0.1.10
- As of meico v0.8.33, audio export (WAV, MP3) will now use the currently loaded soundfont.
- The window icon will be displayed also in the title bar of dialog windows.
- The root element in MPR files was renamed to `mpmToolboxProject` (in method `mpmToolbox.projectData.ProjectData.saveProjectAs()`). This change is backward compatible, the old `mpmToolkitProject` will also work.
- New method `mpmToolbox.gui.audio.PianoRollPanel.drawMouseCursor()` that simplifies code in the child classes `SpectrogramPanel` and `WaveformPanel`.
- New method `getMillisecondsLength()` in classes `mpmToolbox.projectData.alignment.Alignment` and `Part`. Furthermore, an optimization has been applied to both classes to more quickly retrieve the last note sounding.
- Added a playback position indicator to the audio visualizations.
- In method `mpmToolbox.projectData.alignment.Alignment.getExpressiveMsm()` some cleanup has been added to remove all maps but the `score` elements, as their contents are not affected by the alignment's timing and, after expressive MIDI export, appear at wrong positions.
- The runtime performance of waveform image computation has been significantly increased by method `mpmToolbox.projectData.audio.Audio.convertWaveform2Image()` and its new helper class `mpmToolbox.projectData.audio.PeakList`.


#### v0.1.9
- Added a MIDI Master Volume slider to the SyncPlayer. It is relevant when audio recording and MIDI performance are played synchronously and the MIDI part is too loud. However, Master Volume Control is a MIDI SysEx message and not all devices support it. MPM Toolbox's default synthesizer, Gervill, fortunately does.
- Bugfix in method `mpmToolbox.gui.mpmEditingTools.CommentEditor.makeContentPanel()`. It was unable to query the font metrics for proper initialization.
Expand Down
2 changes: 1 addition & 1 deletion src/mpmToolbox/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* @author Axel Berndt
*/
public class Main {
public static final String version = "0.1.9";
public static final String version = "0.1.10";

public static void main(String[] args) {
// read the application settings from file
Expand Down
20 changes: 10 additions & 10 deletions src/mpmToolbox/gui/MpmToolbox.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import meico.msm.Msm;
import meico.xml.XmlBase;
import mpmToolbox.Main;
import mpmToolbox.projectData.audio.Audio;
import mpmToolbox.supplementary.Tools;
import nu.xom.ParsingException;
import org.xml.sax.SAXException;
Expand All @@ -31,7 +32,6 @@
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.ArrayList;

/**
* This is the host application for all GUI and functionality.
Expand All @@ -54,7 +54,7 @@ public class MpmToolbox {
*/
public MpmToolbox() {
// make the main window
SwingUtilities.invokeLater (new Runnable() {
SwingUtilities.invokeLater(new Runnable() {
public void run() {
MpmToolbox self = MpmToolbox.this;

Expand All @@ -64,10 +64,10 @@ public void run() {

// assign the icon set to the frame
// self.frame.setIconImage(Toolkit.getDefaultToolkit().getImage(this.getClass().getResource(Settings.icon)));
ArrayList<Image> icons = new ArrayList<>();
for (String resource : Settings.icons)
icons.add(Toolkit.getDefaultToolkit().getImage(this.getClass().getResource(resource)));
self.frame.setIconImages(icons);
// ArrayList<Image> icons = new ArrayList<>();
// for (String resource : Settings.iconPaths)
// icons.add(Toolkit.getDefaultToolkit().getImage(this.getClass().getResource(resource)));
self.frame.setIconImages(Settings.getIcons(self));

self.frame.setSize(1500, 1000); // initial size in windowed mode
self.frame.setExtendedState(Frame.MAXIMIZED_BOTH); // toggle fullscreen mode
Expand Down Expand Up @@ -158,20 +158,20 @@ private WebMenuBar makeMenuBar() {
WebMenuItem exportWav = new WebMenuItem("Wave", 'w');
exportWav.addActionListener(actionEvent -> {
Midi midi = this.getProjectPane().getSyncPlayer().getPerformanceRendering();
midi.exportAudio().writeAudio();
midi.exportAudio(this.getProjectPane().getMidiPlayer().getSoundbank()).writeAudio();
});
WebMenuItem exportMp3 = new WebMenuItem("MP3", '3');
exportMp3.addActionListener(actionEvent -> {
Midi midi = this.getProjectPane().getSyncPlayer().getPerformanceRendering();
midi.exportAudio().writeMp3();
midi.exportAudio(this.getProjectPane().getMidiPlayer().getSoundbank()).writeMp3();
});
this.export = new WebMenu("Export Performance Rendering as");
this.export.setMnemonic('e');
this.export.add(exportMidi);
this.export.add(exportWav);
this.export.add(exportMp3);
this.export.setEnabled(this.projectPane != null);
file.add(export);
file.add(this.export);

this.close = new WebMenuItem("Close Project", 'c');
this.close.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_W, InputEvent.CTRL_MASK));
Expand Down Expand Up @@ -397,7 +397,7 @@ public boolean loadFile(File file) {
if (this.projectPane == null)
System.err.println("No project loaded to add the audio.");
else
this.projectPane.addAudio(new mpmToolbox.projectData.Audio(file, this.getProjectPane().getMsm()));
this.projectPane.addAudio(new Audio(file, this.getProjectPane().getMsm()));
break;
case ".jpg":
case ".jpeg":
Expand Down
6 changes: 3 additions & 3 deletions src/mpmToolbox/gui/ProjectPane.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import meico.mpm.Mpm;
import meico.mpm.elements.Performance;
import meico.msm.Msm;
import mpmToolbox.projectData.Audio;
import mpmToolbox.projectData.audio.Audio;
import mpmToolbox.projectData.ProjectData;
import mpmToolbox.gui.audio.AudioDocumentData;
import mpmToolbox.gui.mpmTree.MpmDockableFrame;
Expand Down Expand Up @@ -355,15 +355,15 @@ public void removeScorePage(int index) {
* access the list of Audio objects
* @return
*/
public ArrayList<mpmToolbox.projectData.Audio> getAudio() {
public ArrayList<Audio> getAudio() {
return this.data.getAudio();
}

/**
* add an Audio object to the list of audios
* @param audio
*/
public void addAudio(mpmToolbox.projectData.Audio audio) {
public void addAudio(Audio audio) {
if (this.data.addAudio(audio)) {
this.syncPlayer.addAudio(audio);
}
Expand Down
34 changes: 24 additions & 10 deletions src/mpmToolbox/gui/Settings.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,17 @@ public class Settings {
public static String logfile = "mpmToolbox.log"; // filename of log file
public static String settingsFile = "mpmToolbox.cfg"; // filename of the settings file

public static final ArrayList<String> icons = new ArrayList<>(Arrays.asList("/resources/icons/icon5.png",
"/resources/icons/icon5-1.png",
"/resources/icons/icon5-2.png",
"/resources/icons/icon5-3.png",
"/resources/icons/icon5-4.png",
"/resources/icons/icon5-5.png",
"/resources/icons/icon5-6.png",
"/resources/icons/icon5-7.png",
"/resources/icons/icon5-8.png",
"/resources/icons/icon5-9.png")); // the app icon in different resolutions
private static final ArrayList<Image> iconsImages = new ArrayList<>(); // this arraylist will be filled with the icons loaded from the below array
private static final ArrayList<String> iconPaths = new ArrayList<>(Arrays.asList("/resources/icons/icon5.png",
"/resources/icons/icon5-1.png",
"/resources/icons/icon5-2.png",
"/resources/icons/icon5-3.png",
"/resources/icons/icon5-4.png",
"/resources/icons/icon5-5.png",
"/resources/icons/icon5-6.png",
"/resources/icons/icon5-7.png",
"/resources/icons/icon5-8.png",
"/resources/icons/icon5-9.png")); // the app icon in different resolutions
protected static int windowWidth = 1200; // initial window width
protected static int windowHeight = 800; // initial window height
public static Color foregroundColor = SystemColor.text; // the foreground/text color, this will be set during initialization according to the underlying style and can be accessed by other classes
Expand Down Expand Up @@ -177,4 +178,17 @@ public static int getDefaultFontSize() {
// return defaultFont.getSize();
return WebLookAndFeel.globalWindowFont.getSize();
}

/**
* reads the icons to be used in the title bar of the window
* @param mpmToolbox
* @return
*/
public static ArrayList<Image> getIcons(MpmToolbox mpmToolbox) {
if (Settings.iconsImages.isEmpty() && (mpmToolbox != null))
for (String resource : Settings.iconPaths)
Settings.iconsImages.add(Toolkit.getDefaultToolkit().getImage(mpmToolbox.getClass().getResource(resource)));

return Settings.iconsImages;
}
}
Loading

0 comments on commit 04a5f01

Please sign in to comment.