muse for windows

MusE is a MIDI/Audio sequencer with recording and editing capabilities, aiming to be a complete multitrack virtual studio for Linux. http://muse-sequencer.org/

Moderators: khz, MattKingUSA, spamatica

aquilarubra
Established Member
Posts: 48
Joined: Sat Nov 24, 2018 8:12 pm

Re: muse for windows

Postby aquilarubra » Wed Feb 20, 2019 1:44 pm

I see no issue with pkg-config in msys2.

pacman -S mingw-w64-{i686 or x86_64}-pkg-config

It's there and it detects my libraries. I added a Windows folder, and inside the zip file there is the list of my libraries from pkg-config.

I am sorry, but work takes precedence and I am halting everybody.

I also found a strange behavior in cmake. I am trying to avoid my zip and put the last 2 fixes in the CMakeLists.txt files. In one of them, I wrote this:

Code: Select all

if (ALSA_SUPPORT)
       alsamidi.cpp
       alsatimer.cpp
       rtctimer.cpp
else(ALSA_SUPPORT)
       qttimer.cpp
endif(ALSA_SUPPORT)


Strangely, during compilation it always halts at rtctimer, seemingly meaning that it detects ALSA_SUPPORT wrong, despite I have it set to OFF. I need to comment out the rtctimer.cpp to proceed. This is the CMakeLists in the driver folder.

aquilarubra
Established Member
Posts: 48
Joined: Sat Nov 24, 2018 8:12 pm

Re: muse for windows

Postby aquilarubra » Wed Feb 20, 2019 1:46 pm

By the way, I will look at an IDE. I started to see Codeblocks.

aquilarubra
Established Member
Posts: 48
Joined: Sat Nov 24, 2018 8:12 pm

Re: muse for windows

Postby aquilarubra » Wed Feb 20, 2019 3:14 pm

I finished all fixes. I'm having issues to push to git, because of a proxy. I'll try later again.

Tim E. Real
Established Member
Posts: 199
Joined: Sat Sep 15, 2012 12:36 am

Re: muse for windows

Postby Tim E. Real » Wed Feb 20, 2019 4:39 pm

Wow, that's neat. PC just works. Hm, wonder why I had trouble...
Carry on, then.

Thanks.

aquilarubra
Established Member
Posts: 48
Joined: Sat Nov 24, 2018 8:12 pm

Re: muse for windows

Postby aquilarubra » Wed Feb 20, 2019 6:22 pm

My knowledge of git is still too limited. I am using Git extensions, actually. It didn't allow me to fork from your project, as it was already forked from mine. So I just cloned and changed things. When I try to push in your branch, it says obviously permission denied. So, I still don't know how to update git with my changes.

I paste here the diffs, if you can use them in your branch. I removed the zip in the windows folder.

Code: Select all

diff --git a/muse3/CMakeLists.txt b/muse3/CMakeLists.txt
index 996b48cb..c69eaf1d 100644
--- a/muse3/CMakeLists.txt
+++ b/muse3/CMakeLists.txt
@@ -151,6 +151,7 @@ endif (GIT_FOUND)
 
 
 option ( ENABLE_RTAUDIO     "Multi platform rtaudio audio compatibility fallback" ON)
+option ( ENABLE_ALSA         "Enable Advanced Linux Sound Architecture (ALSA)" ON)
 option ( ENABLE_LASH         "Enable LASH Audio Session Handler (or LADISH compatibility layer)"     ON)
 option ( ENABLE_LRDF         "Enable LADSPA RDF (lrdf) Provides extra info for LADSPA plugins"  ON)
 option ( ENABLE_OSC          "Enable Lightweight Open Sound Control (liblo) (DSSI also recommended)"  ON)
@@ -167,13 +168,7 @@ option ( ENABLE_INSTPATCH    "Enable Instrument Patch Library support (enhances
 option ( ENABLE_EXPERIMENTAL "Enable various experimental features (not recommended)."              OFF)
 option ( ENABLE_PYTHON       "Enable experimental python control support (not recommended)."         OFF)
 option ( UPDATE_TRANSLATIONS "Update source translation share/locale/*.ts files (WARNING: This will modify the .ts files in the source tree!!)" OFF)
-if (WIN32)
-option ( ENABLE_ALSA         "Enable Advanced Linux Sound Architecture (ALSA)" OFF)
-option ( MODULES_BUILD_STATIC "Build type of internal modules"                                   ON)
-else(WIN32)
-option ( ENABLE_ALSA         "Enable Advanced Linux Sound Architecture (ALSA)" ON)
 option ( MODULES_BUILD_STATIC "Build type of internal modules"                                   OFF)
-endif(WIN32)
 
 if ( MODULES_BUILD_STATIC )
       SET(MODULES_BUILD STATIC )

diff --git a/muse3/muse/app.cpp b/muse3/muse/app.cpp
index 8062cd4e..8637859d 100644
--- a/muse3/muse/app.cpp
+++ b/muse3/muse/app.cpp
@@ -111,9 +111,7 @@ namespace MusECore {
 extern void exitJackAudio();
 extern void exitDummyAudio();
 extern void exitOSC();
-#ifdef ALSA_SUPPORT
 extern void exitMidiAlsa();
-#endif
 
 #ifdef HAVE_RTAUDIO
 extern void exitRtAudio();
@@ -1658,11 +1656,9 @@ void MusE::closeEvent(QCloseEvent* event)
       MusEGlobal::song->cleanupForQuit();
 
       // Give midi devices a chance to close first, above in cleanupForQuit.
-#ifdef ALSA_SUPPORT
       if(MusEGlobal::debugMsg)
         fprintf(stderr, "Muse: Exiting ALSA midi\n");
       MusECore::exitMidiAlsa();
-#endif
 
       if(MusEGlobal::debugMsg)
         fprintf(stderr, "Muse: Cleaning up temporary wavefiles + peakfiles\n");

diff --git a/muse3/muse/confmport.cpp b/muse3/muse/confmport.cpp
index 24530d9e..03f27ffc 100644
--- a/muse3/muse/confmport.cpp
+++ b/muse3/muse/confmport.cpp
@@ -55,9 +55,7 @@
 #include "synth.h"
 #include "audio.h"
 #include "midiseq.h"
-#ifdef ALSA_SUPPORT
 #include "driver/alsamidi.h"
-#endif
 #include "driver/jackmidi.h"
 #include "audiodev.h"
 #include "menutitleitem.h"
@@ -1851,7 +1849,6 @@ void MPConfig::addJackDeviceClicked()
 
 void MPConfig::addAlsaDeviceClicked(bool v)
 {
-#ifdef ALSA_SUPPORT
   MusEGlobal::audio->msgIdle(true); // Make it safe to edit structures
 
   MusEGlobal::config.enableAlsaMidiDriver = v;
@@ -1903,7 +1900,6 @@ void MPConfig::addAlsaDeviceClicked(bool v)
     // Inform the rest of the app's gui.
     MusEGlobal::song->update(SC_CONFIG);
   }
-#endif
 }
 
 //---------------------------------------------------------

diff --git a/muse3/muse/driver/CMakeLists.txt b/muse3/muse/driver/CMakeLists.txt
index c3577606..d8557853 100644
--- a/muse3/muse/driver/CMakeLists.txt
+++ b/muse3/muse/driver/CMakeLists.txt
@@ -21,28 +21,17 @@
 #  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 #=============================================================================
 
-#if (!ALSA_SUPPORT)
-QT5_WRAP_CPP (driver_mocs
-      qttimer.h
-)
-#endif(ALSA_SUPPORT)
-
 ##
 ## List of source files to compile
 ##
 file (GLOB driver_source_files
        audiodev.cpp
-if (ALSA_SUPPORT)
        alsamidi.cpp
        alsatimer.cpp
-       rtctimer.cpp
-else(ALSA_SUPPORT)
-       qttimer.cpp
-endif(ALSA_SUPPORT)
        dummyaudio.cpp
        jack.cpp
        jackmidi.cpp
-       simpletimer.cpp
+       rtctimer.cpp
        )
 if (HAVE_RTAUDIO)
        file (GLOB driver_source_files
@@ -58,9 +47,6 @@ endif (HAVE_RTAUDIO)
 add_library ( driver ${MODULES_BUILD}
        # ${PROJECT_BINARY_DIR}/all.h.pch
        ${driver_source_files}
-#if (!ALSA_SUPPORT)
-       ${driver_mocs}
-#endif
        )
 
 ##

diff --git a/muse3/muse/midiseq.cpp b/muse3/muse/midiseq.cpp
index 48a7c597..af037961 100644
--- a/muse3/muse/midiseq.cpp
+++ b/muse3/muse/midiseq.cpp
@@ -39,12 +39,11 @@
 #include "config.h"
 #include "app.h"
 #include "globals.h"
-#ifdef ALSA_SUPPORT
+#ifdef _WIN32
+#include "driver/qttimer.h"
+#else
 #include "driver/alsatimer.h"
 #include "driver/rtctimer.h"
-#include "driver/alsamidi.h"
-#else
-#include "driver/qttimer.h"
 #endif
 #include "midi.h"
 #include "midiseq.h"
@@ -52,6 +51,7 @@
 #include "mididev.h"
 #include "audio.h"
 #include "audiodev.h"
+#include "driver/alsamidi.h"
 #include "sync.h"
 #include "song.h"
 #include "gconfig.h"
@@ -288,13 +288,11 @@ void MidiSeq::threadStart(void*)
 //   alsaMidiRead
 //---------------------------------------------------------
 
-#ifdef ALSA_SUPPORT
 static void alsaMidiRead(void*, void*)
       {
       // calls itself midiDevice->recordEvent(MidiRecordEvent):
       alsaProcessMidiInput();
       }
-#endif
 
 //---------------------------------------------------------
 //   midiRead
@@ -316,7 +314,6 @@ static void midiWrite(void*, void* d)
       dev->flush();
       }
 
-#ifdef ALSA_SUPPORT
 void MidiSeq::addAlsaPollFd()
 {
   // special handling for alsa midi:
@@ -330,7 +327,6 @@ void MidiSeq::removeAlsaPollFd()
 {
   removePollFd(alsaSelectRfd(), POLLIN);
 }
-#endif
 
 //---------------------------------------------------------
 //   updatePollFd
@@ -371,9 +367,7 @@ void MidiSeq::updatePollFd()
       // (one fd for all devices)
       //    this allows for processing of some alsa events
       //    even if no alsa driver is active (assigned to a port)
-#ifdef ALSA_SUPPORT
       addAlsaPollFd();
-#endif
       }
 
 //---------------------------------------------------------

diff --git a/muse3/muse/muse_math.h b/muse3/muse/muse_math.h
index de858ebc..8041a498 100644
--- a/muse3/muse/muse_math.h
+++ b/muse3/muse/muse_math.h
@@ -27,7 +27,7 @@
 #include <cmath>
 #include "config.h"
 
-#ifndef M_PI
+#ifndef HAVE_M_PI
 #define M_PI 3.14159265358979323846
 #endif
 
diff --git a/muse3/muse/node.cpp b/muse3/muse/node.cpp
index 1d2e3c63..61529acb 100644
--- a/muse3/muse/node.cpp
+++ b/muse3/muse/node.cpp
@@ -1939,21 +1939,14 @@ bool Fifo::getWriteBuffer(int segs, unsigned long samples, float** buf, unsigned
               free(b->buffer);
               b->buffer = 0;
             }
-#ifdef _WIN32
-            b->buffer = (float *) _aligned_malloc(16, sizeof(float *) * n);
-            if(b->buffer == NULL)
-            {
-               fprintf(stderr, "Fifo::getWriteBuffer could not allocate buffer segs:%d samples:%lu pos:%u\n", segs, samples, pos);
-               return true;
-            }
-#else
+
             int rv = posix_memalign((void**)&(b->buffer), 16, sizeof(float) * n);
             if(rv != 0 || !b->buffer)
             {
               fprintf(stderr, "Fifo::getWriteBuffer could not allocate buffer segs:%d samples:%lu pos:%u\n", segs, samples, pos);
               return true;
             }
-#endif
+
             b->maxSize = n;
             }
       if(!b->buffer)

