From: Dennis S. <sy...@yo...> - 2004-09-29 08:45:48
|
Alright guys, Since we're really not going to make the schedule anyway, I'd like to do a bugfix release next week. Goals: * Loads of fixes. * XMMS Plugin stable/usable (You think this is possible Duilio ?) What needs to be done: Globally: * Look for issues, list them. XMMS plugin: crash op gl startup. cleanup -> start, switching plugins kinda weird sometimes. QUIT WM -> start, crash. (can't reproduce anylonger..) Completely working config dialog Libvisual: Finish plugin libraries (multiple plugin structures in one plugin). Log verboseness API. Plugin flags (atleast integer flags). Plugins: Random seed infinite. What do you guys think, can we do this together and roll out a quality release before monday next week ? I sure think we can, but I seem to be miscalculating schedules wrongly anyway :) Cheers, Dennis |
From: Duilio J. P. <dp...@fc...> - 2004-09-29 16:50:36
|
> Goals: > * Loads of fixes. > * XMMS Plugin stable/usable (You think this is possible Duilio ?) Oh yeah, just don't crashing when disabling is enough reason to make a release, and we have more than that. > What needs to be done: > Globally: > * Look for issues, list them. > > XMMS plugin: > crash op gl startup. We really must fix this. > cleanup -> start, switching plugins kinda weird > sometimes. > QUIT WM -> start, crash. (can't reproduce anylonger..) ?? I don't understand this. > Completely working config dialog My first priority. > Libvisual: > Finish plugin libraries (multiple plugin structures in > one plugin). > Log verboseness API. This is for me, but after config dialog. > Plugin flags (atleast integer flags). > > Plugins: > Random seed infinite. Ok, I will see this. > > > What do you guys think, can we do this together and roll out a quality > release before monday next week ? I'm not shure before, but maybe on monday itself. Bye, Duilio. |
From: salsaman <sal...@xs...> - 2004-09-29 19:22:05
|
Duilio Javier Protti wrote: >>Goals: >>* Loads of fixes. >>* XMMS Plugin stable/usable (You think this is possible Duilio ?) >> >> > >Oh yeah, just don't crashing when disabling is enough reason >to make a release, and we have more than that. > > > >>What needs to be done: >> Globally: >> * Look for issues, list them. >> >> XMMS plugin: >> crash op gl startup. >> >> > >We really must fix this. > > > >> cleanup -> start, switching plugins kinda weird >> sometimes. >> QUIT WM -> start, crash. (can't reproduce anylonger..) >> >> > >?? I don't understand this. > > > >> Completely working config dialog >> >> > >My first priority. > > > >> Libvisual: >> Finish plugin libraries (multiple plugin structures in >> one plugin). >> Log verboseness API. >> >> > >This is for me, but after config dialog. > > > >> Plugin flags (atleast integer flags). >> >> Plugins: >> Random seed infinite. >> >> > >Ok, I will see this. > > > >>What do you guys think, can we do this together and roll out a quality >>release before monday next week ? >> >> > >I'm not shure before, but maybe on monday itself. > >Bye, >Duilio. > > > > >------------------------------------------------------- >This SF.net email is sponsored by: IT Product Guide on ITManagersJournal >Use IT products in your business? Tell us what you think of them. Give us >Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more >http://productguide.itmanagersjournal.com/guidepromo.tmpl >_______________________________________________ >Libvisual-devel mailing list >Lib...@li... >https://lists.sourceforge.net/lists/listinfo/libvisual-devel > > > > Actually, what would be *really* nice is if a host application could set a random seed as in: visual_actor_set_seed(uint32_t seed); visual_actor_set_seed(123456); // set seed to 123456 visual_actor_set_seed(0); // let libvisual choose a (pseudo random) seed that would allow for example, matching of previews with rendering. thanks in advance, Salsaman. |
From: Dennis S. <sy...@yo...> - 2004-09-29 20:05:55
|
On Wed, 2004-09-29 at 21:36 +0100, salsaman wrote: > Actually, what would be *really* nice is if a host application could set > a random seed as in: > > visual_actor_set_seed(uint32_t seed); > > visual_actor_set_seed(123456); // set seed to 123456 > > visual_actor_set_seed(0); // let libvisual choose a (pseudo random) seed Yes that would be kinda nice, but it's difficult to do because all the plugins need many changes to support this correctly. And the plugins we interface through an API would just not support this. So it's kinda hard. Btw, Just a request, when you reply, could you please qoute the relevant part of the messages you reply to, and leave the rest. It's easier to read that way ;) Cheers, Dennis |
From: Duilio J. P. <dp...@fc...> - 2004-09-30 05:14:34
|
> On Wed, 2004-09-29 at 21:36 +0100, salsaman wrote: > > Actually, what would be *really* nice is if a host application could set > > a random seed as in: > > > > visual_actor_set_seed(uint32_t seed); > > > > visual_actor_set_seed(123456); // set seed to 123456 > > > > visual_actor_set_seed(0); // let libvisual choose a (pseudo random) seed > > Yes that would be kinda nice, but it's difficult to do because all the > plugins need many changes to support this correctly. And the plugins > we interface through an API would just not support this. So it's kinda > hard. A param entry can work well for this purpose, I guess. Bye, Duilio. |
From: Vitaly V. B. <vit...@us...> - 2004-09-30 05:38:36
|
On Wed, 29 Sep 2004 22:05:49 +0200 Dennis Smit <sy...@yo...> wrote: > On Wed, 2004-09-29 at 21:36 +0100, salsaman wrote: > > Actually, what would be *really* nice is if a host application could set > > a random seed as in: > > > > visual_actor_set_seed(uint32_t seed); > > > > visual_actor_set_seed(123456); // set seed to 123456 > > > > visual_actor_set_seed(0); // let libvisual choose a (pseudo random) seed > > Yes that would be kinda nice, but it's difficult to do because all the > plugins need many changes to support this correctly. And the plugins > we interface through an API would just not support this. So it's kinda > hard. Hm, I don't think it's hard. :) just few lines of code. Fast way to do this is to define these globals: void visual_set_seed(uint32_t seed); uint32_t visual_get_seed(); uint32_t visual_random(); With no multi-threading everything should be absolutely reproducible ;) Next, this plugin-specific api: void visual_plugin_set_seed(VisPluginInfo*, uint32_t seed); uint32_t visual_plugin_get_seed(VisPluginInfo*); void visual_plugin_random(VisPluginInfo*); state of the random number generation algo will be strored in VisPluginInfo. One thing: we need to borrow nice pseudo-random numbger gen algo. OK? -- Vitaly GPG Key ID: F95A23B9 |
From: salsaman <sal...@xs...> - 2004-09-30 09:13:03
|
Vitaly V. Bursov wrote: > >One thing: we need to borrow nice pseudo-random numbger gen algo. > >OK? > > > You can use these two functions adapted from LiVES: static uint32_t fastrand_val; inline uint32_t fastrand(void) { return (fastrand_val=fastrand_val*1073741789+32749); } void fastsrand(uint32_t seed) { fastrand_val = seed; } Salsaman. |
From: salsaman <sal...@xs...> - 2004-09-30 09:24:34
|
salsaman wrote: > Vitaly V. Bursov wrote: > >> >> One thing: we need to borrow nice pseudo-random numbger gen algo. >> >> OK? >> >> >> > You can use these two functions adapted from LiVES: > > static uint32_t fastrand_val; > > inline uint32_t fastrand(void) > { > return (fastrand_val=fastrand_val*1073741789+32749); > } > > void fastsrand(uint32_t seed) > { > fastrand_val = seed; > } > > > > > Salsaman. > And to seed it: #include <sys/time.h> struct timeval tv; gettimeofday(&tv,NULL); fastsrand(tv.tv_usec); Salsaman. |
From: Burkhard P. <pl...@ip...> - 2004-10-01 09:46:58
|
>> >> You can use these two functions adapted from LiVES: >> >> static uint32_t fastrand_val; >> >> inline uint32_t fastrand(void) >> { >> return (fastrand_val=fastrand_val*1073741789+32749); >> } >> >> void fastsrand(uint32_t seed) >> { >> fastrand_val = seed; >> } >> This could be ok for most applications, but making a real good random generator is not trivial. Some detailed introduction to various random number generators can be found in the Book "Numerical Recipes in C". Here is the online version (scroll down to Chapter 7): http://www.library.cornell.edu/nr/cbookcpdf.html > And to seed it: > > > > #include <sys/time.h> > struct timeval tv; > > gettimeofday(&tv,NULL); > fastsrand(tv.tv_usec); > Yea, that's the best method :-) BTW all plugins must be changed to no longer call [s]rand(). -- _____________________________ Dr.-Ing. Burkhard Plaum Institut fuer Plasmaforschung Pfaffenwaldring 31 70569 Stuttgart Tel.: +49 711 685-2187 Fax.: -3102 |
From: Dennis S. <sy...@yo...> - 2004-10-01 10:23:57
|
On Fri, 2004-10-01 at 11:48 +0200, Burkhard Plaum wrote: > > #include <sys/time.h> > > struct timeval tv; > > > > gettimeofday(&tv,NULL); > > fastsrand(tv.tv_usec); > > > Yea, that's the best method :-) > > BTW all plugins must be changed to no longer call > [s]rand(). Yep, I saw xscreensaver has something that gives a warning or an error on srand, not sure how they do that... Cheers, Dennis |
From: salsaman <sal...@xs...> - 2004-10-01 12:06:30
|
Dennis Smit wrote: >On Fri, 2004-10-01 at 11:48 +0200, Burkhard Plaum wrote: > > >>>#include <sys/time.h> >>>struct timeval tv; >>> >>>gettimeofday(&tv,NULL); >>>fastsrand(tv.tv_usec); >>> >>> >>> >>Yea, that's the best method :-) >> >>BTW all plugins must be changed to no longer call >>[s]rand(). >> >> > >Yep, I saw xscreensaver has something that gives a warning or an error >on srand, not sure how they do that... > >Cheers, >Dennis > > > Well I am not exactly sure about that now. I have realised that tv_usec could be cyclic on some machines, so it might be better to seed with /dev/urandom if that device exists. The algorithm itself seems to produce enough random noise to be useful, you can check this for yourself with the "noise" real time effect in LiVES. FYI, it was originally in effecTV but used non prime numbers. My contribution was to switch to primes, which eliminated an apparent periodicity in the noise effect. Salsaman. |
From: Burkhard P. <pl...@ip...> - 2004-10-01 13:02:34
|
>> You can use these two functions adapted from LiVES: >> >> static uint32_t fastrand_val; >> >> inline uint32_t fastrand(void) >> { >> return (fastrand_val=fastrand_val*1073741789+32749); >> } This one seems better: #define a 1664525L #define c 1013904223L return (fastrand_val= a * fastrand_val + c); a is suggested by Knuth c is suggested by H.W. Lewis and is a prime close to 2^32 * (sqrt(5) - 2) > #include <sys/time.h> > struct timeval tv; > > gettimeofday(&tv,NULL); > fastsrand(tv.tv_usec); Ok, maybe /dev/urandom is better, because with tv_usec, you'll never get seed values greater than 999999. But assuming a libvisual program is started at random times within a second, even with tv_usec the propability for the same sequence in 2 subsequent program runs is 10^(-6). I guess that should be enough. -- _____________________________ Dr.-Ing. Burkhard Plaum Institut fuer Plasmaforschung Pfaffenwaldring 31 70569 Stuttgart Tel.: +49 711 685-2187 Fax.: -3102 |
From: salsaman <sal...@xs...> - 2004-10-01 13:22:09
|
Burkhard Plaum wrote: > > But assuming a libvisual program is started at random > times within a second, even with tv_usec the propability for the > same sequence in 2 subsequent program runs is 10^(-6). > I guess that should be enough. > Yes but it could be quantised (e.g. it could only be measured in milliseconds then multiplied by 1000). Salsaman. |
From: Burkhard P. <pl...@ip...> - 2004-10-01 13:45:38
|
> Yes but it could be quantised (e.g. it could only be measured in > milliseconds then multiplied by 1000). Oops, ok, forgot this. BTW for my work, I also used time(NULL). It will generate the same sequence only if it's called multiple times within one second. -- _____________________________ Dr.-Ing. Burkhard Plaum Institut fuer Plasmaforschung Pfaffenwaldring 31 70569 Stuttgart Tel.: +49 711 685-2187 Fax.: -3102 |
From: salsaman <sal...@xs...> - 2004-10-02 10:27:12
|
Burkhard Plaum wrote: > > This one seems better: > > #define a 1664525L > #define c 1013904223L > > return (fastrand_val= a * fastrand_val + c); > > a is suggested by Knuth > c is suggested by H.W. Lewis and is a prime close to 2^32 * (sqrt(5) - 2) Thanks for that, I've updated the code in LiVES with this. Salsaman. |
From: Dennis S. <sy...@yo...> - 2004-09-30 19:07:30
|
On Thu, 2004-09-30 at 08:38 +0300, Vitaly V. Bursov wrote: > Hm, I don't think it's hard. :) just few lines of code. > > Fast way to do this is to define these globals: > void visual_set_seed(uint32_t seed); > uint32_t visual_get_seed(); > uint32_t visual_random(); > > With no multi-threading everything should be absolutely reproducible ;) > > Next, this plugin-specific api: > > void visual_plugin_set_seed(VisPluginInfo*, uint32_t seed); > uint32_t visual_plugin_get_seed(VisPluginInfo*); > void visual_plugin_random(VisPluginInfo*); > > state of the random number generation algo will be strored in VisPluginInfo. > > One thing: we need to borrow nice pseudo-random numbger gen algo. > > OK? Alright, it seems that there is real interest for this feature, in that case. I'm not sure about the name: visual_plugin_random, because it kinda implies that it 'could give a random plugin' or something, we need a good namespace here, and an lv_random module (which also includes a good pseudo random number gen, and while we add it, some nice range, float random features. If you could make a patch for this, that would be awesome. I currently really don't feel like doing development as I can't keep my mind at it. Thanks, Dennis |
From: Burkhard P. <pl...@ip...> - 2004-10-01 10:21:48
|
Dennis Smit wrote: > (which also includes a > good pseudo random number gen, and while we add it, some nice range, > float random features. An EXTREMELY useful function would be something like int lv_random_decide(float p); which returns 1 with a propability of p (0.0 <= p <= 1.0) |
From: Dennis S. <sy...@yo...> - 2004-10-01 19:38:20
|
On Fri, 2004-10-01 at 12:25 +0200, Burkhard Plaum wrote: > Dennis Smit wrote: > > > (which also includes a > > good pseudo random number gen, and while we add it, some nice range, > > float random features. > > An EXTREMELY useful function would be something like > > int lv_random_decide(float p); > > which returns 1 with a propability of p (0.0 <= p <= 1.0) I'm not sure if I understand this correctly, but basicly checks if p > 0.5 or lower than ? or ?! Dennis. |
From: Vitaly V. B. <vit...@us...> - 2004-10-01 20:12:02
|
On Fri, 01 Oct 2004 12:25:37 +0200 Burkhard Plaum <pl...@ip...> wrote: > Dennis Smit wrote: > > > (which also includes a > > good pseudo random number gen, and while we add it, some nice range, > > float random features. > > An EXTREMELY useful function would be something like > > int lv_random_decide(float p); > > which returns 1 with a propability of p (0.0 <= p <= 1.0) :) Nice idea. int lv_random_decide(float a) { float x=(float)random()/RAND_MAX; return x <= a; } -- Vitaly GPG Key ID: F95A23B9 |
From: Dennis S. <sy...@yo...> - 2004-10-02 10:07:27
|
On Fri, 2004-10-01 at 23:10 +0300, Vitaly V. Bursov wrote: > > which returns 1 with a propability of p (0.0 <= p <= 1.0) > :) Nice idea. > > int lv_random_decide(float a) > { > float x=(float)random()/RAND_MAX; > return x <= a; > } You guys probably figured by now that my math skills really suck :) Thanks for the translation to code heheheh. I think I'll be implementing this today, and some other randomness functions. Cheers, Dennis |
From: salsaman <sal...@xs...> - 2004-10-02 10:22:20
|
Dennis Smit wrote: >On Fri, 2004-10-01 at 23:10 +0300, Vitaly V. Bursov wrote: > > >>>which returns 1 with a propability of p (0.0 <= p <= 1.0) >>> >>> >>:) Nice idea. >> >>int lv_random_decide(float a) >>{ >> float x=(float)random()/RAND_MAX; >> return x <= a; >>} >> >> > >You guys probably figured by now that my math skills really suck :) > >Thanks for the translation to code heheheh. > >I think I'll be implementing this today, and some other randomness >functions. > >Cheers, >Dennis > > > Great. I implemented a really nice feature in LiVES yesterday. Now you can load in an audio file, hit record, then trigger an actor. The video frames are grabbed and then rendered so you can have an instant video to accompany any audio. This feature really needs the randomness fixes, otherwise you just get the same visuals for every audio piece. Hope to have another LiVES dev release out soon. Cheers, Salsaman. |
From: Dennis S. <sy...@yo...> - 2004-09-29 17:05:01
|
On Wed, 2004-09-29 at 14:02 -0300, Duilio Javier Protti wrote: > > XMMS plugin: > > crash op gl startup. > > We really must fix this. Yep > > cleanup -> start, switching plugins kinda weird > > sometimes. > > QUIT WM -> start, crash. (can't reproduce anylonger..) > > ?? I don't understand this. I can't find a good reproduction pattern but, having libvisual open, figgle in the config window, close config AND libvisual/ reopen libvisual and config and figgle some more had some crashes for me. > > Log verboseness API. > > This is for me, but after config dialog. Ok, cool > > Random seed infinite. > > Ok, I will see this. The only thing left to make random is the start color. > I'm not shure before, but maybe on monday itself. Sounds fair! :) Cheers, Dennis |
From: Duilio J. P. <dp...@fc...> - 2004-09-30 03:33:06
|
> > > cleanup -> start, switching plugins kinda weird > > > sometimes. > > > QUIT WM -> start, crash. (can't reproduce anylonger..) > > > > ?? I don't understand this. > > I can't find a good reproduction pattern but, having libvisual open, > figgle in the config window, close config AND libvisual/ reopen > libvisual and config and figgle some more had some crashes for me. Well, until now, I don't have worried too much about clean up things while introducing the new configure dialog, but I'll do it before release! Bye, Duilio. |
From: salsaman <sal...@xs...> - 2004-09-29 18:41:07
|
Dennis Smit wrote: >On Wed, 2004-09-29 at 14:02 -0300, Duilio Javier Protti wrote: > > >>> XMMS plugin: >>> crash op gl startup. >>> >>> >>We really must fix this. >> >> > >Yep > > > >>> cleanup -> start, switching plugins kinda weird >>> sometimes. >>> QUIT WM -> start, crash. (can't reproduce anylonger..) >>> >>> >>?? I don't understand this. >> >> > >I can't find a good reproduction pattern but, having libvisual open, >figgle in the config window, close config AND libvisual/ reopen >libvisual and config and figgle some more had some crashes for me. > > > >>> Log verboseness API. >>> >>> >>This is for me, but after config dialog. >> >> > >Ok, cool > > > >>> Random seed infinite. >>> >>> >>Ok, I will see this. >> >> > >The only thing left to make random is the start color. > > > >>I'm not shure before, but maybe on monday itself. >> >> > >Sounds fair! :) > >Cheers, >Dennis > > > > >------------------------------------------------------- >This SF.net email is sponsored by: IT Product Guide on ITManagersJournal >Use IT products in your business? Tell us what you think of them. Give us >Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more >http://productguide.itmanagersjournal.com/guidepromo.tmpl >_______________________________________________ >Libvisual-devel mailing list >Lib...@li... >https://lists.sourceforge.net/lists/listinfo/libvisual-devel > > > > Any chance of random seeding gforce and goom2 as well ? Thanks in advance, Salsaman. P.S last night's gig with LiVES and libvisual went very well, I should have some of it on tape, need to check...but i will try to post some clips. |
From: Dennis S. <sy...@yo...> - 2004-09-29 19:44:51
|
On Wed, 2004-09-29 at 20:55 +0100, salsaman wrote: > Any chance of random seeding gforce and goom2 as well ? Will look at gforce, Already tried fixing it but without succes, it's somewhere deep inside gforce it's 'script playlist' handling which I don't master yet (the codebase size of gforce is twice that of libvisual itself, so it takes some time really mastering it.. hehe) goom2, you have to ask JC about that, remember goom2 comes from libgoom2 in which we don't have control :) > P.S last night's gig with LiVES and libvisual went very well, I should > have some of it on tape, need to check...but i will try to post some clips. Happy to hear that, I'm really curious about the clips! Cheers, Dennis |