View Issue Details

IDProjectCategoryView StatusLast Update
0001751OpenMPTFeature Requestpublic2024-06-01 08:08
Reporterhelix751 Assigned ToSaga Musix  
PrioritynormalSeverityminorReproducibilityhave not tried
Status resolvedResolutionfixed 
Target VersionOpenMPT 1.32 / libopenmpt 0.8 (goals)Fixed in VersionOpenMPT 1.32 / libopenmpt 0.8 (goals) 
Summary0001751: Command line option for Playback upon opening file
Description

Command line options don't offer a /play or similar option to open and starting playback (hence using OpenMPT for playback).

This is useful when setting OpenMPT as external viewer for module files in orthodox file managers like Total Commander or Far Manager.

Also, a /windowmode=normal|minimized|maximized option would complement the /play option.

Steps To Reproduce

N/A

Additional Information

None

TagsNo tags attached.
Has the bug occurred in previous versions?Not a bug
Tested code revision (in case you know it)

Activities

Kaens

Kaens

2024-03-01 16:57

reporter   ~0005848

Last edited: 2024-03-01 16:57

For the time being, you could make use of openmpt123 included in https://lib.openmpt.org/libopenmpt/, which seems more suited for the external player's role. Granted, it doesn't support some features, but it's much lighter and is still very powerful.

Saga Musix

Saga Musix

2024-04-07 20:21

administrator   ~0005920

Last edited: 2024-04-07 21:27

As of r20522, there is now a /play command line switch. Test builds can be obtained from https://builds.openmpt.org/builds/

If multiple modules are passed, the last opened module will be played. This also works in conjunction with the /shared switch to reuse an existing OpenMPT instance.

Regarding the /windowmode flag, do you have any example of other software that supports this kind of switch? If Total Commander cannot passes the correct STARTUPINFO flags to OpenMPT, maybe you could detour the execution through the built-in Windows command start, which has /min and /max parameters, e.g. start /min path\to\openmpt.exe /play ...

helix751

helix751

2024-04-22 21:11

reporter   ~0005936

Thanks for the updated build. The /play cmd line option works great.

As for the rest of the request, the issue is that some operations in the program lauching OpenMPT don't have any 'minimize' (or 'maximize') options. Just a command edit box for specifying the player's path (where the /play option is specified, btw).

In Total Commander these operations are different from 'button bar' buttons and much more limited.

So far, the start command couldn't be used as it wasn't accepted as valid input by TC's dialogue (Extensions in external viewer options). (Windows 11 Pro)

Finally, a /nosplash or defaulting /play to no-splash upon starting would be nice when using it as a player/viewer.

Saga Musix

Saga Musix

2024-04-22 21:25

administrator   ~0005937

There is an option to hide the splash screen, but it's called /nologo.

So far, the start command couldn't be used as it wasn't accepted as valid input by TC's dialogue (Extensions in external viewer options). (Windows 11 Pro)

It seems like start is a built-in command these days and no longer an executable, maybe that's why it fails. You could verify that by putting the command-line from the example above into a batch file and try running that batch file from TC instead. It might also be worth suggesting to the TC developer that they should expose an option to the user to modify the wShowWindow value of the STARTUPINFO struct that TC has to pass to the applications that it launches anyway. I see that as a much more economic approach than thousands of apps having to implement something that is already given by the operating system.

helix751

helix751

2024-04-23 13:35

reporter   ~0005938

Thanks for the /nologo option.

I agree with the latter. Will write to TC's developer with your suggestions.

And yes, start is indeed an internal command. There's no external .exe with that name.

Issue History

Date Modified Username Field Change
2024-03-01 12:23 helix751 New Issue
2024-03-01 16:57 Kaens Note Added: 0005848
2024-03-01 16:57 Kaens Note Edited: 0005848
2024-04-07 20:14 Saga Musix Assigned To => Saga Musix
2024-04-07 20:14 Saga Musix Status new => assigned
2024-04-07 20:21 Saga Musix Status assigned => feedback
2024-04-07 20:21 Saga Musix Note Added: 0005920
2024-04-07 20:21 Saga Musix Target Version => OpenMPT 1.32 / libopenmpt 0.8 (goals)
2024-04-07 21:27 Saga Musix Note Edited: 0005920
2024-04-22 21:11 helix751 Note Added: 0005936
2024-04-22 21:11 helix751 Status feedback => assigned
2024-04-22 21:25 Saga Musix Note Added: 0005937
2024-04-23 13:35 helix751 Note Added: 0005938
2024-04-27 22:17 Saga Musix Status assigned => resolved
2024-04-27 22:17 Saga Musix Resolution open => fixed
2024-04-27 22:17 Saga Musix Fixed in Version => OpenMPT 1.32 / libopenmpt 0.8 (goals)