diff --git a/muse3/muse/song.cpp b/muse3/muse/song.cpp
index c3b48f62..745f8585 100644
--- a/muse3/muse/song.cpp
+++ b/muse3/muse/song.cpp
@@ -41,9 +41,7 @@
 
 #include "app.h"
 #include "driver/jackmidi.h"
-#ifdef ALSA_SUPPORT
 #include "driver/alsamidi.h"
-#endif
 #include "song.h"
 #include "track.h"
 #include "undo.h"
@@ -2293,11 +2291,9 @@ void Song::seqSignal(int fd)
                         do_set_sync_timeout = true;
                         abortRolling();
                         break;
-#ifdef ALSA_SUPPORT
                   case 'P':   // alsa ports changed
                         alsaScanMidiPorts();
                         break;
-#endif
                   case 'G':   // Seek
                         // Hm, careful here, will multiple seeks cause this
                         //  to interfere with Jack's transport timeout countdown?

diff --git a/muse3/windows/muse_diffs.zip b/muse3/windows/muse_diffs.zip
new file mode 100644
index 00000000..046484b8
Binary files /dev/null and b/muse3/windows/muse_diffs.zip differ

diff --git a/muse3/windows/pkglist.txt b/muse3/windows/pkglist.txt
deleted file mode 100644
index 9366c07d..00000000
--- a/muse3/windows/pkglist.txt
+++ /dev/null
@@ -1,244 +0,0 @@
-adwaita-icon-theme.pc
-assimp.pc
-atk.pc
-atkmm-1.6.pc
-aubio.pc
-bzip2.pc
-cairo.pc
-cairo-fc.pc
-cairo-ft.pc
-cairo-gobject.pc
-cairomm-1.0.pc
-cairomm-ft-1.0.pc
-cairomm-pdf-1.0.pc
-cairomm-png-1.0.pc
-cairomm-ps-1.0.pc
-cairomm-svg-1.0.pc
-cairomm-win32-1.0.pc
-cairomm-win32-font-1.0.pc
-cairo-pdf.pc
-cairo-png.pc
-cairo-ps.pc
-cairo-script.pc
-cairo-svg.pc
-cairo-tee.pc
-cairo-win32.pc
-cairo-win32-font.pc
-cppunit.pc
-datrie-0.2.pc
-dbus-1.pc
-epoxy.pc
-expat.pc
-fftw3.pc
-fftw3f.pc
-fftw3l.pc
-fftw3q.pc
-flac.pc
-flac++.pc
-fontconfig.pc
-freeglut.pc
-freetype2.pc
-fribidi.pc
-gail.pc
-gdk-2.0.pc
-gdkmm-2.4.pc
-gdk-pixbuf-2.0.pc
-gdk-win32-2.0.pc
-gio-2.0.pc
-giomm-2.4.pc
-gio-windows-2.0.pc
-glib-2.0.pc
-glibmm-2.4.pc
-gmodule-2.0.pc
-gmodule-export-2.0.pc
-gmodule-no-export-2.0.pc
-gnurx.pc
-gobject-2.0.pc
-gobject-introspection-1.0.pc
-gobject-introspection-no-export-1.0.pc
-gpg-error.pc
-graphite2.pc
-gthread-2.0.pc
-gtk+-2.0.pc
-gtk+-win32-2.0.pc
-gtkmm-2.4.pc
-harfbuzz.pc
-harfbuzz-gobject.pc
-harfbuzz-icu.pc
-harfbuzz-subset.pc
-hogweed.pc
-iconv.pc
-icu-i18n.pc
-icu-io.pc
-icu-uc.pc
-isl.pc
-jack.pc
-jansson.pc
-jasper.pc
-jemalloc.pc
-jsoncpp.pc
-lcms2.pc
-libarchive.pc
-libbrotlicommon.pc
-libbrotlidec.pc
-libbrotlienc.pc
-libcares.pc
-libcares-static.pc
-libcroco-0.6.pc
-libcrypto.pc
-libcurl.pc
-libexif.pc
-libexslt.pc
-libffi.pc
-libgdiplus.pc
-libidn2.pc
-libjpeg.pc
-liblo.pc
-liblz4.pc
-liblzma.pc
-libmetalink.pc
-libmng.pc
-libnghttp2.pc
-libpcre.pc
-libpcre16.pc
-libpcre2-16.pc
-libpcre2-32.pc
-libpcre2-8.pc
-libpcre2-posix.pc
-libpcre32.pc
-libpcrecpp.pc
-libpcreposix.pc
-libpng.pc
-libpng16.pc
-libpsl.pc
-librsvg-2.0.pc
-libssh2.pc
-libssl.pc
-libtasn1.pc
-libthai.pc
-libtiff-4.pc
-libturbojpeg.pc
-libusb-1.0.pc
-libuv.pc
-libwebp.pc
-libwebpdecoder.pc
-libwebpdemux.pc
-libwebpmux.pc
-libxml-2.0.pc
-libxslt.pc
-lilv-0.pc
-ltc.pc
-lv2.pc
-lv2core.pc
-lzo2.pc
-minizip.pc
-mpfr.pc
-nettle.pc
-ogg.pc
-openal.pc
-openssl.pc
-p11-kit-1.pc
-pango.pc
-pangocairo.pc
-pangoft2.pc
-pangomm-1.4.pc
-pangowin32.pc
-pixman-1.pc
-pkglist.txt
-portaudio-2.0.pc
-python-3.7.pc
-python-3.7m.pc
-python3.pc
-Qt53DAnimation.pc
-Qt53DCore.pc
-Qt53DExtras.pc
-Qt53DInput.pc
-Qt53DLogic.pc
-Qt53DQuick.pc
-Qt53DQuickAnimation.pc
-Qt53DQuickExtras.pc
-Qt53DQuickInput.pc
-Qt53DQuickRender.pc
-Qt53DQuickScene2D.pc
-Qt53DRender.pc
-Qt5AxBase.pc
-Qt5AxContainer.pc
-Qt5AxServer.pc
-Qt5Bluetooth.pc
-Qt5Charts.pc
-Qt5Concurrent.pc
-Qt5Core.pc
-Qt5DataVisualization.pc
-Qt5DBus.pc
-Qt5Designer.pc
-Qt5Gamepad.pc
-Qt5Gui.pc
-Qt5Help.pc
-Qt5Location.pc
-Qt5Multimedia.pc
-Qt5MultimediaWidgets.pc
-Qt5Network.pc
-Qt5NetworkAuth.pc
-Qt5Nfc.pc
-Qt5OpenGL.pc
-Qt5OpenGLExtensions.pc
-Qt5Positioning.pc
-Qt5PositioningQuick.pc
-Qt5PrintSupport.pc
-Qt5Purchasing.pc
-Qt5Qml.pc
-Qt5Quick.pc
-Qt5QuickControls2.pc
-Qt5QuickTest.pc
-Qt5QuickWidgets.pc
-Qt5RemoteObjects.pc
-Qt5Script.pc
-Qt5ScriptTools.pc
-Qt5Scxml.pc
-Qt5Sensors.pc
-Qt5SerialBus.pc
-Qt5SerialPort.pc
-Qt5Sql.pc
-Qt5Svg.pc
-Qt5Test.pc
-Qt5TextToSpeech.pc
-Qt5UiTools.pc
-Qt5VirtualKeyboard.pc
-Qt5WebChannel.pc
-Qt5WebSockets.pc
-Qt5WebView.pc
-Qt5Widgets.pc
-Qt5WinExtras.pc
-Qt5Xml.pc
-Qt5XmlPatterns.pc
-regex.pc
-rubberband.pc
-samplerate.pc
-SDL_rwops_zzip.pc
-serd-0.pc
-sigc++-2.0.pc
-sndfile.pc
-sord-0.pc
-soundtouch.pc
-speex.pc
-speexdsp.pc
-sqlite3.pc
-sratom-0.pc
-suil-0.pc
-taglib.pc
-taglib_c.pc
-tre.pc
-vamp.pc
-vamp-hostsdk.pc
-vamp-sdk.pc
-vorbis.pc
-vorbisenc.pc
-vorbisfile.pc
-vulkan.pc
-xpm.pc
-zlib.pc
-zzipfseeko.pc
-zziplib.pc
-zzipmmapped.pc
-zzipwrap.pc
-zzip-zlib-config.pc

