Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mallets broken on master build #6464

Closed
Rossmaxx opened this issue Jul 17, 2022 · 18 comments · Fixed by #6705
Closed

mallets broken on master build #6464

Rossmaxx opened this issue Jul 17, 2022 · 18 comments · Fixed by #6705
Assignees
Labels
Milestone

Comments

@Rossmaxx
Copy link
Contributor

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

image

https://youtu.be/hLBVz5jSoTM

Affected LMMS versions

1.3 master - builds #6462 and #6374 (pre merge ci build)

@Rossmaxx Rossmaxx added the bug label Jul 17, 2022
@Monospace-V
Copy link
Contributor

Monospace-V commented Jul 17, 2022

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.

@LMMS LMMS deleted a comment from musikBear Jul 20, 2022
@LMMS LMMS deleted a comment from musikBear Jul 20, 2022
@LMMS LMMS deleted a comment from musikBear Jul 20, 2022
@zonkmachine
Copy link
Member

Moderation: OT discussion deleted

@zonkmachine
Copy link
Member

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.

@Rossmaxx
Copy link
Contributor Author

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.

@PhysSong
Copy link
Member

This issue is specific to windows. We rely on MINGW_PREFIX when trying to bundle STK rawwave files.

IF(LMMS_HAVE_STK)
FILE(GLOB RAWWAVES "${MINGW_PREFIX}/share/stk/rawwaves/*.raw")
LIST(SORT RAWWAVES)
INSTALL(FILES ${RAWWAVES} DESTINATION "${DATA_DIR}/stk/rawwaves")
ENDIF()

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.

@tresf
Copy link
Member

tresf commented Aug 1, 2022

This issue is specific to windows. We rely on MINGW_PREFIX when trying to bundle STK rawwave files.

To elaborate a bit: #3227 (comment)

@PhysSong
Copy link
Member

PhysSong commented Aug 2, 2022

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()

@tresf
Copy link
Member

tresf commented Aug 2, 2022

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?

@PhysSong
Copy link
Member

PhysSong commented Aug 2, 2022

This seems more like a FindStk.cmake candidate, no?

The find_path part may reside in the file, but the install part shouldn't.

@tresf
Copy link
Member

tresf commented Aug 2, 2022

This seems more like a FindStk.cmake candidate, no?

The find_path part may reside in the file, but the install part shouldn't.

Clearly, but this is a "where is STK" problem, which doesn't really belong in installation logic, but rather dependency location.

@tresf

This comment was marked as outdated.

@tresf
Copy link
Member

tresf commented Aug 2, 2022

e.g.

In the case of STK, it has a formula ready on vcpkg, so I'd look there first, quoting the portfile.cmake from 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?

@PhysSong
Copy link
Member

PhysSong commented Aug 2, 2022

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.

@PhysSong
Copy link
Member

PhysSong commented Aug 2, 2022

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.

@tresf
Copy link
Member

tresf commented Aug 2, 2022

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. 🤦‍♂️

@PhysSong PhysSong self-assigned this Jan 7, 2023
@PhysSong PhysSong added this to the 1.3 milestone Jan 7, 2023
@anytizer
Copy link
Contributor

Reference

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/"/>

@Monospace-V
Copy link
Contributor

Reference

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.

@anytizer
Copy link
Contributor

anytizer commented Feb 9, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants