Re: [Qutecsound-devel] how to include files in example
Brought to you by:
mantaraya36
From: joachim h. <jh...@jo...> - 2021-08-17 20:35:07
|
yes definitely! i will try your changes and clean some examples tomorrow; if all is ok please merge then. cheers - j On 16/08/2021 23:02, Tarmo Johannes wrote: > Hi! > > Thanks for noticing this! There was a hardcoded limit to filling the > menus, I increased that to 256, so even big folders should build up nicely. > Pushed to git. > > Does it seem OK to merge it to the develop branch (after some tiding > up) soon? > > Best! > tarmo > > Kontakt joachim heintz (<jh...@jo... > <mailto:jh...@jo...>>) kirjutas kuupäeval R, 13. august 2021 > kell 22:54: > > wonderful! > > i checked several examples, and all worked fine =) > > i found one issue in the FLOSS examples, 05 Sound Modification: > i see only examples up to 05H02 in the dropdown menu. > the other examples (05H03 and following) are in the source folder but > not in my built. > > can you check if it is the same for you? > > (please pull first; idid some small changes to some examples.) > > cheers - > joachim > > > > > On 12/08/2021 22:37, Tarmo Johannes wrote: > > Hi! > > > > I finished now a new system for managing examples, it is done at the > > moment in separate path "examples": > > https://github.com/CsoundQt/CsoundQt/tree/examples > <https://github.com/CsoundQt/CsoundQt/tree/examples> > > <https://github.com/CsoundQt/CsoundQt/tree/examples > <https://github.com/CsoundQt/CsoundQt/tree/examples>> > > > > 1) I moved the examples from source root directory to > > src/Examples/CsoundQt (maybe there is a better name for it, > Joachim?). > > src/Examples will be the place where we can put all the examples > from now on > > 2) the Examples menu is filled automatically according the > subfolders in > > the Examples path. It means we can easily add new categories, > regroup > > the examples etc - managing the examples does not require > touching the > > CsoundQt source code any more > > 3) I moved source materials from FLOSS ans McCurdy one level up, to > > src/Examples/SourceMateriald and got rid of the duplicates this > way. I > > changed the current references to ../../SourceMaterials in > csd-s. New > > source materials can be put there, too, if needed for new examples. > > 4) The examples folder should be found automatically in most > cases, but > > for special occasions, I added an option under > > Configuration->Environment to set the path of examples folder, if > user > > needs to. > > > > I still think it is good to move the examples out to another repo > > (CsoundQt/Examples perhaps?) and use it as a git submodule - so > it can > > be pulled easily together with CsoundQt source but it is possible to > > pull also just source, without examples (this is probably good > for linux > > packagers), too. The benefit is that managing examples gets > independent, > > you can always download newest version from git as zip, also it gets > > more easy and clearer to handle, so we can hope to get more > people to > > contribute and take care of the example base. I don't know how > to do > > the submodule thing, to be honest, but I will figure out, if you > agree > > it makes sense. > > > > Joachim, if you have a chance to test if the examples work, would > be great! > > > > tarmo > > > > > > Kontakt joachim heintz (<jh...@jo... > <mailto:jh...@jo...> > > <mailto:jh...@jo... <mailto:jh...@jo...>>>) > kirjutas kuupäeval E, 2. august 2021 kell > > 23:11: > > > > hi - > > > > sounds great what you say about your work on this! thanks a > lot for > > doing it so fast. > > > > i am not sure i understand your discussion well, about the > own repo for > > the examples. but i'd definitely prefer to have the examples > > *included* > > in CsoundQt, as it was. i think the examples are one of the > pros for > > CsoundQt, and we should not require to be always online or > something (i > > just was in the middle of germany and had no internet access, > not even > > mobile ...). > > > > cheers - > > joachim > > > > > > > > On 02/08/2021 17:01, Tarmo Johannes wrote: > > > Hi! > > > > > > 1) Started work on moving all examples to src/Examples. I > do it in a > > > separate branch (examples) just for any case. I have not > pushed > > it yet > > > though. > > > > > > I moved the main examples to Examples/CsoundQt and > expanded a bit > > the > > > folders where the examples can be found.. The only example/csd > > that has > > > to be delivered within the resources with the binary is > Eduardo's > > > AudioMidiTest.csd as I find it absolutely necessary to > have it > > by the > > > program in all times. > > > > > > The menu gets populated automatically quite fine, it > needs some > > more > > > work (Getting Started submenus and Stria Synth), I moved all > > resources > > > files to Examples/SourceMaterials Next step is to change > McCurdy and > > > Floss examples so that they would use the one path and > would not > > > duplicate the files. > > > > > > Now I have to finish but hopefully I will put it out for > testing > > soon. > > > > > > > > > 2) Moving the examples to separate git repo is very good > idea, I > > think. > > > Eduardo, did you have in mind that it is the CsoundQt program > > that does > > > the git pull or it the user/packager who pulls it via git > submodules > > > before building? The first case won't probably work since > most of > > users > > > don't have git installed. > > > > > > > > > Greetings, > > > tarmo > > > > > > Kontakt Eduardo Moguillansky > (<edu...@gm... <mailto:edu...@gm...> > > <mailto:edu...@gm... > <mailto:edu...@gm...>> > > > <mailto:edu...@gm... > <mailto:edu...@gm...> > > <mailto:edu...@gm... > <mailto:edu...@gm...>>>>) kirjutas kuupäeval R, 30. > > > juuli 2021 kell 14:42: > > > > > > Another idea: > > > > > > Maybe the examples could be moved to their own repo. > In linux > > (or in > > > the other platforms as well) this repo could be > cloned/pulled by > > > csoundqt. Then the examples and their resources would > be in > > > predictable places and the resources can be accessed by > > relative paths. > > > > > > eduardo > > > > > > On 30.07.21 13:35, Tarmo Johannes wrote: > > >> Yes, > > >> > > >> I agree it makes sense to rework it. On MacOs and Windows > > with the > > >> installers it is no problem, on Linux we must make > sure that the > > >> examples can be found, perhaps there should be an > option in the > > >> configuration. > > >> > > >> Greetings, > > >> Tarmo > > >> > > >> R, 30. juuli 2021 13:43 joachim heintz > <jh...@jo... <mailto:jh...@jo...> > > <mailto:jh...@jo... <mailto:jh...@jo...>> > > >> <mailto:jh...@jo... > <mailto:jh...@jo...> <mailto:jh...@jo... > <mailto:jh...@jo...>>>> > > kirjutas: > > >> > > >> thanks for the reply, tarmo! > > >> > > >> the inclusion of sound files into some of the csd > > examples is > > >> not only > > >> an issue for ImitativeAdditive.csd. there are a > couple > > of other > > >> examples which i would like to change, too. so > moving the > > >> examples to > > >> another category is no solution. > > >> > > >> after your explanation i have two ideas: > > >> > > >> 1. would it be possible (and not too hard) to > treat the > > current > > >> /examples in the same way as src/Examples? this > means that > > >> they are not > > >> compiled, but just copied. i think this is > actually also > > >> better because > > >> then the users can access the csd files. and we > could > > add the > > >> sound > > >> files in a similar way i did it with the floss manual > > examples. > > >> i think this would be the best solution. > > >> > > >> 2. if not possible, the method you described > should be > > allright: > > >> "Thus the fox.wav added this way should be copied (by > > Qt) to a > > >> temporary > > >> location first and the path should be given to > Csound via > > >> --env:SSDIR+= > > >> or setting environment variable." > > >> > > >> let me know what you think; cheers - > > >> > > >> joachim > > >> > > >> > > >> On 30/07/2021 11:34, Tarmo Johannes wrote: > > >> > Hi! > > >> > > > >> > Sorry, I did see your email but waited for a good > > moment to > > >> try it out. > > >> > I did not yet but for now I can explain the > background: > > >> > > > >> > there are two places for examples - <CsoundQt > source > > >> folder>/examples > > >> > and and <source>/src/Examples > > >> > > > >> > The first gets compiled as binary code to > CsoundQt as Qt > > >> resource, the > > >> > second, the "extended examples" (Floss, McCurdy, > > Stria) gets > > >> installed > > >> > to the system as normal folders. > > >> > > > >> > The problem is that Qt can read from the > compiled-in > > >> resource but Csound > > >> > not. Thus the fox.wav added this way should be > copied (by > > >> Qt) to a > > >> > temporary location first and the path should be > given to > > >> Csound via > > >> > --env:SSDIR+= or setting environment variable. > Quite some > > >> hassle. > > >> > > > >> > One solution is to add the material to the end > of csd with > > >> the <CsFileB > > >> > filename="fox.wav"></CsFileB> (I forgot which tool > > helps to > > >> do it) (like > > >> > in case of Synths/Scanned_Synthes_Sandbox.csd) > > >> > but anyway - I think at some point Andés and René > > discussed > > >> it and > > >> > decided that no large source materials are added to > > >> src/examples - it > > >> > makes just the CsoundQt binary grow. > > >> > > > >> > Much simpler way would be to put > > ImitiativeAdditive.csd into > > >> the real > > >> > folder under "src/Examples" where fox.wav is is in > > >> > src/Examples/FLOSS Manual Examples/SourceMaterials/ > > and set > > >> the SSDIR > > >> > relative to the csd. Perhaps it makes sense to > do another > > >> folder like: > > >> > > > >> > src/Examples/Other (please think about a good name) > > and then > > >> > --env:SSDIR+=../FLOSS Manual > Examples/SourceMaterials > > >> > should work. > > >> > > > >> > I am not sure at the moment if the Examples > menu gets > > populated > > >> > automatically or we need to create another > entry. in > > the code. > > >> > > > >> > Please let me know what you think and if I can help > > somehow? > > >> > > > >> > tarmo > > >> > > > >> > Kontakt joachim heintz (<jh...@jo... > <mailto:jh...@jo...> > > <mailto:jh...@jo... <mailto:jh...@jo...>> > > >> <mailto:jh...@jo... > <mailto:jh...@jo...> <mailto:jh...@jo... > <mailto:jh...@jo...>>> > > >> > <mailto:jh...@jo... > <mailto:jh...@jo...> > > <mailto:jh...@jo... <mailto:jh...@jo...>> > <mailto:jh...@jo... <mailto:jh...@jo...> > > <mailto:jh...@jo... <mailto:jh...@jo...>>>>>) > > >> kirjutas kuupäeval R, 30. juuli 2021 kell > > >> > 10:31: > > >> > > > >> > hi tarmo, hi eduardo - > > >> > > > >> > i wrote an email to the csoundqt dev list. > think this > > >> would be > > >> > great to > > >> > include in csoundqt 1.0.0. can you help? the > > text below. > > >> > > > >> > i want to include "fox.wav" in > > >> Examples/Synths/ImitiativeAdditive.csd. > > >> > > > >> > what is the best way to achieve this? > > >> > > > >> > in the McCurdy and FLOSS examples, i once > inserted the > > >> option: > > >> > --env:SSDIR+=../SourceMaterials > > >> > > > >> > i tried the same here (locally, no push to > git): > > >> > 1. i created a folder "SourceMaterials" in the > > examples/ > > >> directory, > > >> > with > > >> > fox.wav in it. > > >> > 2. i inserted this around line 4600 in > > src/qutecsound.cpp: > > >> > QStringList sourceMaterials; > > >> > sourceMaterials << > > >> ":/examples/SourceMaterials/fox.wav"; > > >> > subMenus << sourceMaterials; > > >> > subMenuNames << tr("SourceMaterials"); > > >> > 3. and in application.qrc: > > >> > <file>../examples/SourceMaterials/fox.wav</file> > > >> > > > >> > after recompiling, the folder "SourceMaterials" > > shows up > > >> in the menu, > > >> > but the fox.wav is not found by csound. > > >> > > > >> > perhaps i forgot one step? > > >> > > > >> > but anyway, i think it is a nasty way to do > it. > > so back > > >> to the > > >> > question > > >> > above: how can it be done better, properly? > > >> > > > >> > cheers - > > >> > joachim > > >> > > > >> > > > > > > _______________________________________________ > > Qutecsound-devel mailing list > > Qut...@li... > <mailto:Qut...@li...> > > <mailto:Qut...@li... > <mailto:Qut...@li...>> > > https://lists.sourceforge.net/lists/listinfo/qutecsound-devel > <https://lists.sourceforge.net/lists/listinfo/qutecsound-devel> > > > <https://lists.sourceforge.net/lists/listinfo/qutecsound-devel > <https://lists.sourceforge.net/lists/listinfo/qutecsound-devel>> > > > |