aquilarubra
Established Member
Posts: 48
Joined: Sat Nov 24, 2018 8:12 pm

Re: muse for windows

Postby aquilarubra » Thu Feb 21, 2019 8:01 am

Tim, let me know if you cannot use the diff. Then, I'll try to fork again, do all the changes again, and try to push a request to your branch.

Tim E. Real
Established Member
Posts: 199
Joined: Sat Sep 15, 2012 12:36 am

Re: muse for windows

Postby Tim E. Real » Thu Feb 21, 2019 4:39 pm

Hi, the patch would not apply cleanly.
The patch contains changes that were already applied to master.
Try to update your branch from our latest master, resorting even to diff files if necessary.
Then submit the difference between yours and ours.

I think the difference was mainly only removal of the zip file thing?
I wasn't sure so I didn't want to hand-edit or shoe-horn anything in.

Tim.

Tim E. Real
Established Member
Posts: 199
Joined: Sat Sep 15, 2012 12:36 am

Re: muse for windows

Postby Tim E. Real » Wed Mar 06, 2019 4:08 am

Hi, howya makin' out?
Shall I try to shoe-horn the patch in? Sorry I got sidetracked for a while but I can try again.
Or if you've moved beyond it, I'll leave it alone?

I did make a few recent changes in the top CMake file.
I discovered we were not linking thread support system libraries into our core.
So I followed some advice (link is in ChangeLog) about the best chance of portability regarding threads support in the cmake file,
which means I added the modern "find_package(Threads)" thing and linked with Threads::Threads in the cmake file.
Hope it works on Win, or at least better, or at least doesn't break things.

