From f3694385610a66215b65fafc1e05680baddeb090 Mon Sep 17 00:00:00 2001 From: Chris Xiong Date: Sat, 16 Apr 2016 21:03:44 +0800 Subject: Fixed two bugs in initialization process. Documentation... --- ChangeLog | 5 +++ debian/changelog | 14 +++++++ doc/channeldialog.html | 8 ++-- doc/channeleditor.html | 8 ++-- doc/cmdargs.html | 34 ++++++++++++++++ doc/efxdialog.html | 34 ++++++++++++++++ doc/index.html | 14 ++++--- doc/license.html | 8 ++-- doc/mainwindow.html | 11 +++-- doc/optionsdialog.html | 77 +++++++++++++++++++++++++++++++++++ doc/plistdialog.html | 34 ++++++++++++++++ doc/troubleshooting.html | 63 ++++++++++++++++++++++++++++ doc/version.html | 8 ++-- qmidiplayer-desktop/main.cpp | 1 + qmidiplayer-desktop/qmpmainwindow.cpp | 33 ++++++++------- qmidiplayer-desktop/qmpmainwindow.hpp | 3 +- 16 files changed, 318 insertions(+), 37 deletions(-) create mode 100644 doc/cmdargs.html create mode 100644 doc/efxdialog.html create mode 100644 doc/optionsdialog.html create mode 100644 doc/plistdialog.html create mode 100644 doc/troubleshooting.html diff --git a/ChangeLog b/ChangeLog index 8ecc724..8f5f303 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2016-04-16 0.7.2 beta +Don't do full initialization before pharsing arguments. +Fixed load folder not working properly when a relative path is given. +Documentation... + 2016-04-15 0.7.2 beta A little documentation work... diff --git a/debian/changelog b/debian/changelog index 6d22d05..6a3e3e0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,17 @@ +qmidiplayer (0.7.2-2) UNRELEASED; urgency=low + + * New upstream release. + + -- chrisoft Sat, 16 Apr 2016 19:02:22 +0800 + + +qmidiplayer (0.7.2-1) UNRELEASED; urgency=low + + * New upstream release. + + -- chrisoft Tue, 13 Apr 2016 23:17:43 +0800 + + qmidiplayer (0.7.2-0) UNRELEASED; urgency=low * New upstream release. diff --git a/doc/channeldialog.html b/doc/channeldialog.html index ee5a577..a4e5fd2 100644 --- a/doc/channeldialog.html +++ b/doc/channeldialog.html @@ -11,9 +11,11 @@
  • Main Window
  • Channels Dialog
  • Channel Editor
  • -
  • Playlist
  • -
  • Effects
  • -
  • Settings
  • +
  • Playlist
  • +
  • Effects
  • +
  • Settings
  • +
  • Commandline arguments
  • +
  • Troubleshooting
  • Version Info.
  • License
  • diff --git a/doc/channeleditor.html b/doc/channeleditor.html index 34f9a19..fb50cc5 100644 --- a/doc/channeleditor.html +++ b/doc/channeleditor.html @@ -11,9 +11,11 @@
  • Main Window
  • Channels Dialog
  • Channel Editor
  • -
  • Playlist
  • -
  • Effects
  • -
  • Settings
  • +
  • Playlist
  • +
  • Effects
  • +
  • Settings
  • +
  • Commandline arguments
  • +
  • Troubleshooting
  • Version Info.
  • License
  • diff --git a/doc/cmdargs.html b/doc/cmdargs.html new file mode 100644 index 0000000..753ba2a --- /dev/null +++ b/doc/cmdargs.html @@ -0,0 +1,34 @@ + + + +QMidiPlayer Help + + + + +
    +
    +Usage: qmidiplayer [Options] [Midi Files]
    +Possible options are: 
    +  -l, --load-all-files  Load all files from the same folder.
    +  --help                Show this help and exit.
    +  --version             Show this version information and exit.
    +	
    +
    Return +
    + + diff --git a/doc/efxdialog.html b/doc/efxdialog.html new file mode 100644 index 0000000..4f95849 --- /dev/null +++ b/doc/efxdialog.html @@ -0,0 +1,34 @@ + + + +QMidiPlayer Help + + + + +
    +

    Effects Dialog

    +
    + Adjest effect parameters of the internal fluidsynth here. +
      +
    • Changes in this dialog will be applied immediately.
    • +
    • These changes will also affect rendered wave files.
    • +
    +
    Return +
    + + diff --git a/doc/index.html b/doc/index.html index 7fbfb40..ad21637 100644 --- a/doc/index.html +++ b/doc/index.html @@ -11,9 +11,11 @@
  • Main Window
  • Channels Dialog
  • Channel Editor
  • -
  • Playlist
  • -
  • Effects
  • -
  • Settings
  • +
  • Playlist
  • +
  • Effects
  • +
  • Settings
  • +
  • Commandline arguments
  • +
  • Troubleshooting
  • Version Info.
  • License
  • @@ -35,10 +37,10 @@
  • The main window
  • The channels dialog
  • The channels parameters editor
  • -
  • The playlist dialog
  • -
  • The effects dialog
  • +
  • The playlist dialog
  • +
  • The effects dialog
  • Visualization
  • -
  • Setting up QMidiPlayer
  • +
  • Setting up QMidiPlayer
  • About QMidiPlayer

    diff --git a/doc/mainwindow.html b/doc/mainwindow.html index 5fd074c..a054c58 100644 --- a/doc/mainwindow.html +++ b/doc/mainwindow.html @@ -11,9 +11,11 @@
  • Main Window
  • Channels Dialog
  • Channel Editor
  • -
  • Playlist
  • -
  • Effects
  • -
  • Settings
  • +
  • Playlist
  • +
  • Effects
  • +
  • Settings
  • +
  • Commandline arguments
  • +
  • Troubleshooting
  • Version Info.
  • License
  • @@ -37,7 +39,8 @@
  • Render to Wave.
    It's not possible to use this action unless the player is stopped.
    The output wave file, with the name (source file name)+'.wav',
    - is always placed in the folder that the source midi file is in.
  • + is always placed in the folder that the source midi file is in.
    + MIDI mapping does not apply to render results.
    Return diff --git a/doc/optionsdialog.html b/doc/optionsdialog.html new file mode 100644 index 0000000..a033261 --- /dev/null +++ b/doc/optionsdialog.html @@ -0,0 +1,77 @@ + + + +QMidiPlayer Help + + + + +
    +

    Settings Dialog

    + Settings are stored in $HOME/.config/qmprc
    + For Windows users, $HOME refers to X:\Users\<your user name>\.config, where X is the system drive of your + Windows installation.
    + Options with one asterisk will be applied after restarting QMidiPlayer.
    + Options with two asterisks will be applied after the internal fluidsynth is restarted.
    + Other options are applied immediately.
    +
    +
      +
    • Default Output Device*: specify the default midi device to use.
    • +
    • Disable Midi Mapping*: only use the default output device.
    • +
    • Send SysEx: whether to send system exclusive messages or not.
    • +
    • Wait for remaining voices before stopping:
      + If checked, the player will not stop until the current polyphone reaches 0.
      + Otherwise it will stop immediately after the last event is sent. +
    • +
    • Text encoding: text encoding used in the midi file.
    • +
    +
    +
      +
    • Audio Driver**: specify the audio backend used by the internal synthesizer.
    • +
    • Audio Buffer Size**: Size per buffer used by the fluidsynth engine.
    • +
    • Audio Buffer Count**: Number of buffers used by the fluidsynth engine.
    • +
    • Audio Format**: audio output format of the fluidsynth engine.
    • +
    • Audio Frequency**: audio output sampling frequency of the fluidsynth engine.
    • +
    • Max Polyphony**: maximum simultaniously played voices of synthesizer.
    • +
    • CPU Cores**: threads used by the internal synthesizer.
    • +
    • Auto bank select mode:
      + If checked, the player will choose the appropriate bank selecting mode + according to the file standard. If the file doesn't specify the standard + the player will fallback to the default bank select mode. + Otherwise the player will only use the default bank select mode. +
    • +
    • (Fallback) Bank Select Mode: the default bank select mode.
    • +
    +
    + You can manage soundfont used by the internal fluidsynth engine here.
    + If multiple soundfonts provide instruments with the same bank numbers and preset numbers, + the preset provided by the top most soundfont will be used.
    +
    +
      +
    • Restore last playlist on startup*: If checked and QMidiPlayer is started without files + to open, the playlist from the last session will be used instead of an empty playlist.
    • +
    • Load files in the same folder*: If checked, QMidiPlayer will add all midi files in the + same folder to the playlist when started with a file.
    • +
    • Save dialog status*: Save dialog positions and restore on start up.
    • +
    • Save parameters in effects window
    • +
    • Persistent fluidsynth instance*: If checked, the synthesizer engine will keep running + through the whole session. Otherwise it is restarted every time when a new song is played.
    • +
    +
    Return +
    + + diff --git a/doc/plistdialog.html b/doc/plistdialog.html new file mode 100644 index 0000000..ae14678 --- /dev/null +++ b/doc/plistdialog.html @@ -0,0 +1,34 @@ + + + +QMidiPlayer Help + + + + +
    +

    Playlist Dialog

    +
    +

    Notes

    +
      +
    • Drag & drop to sort.
    • +
    • This dialog (together with the main window) also accepts file drops.
    • +
    +
    Return +
    + + diff --git a/doc/troubleshooting.html b/doc/troubleshooting.html new file mode 100644 index 0000000..f98e768 --- /dev/null +++ b/doc/troubleshooting.html @@ -0,0 +1,63 @@ + + + +QMidiPlayer Help + + + + +
    + If troubleshooting cannot solve your problem, please don't hesitate to report an issue. +

    1. I can't hear anything!

    +

    + 1) Check current audio driver in the option dialog. Do not use an audio driver + that is not installed on your system.
    + 2) If no soundfont is loaded, the synthesizer won't make any sound...
    + 3) Check audio buffer settings in the synth section.
    + 4) Check if your midi file is valid. +

    +

    2. The playback is intermittent.

    +

    + Try increasing audio buffer size and/or audio buffer count in synth options. +

    +

    3. MIDI timing is messed up.

    +

    + This is a known issue under Windows. Try decreasing audio buffer size and + increasing audio buffer count. +

    +

    4. Some files cannot be played.

    +

    5. Some soundfonts cannot be loaded.

    +

    + Files names with characters unsupported by the system locale + won't load correctly in Windows. This is a known issue. +

    +

    6. Sound is distorted.

    +

    + Try reducing the master volume. +

    +

    7. Bank selecting is incorrect for the internal synth.

    +

    + Change default midi mapping if necessary. +

    +

    8. Bank selecting is incorrect for external devices.

    +

    + Bank selecting to external devices is sent in raw format. The midi + file may be incompatible with your device. +

    +
    + + \ No newline at end of file diff --git a/doc/version.html b/doc/version.html index fff816f..050ab09 100644 --- a/doc/version.html +++ b/doc/version.html @@ -11,9 +11,11 @@
  • Main Window
  • Channels Dialog
  • Channel Editor
  • -
  • Playlist
  • -
  • Effects
  • -
  • Settings
  • +
  • Playlist
  • +
  • Effects
  • +
  • Settings
  • +
  • Commandline arguments
  • +
  • Troubleshooting
  • Version Info.
  • License
  • diff --git a/qmidiplayer-desktop/main.cpp b/qmidiplayer-desktop/main.cpp index 3a7e630..e763811 100644 --- a/qmidiplayer-desktop/main.cpp +++ b/qmidiplayer-desktop/main.cpp @@ -33,6 +33,7 @@ int main(int argc,char **argv) a.installTranslator(&qmpTranslator); qmpMainWindow w; if(w.pharseArgs(argc,argv)==1)return 0; + w.init(); return a.exec(); } diff --git a/qmidiplayer-desktop/qmpmainwindow.cpp b/qmidiplayer-desktop/qmpmainwindow.cpp index 45ab634..b01df10 100644 --- a/qmidiplayer-desktop/qmpmainwindow.cpp +++ b/qmidiplayer-desktop/qmpmainwindow.cpp @@ -1,5 +1,6 @@ #include #include +#include #include #include #include @@ -45,9 +46,20 @@ qmpMainWindow::qmpMainWindow(QWidget *parent) : ui->lbFileName->setText("");ref=this; playing=false;stopped=true;dragging=false; settingsw=new qmpSettingsWindow(this); + plistw=new qmpPlistWindow(this);player=NULL;timer=NULL; singleFS=qmpSettingsWindow::getSettingsIntf()->value("Behavior/SingleInstance",0).toInt(); +} + +qmpMainWindow::~qmpMainWindow() +{ + if(player)delete player; + if(timer)delete timer; + delete ui; +} + +void qmpMainWindow::init() +{ player=new CMidiPlayer(singleFS); - plistw=new qmpPlistWindow(this); chnlw=new qmpChannelsWindow(this); efxw=new qmpEfxWindow(this); infow=new qmpInfoWindow(this); @@ -81,18 +93,12 @@ qmpMainWindow::qmpMainWindow(QWidget *parent) : connect(timer,SIGNAL(timeout()),this,SLOT(updateWidgets())); connect(timer,SIGNAL(timeout()),chnlw,SLOT(channelWindowsUpdate())); connect(timer,SIGNAL(timeout()),infow,SLOT(updateInfo())); -} - -qmpMainWindow::~qmpMainWindow() -{ - delete player; - delete timer; - delete ui; + if(havemidi)on_pbPlayPause_clicked(); } int qmpMainWindow::pharseArgs(int argc,char** argv) { - bool havemidi=false,loadfolder=false; + bool loadfolder=false;havemidi=false; for(int i=1;iemptyList();} if(loadfolder||qmpSettingsWindow::getSettingsIntf()->value("Behavior/LoadFolder",0).toInt()) { - QDirIterator di(QUrl(argv[i]).adjusted(QUrl::RemoveFilename).toString()); + QDirIterator di(QFileInfo(argv[i]).absolutePath()); while(di.hasNext()) { QString c=di.next(); @@ -132,7 +138,6 @@ int qmpMainWindow::pharseArgs(int argc,char** argv) plistw->insertItem(argv[i]); } } - if(havemidi)on_pbPlayPause_clicked(); return 0; } diff --git a/qmidiplayer-desktop/qmpmainwindow.hpp b/qmidiplayer-desktop/qmpmainwindow.hpp index a409d2e..e17a792 100644 --- a/qmidiplayer-desktop/qmpmainwindow.hpp +++ b/qmidiplayer-desktop/qmpmainwindow.hpp @@ -29,6 +29,7 @@ class qmpMainWindow:public QMainWindow public: explicit qmpMainWindow(QWidget *parent = 0); + void init(); void closeEvent(QCloseEvent *event); void moveEvent(QMoveEvent *event); void dropEvent(QDropEvent *event); @@ -66,7 +67,7 @@ class qmpMainWindow:public QMainWindow private: Ui::qmpMainWindow *ui; QTimer *timer; - bool playing,stopped,dragging,fin,singleFS; + bool playing,stopped,dragging,fin,singleFS,havemidi; std::thread *playerTh=NULL; std::thread *renderTh=NULL; std::chrono::steady_clock::time_point st; -- cgit v1.2.3