LMMS / lmms

Cross-platform music production software
https://lmms.io
GNU General Public License v2.0
8.09k stars 1.01k forks source link

Future/required version check #1196

Closed Sti2nd closed 9 years ago

Sti2nd commented 10 years ago

With many new instruments and the different versions of LMMS it would be good to see what version of LMMS the projects require. I originally thought about this in relation to the lsp, so the project page could get the information from the project file and show the information so the user easily would understand if he could open the project properly or not. Tres had an idea for how it could be implemented: "if we can put something like since 1.1.0 on the Monstro plugin and likewise save the LMMS version in the preset, the software can warn the user that the preset was created with a newer version of LMMS and may not be compatible."

tresf commented 10 years ago

Just to clarify a bit too from the LSP side, if we had a way programatically via php to read the compressed mmpz files, we could theoretically parse the version info from the file and append it to the database so it could be searched upon, but aside from having a parser capable of doing this, we'd also have to expand the database and the LSP code a bit to allow this type of functionality.

eagles051387 commented 10 years ago

Tres this is just some food for thought couldn't we decompres the file and then parse what ever the underlying files are xml or what ever into the database ?

On Tue, Oct 7, 2014 at 5:16 PM, Tres Finocchiaro notifications@github.com wrote:

Just to clarify a bit too from the LSP side, if we had a way programatically via php to read the compressed mmpz files, we could theoretically parse the version info from the file and append it to the database so it could be searched upon, but we'd have to expand the database and the LSP code a bit to allow this type of functionality.

— Reply to this email directly or view it on GitHub https://github.com/LMMS/lmms/issues/1196#issuecomment-58201040.

Jonathan Aquilina

tresf commented 10 years ago

@eagles051387, yes on the other bug report, @softrabbit made that recommendation. The trick of course is to know what the compression is and how to decompress with php. He kindly offered this information:

http://php.net/manual/en/function.zlib-decode.php and an XML parser and you should be able to read mmpz files. Could be cool to show things like number of tracks, BPM, which plugins were used and so on on the LSP IMO.

AndiEcker commented 10 years ago

AFAIR the compression of the mmpz project files is a Qt specific ZIP format that couldn't be decompressed by stand-alone archive tool I know (at least in the time when I did some investigations on it).

Don't know how to decompress mmpz files with PHP but if you can use Python on your web server, then you possibly could use most of the code of this/my open source project https://github.com/AndiEcker/LmmsPrjMngr.

It is a small commend line tool for to decompress the mmpz file, parse the XML and dump it onto the console. Feel free to use and adapt the code to your needs and on any help/questions/doubts please come back to me.

2014-10-08 13:33 GMT+01:00 Tres Finocchiaro notifications@github.com:

@eagles051387 https://github.com/eagles051387, yes on the other bug report, @softrabbit https://github.com/softrabbit made that recommendation. The trick of course is to know what the compression is and how to decompress with php. He kindly offered this information:

http://php.net/manual/en/function.zlib-decode.php and an XML parser and you should be able to read mmpz files. Could be cool to show things like number of tracks, BPM, which plugins were used and so on on the LSP IMO.

— Reply to this email directly or view it on GitHub https://github.com/LMMS/lmms/issues/1196#issuecomment-58350224.

tresf commented 10 years ago

Thx Andi. I'd like to avoid any Qt dependencies on the web server unless absolutely necessary, although I think an auto-preview of mmpz and xpf files would be a nice justification for these libs down the road.

.... but that could be a much bigger undertaking than a quick XML parse/database field.

Thanks kindly for the lib and the feedback.

eagles051387 commented 10 years ago

the mmpz files isnt that using plane zip compression?

I did a quick google and it seems like an XML parser already exists in php.

http://php.net/manual/en/book.xml.php

On Wed, Oct 8, 2014 at 2:33 PM, Tres Finocchiaro notifications@github.com wrote:

@eagles051387 https://github.com/eagles051387, yes on the other bug report, @softrabbit https://github.com/softrabbit made that recommendation. The trick of course is to know what the compression is and how to decompress with php. He kindly offered this information:

http://php.net/manual/en/function.zlib-decode.php and an XML parser and you should be able to read mmpz files. Could be cool to show things like number of tracks, BPM, which plugins were used and so on on the LSP IMO.

— Reply to this email directly or view it on GitHub https://github.com/LMMS/lmms/issues/1196#issuecomment-58350224.

Jonathan Aquilina

tresf commented 10 years ago

@eagles051387 please read the posts or shut up.

tresf commented 10 years ago

@AndiEcker,

Not sure how well this will work with PHP, but it looks like some people hashed the zlib stuff out already:

http://linux-multimedia-studio-lmms.996328.n3.nabble.com/is-it-possible-to-decompress-an-mmpz-file-without-lmms-dump-td3491.html

:+1:

AndiEcker commented 10 years ago

@Tres: thanks for the link and info!!! - So simply removing the file prefix did the trick ;) With this info I could create you a pure python version of my tool without any Qt dependencies - if useful/needed.

Also big thanks for your great contribution onto LMMS - really loving to see the great progress after you, Vesa and others joined this fantastic project. Looks sooo great meanwhile and can't wait to get verion 1.1.

2014-10-08 14:37 GMT+01:00 Tres Finocchiaro notifications@github.com:

@AndiEcker https://github.com/AndiEcker,

Not sure how well this will work with PHP, but it looks like some people hashed the zlib stuff out already:

http://linux-multimedia-studio-lmms.996328.n3.nabble.com/is-it-possible-to-decompress-an-mmpz-file-without-lmms-dump-td3491.html

[image: :+1:]

— Reply to this email directly or view it on GitHub https://github.com/LMMS/lmms/issues/1196#issuecomment-58358029.

tresf commented 10 years ago

@AndiEcker I'm going to reply to you in https://github.com/LMMS/lmms.io/issues/59 since the usefulness in PHP would actually help reopen that topic up for discussion. :)

lukas-w commented 9 years ago

Closing as this is partly about the LSP and partly a duplicate of #432.

tresf commented 9 years ago

Just in case someone is interested down the road, reading .mmpz files is possible via php via:

$x = fopen($file);
fseek($x, 4);
zlib_decode(fread($x, filesize($file)-4));

https://github.com/LMMS/lmms.io/commit/d9b53d48c82869d1febbf852de4538fe7ea95a67