Thanks.

aquilarubra
Established Member
Posts: 48
Joined: Sat Nov 24, 2018 8:12 pm

Re: muse for windows

Postby aquilarubra » Wed Mar 06, 2019 8:52 am

I got also sidetracked by family issue. Will complete the Windows port, with some patience.

spamatica
Established Member
Posts: 193
Joined: Mon Feb 08, 2010 10:38 am

Re: muse for windows

Postby spamatica » Sun Mar 10, 2019 10:07 pm

aquilarubra wrote:I got also sidetracked by family issue. Will complete the Windows port, with some patience.

No worries, these things need to take time.
Apologies if this has been written somewhere already but I didn't notice. I'd like to try and build under windows, what packages need to be installed so far?

aquilarubra
Established Member
Posts: 48
Joined: Sat Nov 24, 2018 8:12 pm

Re: muse for windows

Postby aquilarubra » Mon Mar 11, 2019 7:42 am

On top of that, I have to move an entire server from Debian to Arch... so my free time will be dead for a while.

So, I can assist you with duplicating my setup. The issue is that I first compiled Ardour, which has tens of extra libraries, most of which are custom built (I wrote PKGBUILD files for a good deal of them). Then, I started with MusE. So, I don't know at this point which libraries it is using.
I have put a Windows folder in my MusE clone, and there is a file with all the libraries I have installed.

Now, to start from a clean environment, some test is needed. I would suggest you start with MSYS2, then add all the relevant mingw build packages. To build MusE, you need to launch the mingw64 prompt (not msys2 prompt). You need to install any mingw related package directly within the mingw64 prompt.

You can even start to compile and see what's wrong. There is still something missing that was in my branch, so you will get a few errors. But you should be able to see the missing libraries. Then, if they are included in mingw, you can just install them with pacman. If not, I have them. I can send you the whole packages (better by email), or I can post PKGBUILD files here.

Tim E. Real
Established Member
Posts: 199
Joined: Sat Sep 15, 2012 12:36 am

Re: muse for windows

Postby Tim E. Real » Mon Mar 11, 2019 3:51 pm

I have put a Windows folder in my MusE clone, and there is a file with all the libraries I have installed.


Quick note: Robert that Windows directory is still in our master tree. HTH.


Return to “MusE Sequencer”

Who is online

Users browsing this forum: No registered users and 1 guest