mallets broken on master build
Bug Summary
i tried using mallets on the latest master, only to find out it's broken.
Steps to reproduce
drop mallets on the song editor or the pattern editor and open instrument settings.
Expected behavior
mallets should play fine
Actual behavior
it gives the error 'stk not installed'. the instrument opens but doesn't give any sound.
Screenshot

https://youtu.be/hLBVz5jSoTM
Affected LMMS versions
1.3 master - builds #6462 and #6374 (pre merge ci build)
Confirmed. I faced a similar issue. To make Mallets work, I copied the data/STK/RawWaves file from my 1.2.0 install to where they're supposed to be in the filepath of my 1.3 install, then forgot about it. I considered reporting it, but I have a slightly unconventional method of installation, and since this is actually a lack-of-files problem, I thought this specific issue might've been avoided if I installed normally. PS: Windows screen recorder doesn't record dialogue boxes. You might want to consider OBS Studio as far as recording errors is concerned.
Moderation: OT discussion deleted
i know this isnt a fix but i would appreciate if a fix for #6464 was included on this pr.
I can't replicate this issue and I'm not really a programmer by any stretch of the imagination but if you hand me the actual commit that caused it I can look into it. Also, please keep this discussion here.
Also, please keep this discussion here.
Oops, mb.
Also, since all the builds i had the error were from the CI, i think this has something to do with the CI not bundling the stk.
This issue is specific to windows. We rely on MINGW_PREFIX when trying to bundle STK rawwave files.
https://github.com/LMMS/lmms/blob/f39b3d50224dcf92ec065a9d05bd39b34396a827/cmake/nsis/CMakeLists.txt#L76-L80
However, the value is not set on the new MinGW toolchain files on master(by @lukas-w). MSVC builds don't work either, because MSVC isn't MinGW.
This issue is specific to windows. We rely on
MINGW_PREFIXwhen trying to bundle STK rawwave files.
To elaborate a bit: https://github.com/LMMS/lmms/issues/3227#issuecomment-1201457137
I wrote an installation logic which should work in most cases(needs testing).
# Install STK rawwaves
if(LMMS_HAVE_STK)
find_path(STK_RAWWAVE_ROOT
NAMES silence.raw sinewave.raw
HINTS "${STK_INCLUDE_DIR}/../.."
PATH_SUFFIXES share/stk/rawwaves share/libstk/rawwaves
)
if(STK_RAWWAVE_ROOT)
file(GLOB RAWWAVES "${STK_RAWWAVE_ROOT}/*.raw")
install(FILES ${RAWWAVES} DESTINATION "${DATA_DIR}/stk/rawwaves")
else()
message(WARNING "Can't find STK rawwave root!")
endif()
endif()
I wrote an installation logic which should work in most cases(needs testing).
# Install STK rawwaves if(LMMS_HAVE_STK) find_path(STK_RAWWAVE_ROOT NAMES silence.raw sinewave.raw HINTS "${STK_INCLUDE_DIR}/../.." PATH_SUFFIXES share/stk/rawwaves share/libstk/rawwaves ) if(STK_RAWWAVE_ROOT) file(GLOB RAWWAVES "${STK_RAWWAVE_ROOT}/*.raw") install(FILES ${RAWWAVES} DESTINATION "${DATA_DIR}/stk/rawwaves") else() message(WARNING "Can't find STK rawwave root!") endif() endif()
This seems more like a FindStk.cmake candidate, no?
This seems more like a
FindStk.cmakecandidate, no?
The find_path part may reside in the file, but the install part shouldn't.
This seems more like a
FindStk.cmakecandidate, no?The
find_pathpart may reside in the file, but theinstallpart shouldn't.
Clearly, but this is a "where is STK" problem, which doesn't really belong in installation logic, but rather dependency location.
HINTS "${STK_INCLUDE_DIR}/../.."
This would be copying from source, no? I would expect to copy from installation. Does vcpkg have a way to calculate this?
e.g.
In the case of STK, it has a formula ready on
vcpkg, so I'd look there first, quoting theportfile.cmakefrom vcpkg:file(GLOB RAWFILES ${SOURCE_PATH}/rawwaves/*.raw) file(COPY ${RAWFILES} DESTINATION ${CURRENT_PACKAGES_DIR}/share/libstk/rawwaves)
I'd expect to use the bottom, not the top, no?
This would be copying from source, no? I would expect to copy from installation.
My intention was to use <STK PREFIX>/include/stk as a hint when finding <STK PREFIX>/share/[lib]stk/rawwaves.
I'd expect to use the bottom, not the top, no?
Do we even have access to the top? What I'm trying to find is the bottom.
I'd expect to use the bottom, not the top, no?
Do we even have access to the top? What I'm trying to find is the bottom.
Sorry, you're right... I'm confusing headers for source. 🤦♂️
Folder [data]/stk/rawaves is missing. Replace it and it works.
Other findings:
- Rename .lmmsrc.xml file.
- Close LMMS and reopen it.
- In the configuration window, you do NOT see options to enter stk path.
In the newly created .xml file, the xml appears.
<paths stkdir="data:/stk/rawwaves/"/>
Folder [data]/stk/rawaves is missing. Replace it and it works.
Other findings:
- Rename .lmmsrc.xml file.
- Close LMMS and reopen it.
- In the configuration window, you do NOT see options to enter stk path.
In the newly created .xml file, the xml appears.
<paths stkdir="data:/stk/rawwaves/"/>
Correct! This is a default folder which should not have to be user-inputted and is a native part of LMMS that should automatically set. This folder shouldn't be missing in the first place.
apt install stk => /usr/share/stk/rawwaves, looks like, it has been borrowed from: thestk/stk project. Mallets are functional with this folder placed at data/stk/rawwaves.