Dunya-desktop is a desktop application, developed for accessing and visualizing music data such as music scores, audio recordings, extracted features and analysis results. It is a modular and extendable desktop application that the users can customise according to their needs.
Dunya-desktop mainly uses PyQt5 Python bindings for Qt5 application framework, for the user interface design and pycompmusic module for reaching the backend of the Dunya-web.
The code is compatible with Python 2.7+ and Python 3. We highly recommend you to use the code with Python 3 and with a virtual environment.
The given installation steps were tried on OS El Capitan (v10.11.06) and OS El Sierra (v10.12.1).
Install Xcode (can be installed via Mac App Store. Then install command-line tools:
xcode-select --install sudo xcodebuild -licenseAfter the installation, make sure that you have agreed Apple’s licence agreement.
Install Homebrew package manager:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Install Python 3.6+, Qt 5.7 and wget with Homebrew:
brew install python3 qt@5.7 ffmpeg wget
Create a virtual environment (virtualenv) and install requirements.
pyvenv env source env/bin/activate
Go to directory of where dunya-desktop is downloaded.
- IMPORTANT: Don’t forget to change ‘path/to/dunya-desktop’ with the
actual directory name.
cd path/to/dunya-desktop
- Finally, install the package requirements.
pip3 install -r requirements pip3 install PyQt5
Install Python 2.x, Qt 5.7, ffmpeg and wget with Homebrew:
brew install python qt@5.7 ffmpeg wget
Download PyQt 5.7.1 and SIP source packages:
wget https://sourceforge.net/projects/pyqt/files/sip/sip-4.19/sip-4.19.tar.gz wget https://sourceforge.net/projects/pyqt/files/PyQt5/PyQt-5.7.1/PyQt5_gpl-5.7.1.tar.gz
Untar and compile PyQt 5.7.1 and SIP:
# compile sip tar -xvf sip-4.19.tar.gz cd sip-4.19 python configure.py -d /usr/local/lib/python2.7/site-packages/ make sudo make install # compile PyQt5 cd .. tar -xvf PyQt5_gpl-5.7.1.tar.gz cd PyQt5_gpl-5.7.1 python configure.py --confirm-license -d /usr/local/lib/python2.7/site-packages/ --qmake=/usr/local/Cellar/qt\@5.7/5.7.1/bin/qmake --sip=../sip-4.19/sipgen/sip --sip-incdir=../sip-4.19/siplib make sudo make install
Create a virtual environment (virtualenv) and install requirements.
pip install virtualenv virtualenv --system-site-packages env source env/bin/activate
Go to directory of where dunya-desktop is downloaded.
IMPORTANT: Don’t forget to change ‘path/to/dunya-desktop’ with the actual directory name.
cd path/to/dunya-desktop
Finally, install the package requirements.
pip install -r requirements
The given installation steps were tried on Ubuntu 16.04.02 LTS (xenial).
Install Qt 5.x and ffmpeg:
sudo add-apt-repository --yes ppa:ubuntu-sdk-team/ppa sudo apt-get update -qq sudo apt-get install -qq qtdeclarative5-dev libqt5svg5-dev qtmultimedia5-dev build-essential sudo apt-get install -qq ffmpeg export QMAKE=/usr/lib/x86_64-linux-gnu/qt5/bin/qmake
Install Python 3.6
sudo apt-get install -qq python3-dev
Create a virtual environment (virtualenv) and install requirements.
pyvenv env source env/bin/activate
Go to directory of where dunya-desktop is downloaded.
IMPORTANT: Don’t forget to change ‘path/to/dunya-desktop’ with the actual directory name.
cd path/to/dunya-desktop
Finally, install the package requirements.
pip3 install -r requirements pip3 install PyQt5
Install Python 2.x
sudo apt-get install -qq python-dev
Download PyQt 5.8 and SIP source packages:
wget https://sourceforge.net/projects/pyqt/files/sip/sip-4.19.1/sip-4.19.1.tar.gz wget https://sourceforge.net/projects/pyqt/files/PyQt5/PyQt-5.8/PyQt5_gpl-5.8.tar.gz
Untar and compile PyQt 5.8 and SIP:
# compile sip tar -xzf sip-4.19.1.tar.gz cd sip-4.19.1/ python configure.py make sudo make install cd .. # compile PyQt5 tar -xzf PyQt5_gpl-5.8.tar.gz cd PyQt5_gpl-5.8/ python configure.py --confirm-license --qmake=/usr/lib/x86_64-linux-gnu/qt5/bin/qmake make sudo make install
Create a virtual environment (virtualenv) and install requirements.
pip install virtualenv virtualenv --system-site-packages env source env/bin/activate
Go to directory of where dunya-desktop is downloaded.
IMPORTANT: Don’t forget to change ‘path/to/dunya-desktop’ with the actual directory name.
cd path/to/dunya-desktop
Finally, install the package requirements.
pip install -r requirements
widgets.combobox.
ComboBox
(parent)[source]¶Combobox of the attributes.
change_background
(color=”)[source]¶Changes the background color of the combobox according to the query results of
change_lineedit_status
()[source]¶Changes the background color of the combobox according to the user
widgets.playerframe.
PlayerFrame
(recid, parent=None)[source]¶add_1d_roi_items
(f_type, item)[source]¶Adds 1d roi item.
Parameters: |
|
---|
widgets.timeserieswidget.
TimeSeriesWidget
(parent=None)[source]¶add_tonic
(values)[source]¶Adds tonic lines on the pitch plot.
Parameters: | values – (list or numpy array) A sequence of tonic values in Hz. |
---|
find_nearest_index
(n_array, value)[source]¶Parameters: |
|
---|---|
Returns: | (int) Index of the nearest item in the given list. |
plot_histogram_raxis
(vals, bins)[source]¶Plots histogram to the right axis.
Parameters: |
|
---|
plot_pitch
(pitch_plot, x_start, x_end, hop_size)[source]¶Plots the given pitch_plot array.
Parameters: |
|
---|
remove_given_items
(obj, items)[source]¶Removes the given items from the given object
Parameters: |
|
---|
set_hist_cursor_pos
(pos)[source]¶Sets the position of histogram in y-axis.
Parameters: | pos – (int or float) Playback position in seconds. |
---|
widgets.waveformwidget.
WaveformWidget
[source]¶add_section
(time, label, title, color)[source]¶Plots the section on waveform widget.
Parameters: |
|
---|
change_wf_region
(x_start, x_end)[source]¶Sets the position of the waveform region item on the waveform widget.
Parameters: |
|
---|
get_waveform_region
¶Returns the current position of the waveform region item in seconds if the waveform region item exists.
Returns: | xmin, xmax (float): Minimum and maximum values of waveform region item |
---|
widgets.widgetutilities.
current_pitch
(sample, pitch_plot)[source]¶Returns the current pitch value in Hz. :param sample: (int) Index of sample.
Returns: | (float) Pitch in Hz. |
---|
widgets.widgetutilities.
cursor_pos_sample
(pos, samplerate, hopsize)[source]¶Returns the current index of sample.
Parameters: | pos – (int or float) Playback position in seconds. |
---|
widgets.widgetutilities.
downsample_plot
(plot_array, ds_limit)[source]¶Downsamples the given pitch array according to the given downsample limit.
Parameters: |
|
---|---|
Returns: | (numpy array) A sequence of pitch values |
The source code hosted in this repository is licenced under the terms of the GNU Affero General Public License (v3 or later). Any data (the audio recordings, music scores, features, figures, outputs etc.) are licenced under Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
Dunya-desktop is supported by the European Research Council under the European Union’s Seventh Framework Program, as part of the CompMusic project (ERC grant agreement 267583).