You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
(38) |
May
(22) |
Jun
(92) |
Jul
(101) |
Aug
(18) |
Sep
(286) |
Oct
(180) |
Nov
(73) |
Dec
(14) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(18) |
Feb
(74) |
Mar
(56) |
Apr
(11) |
May
(5) |
Jun
(4) |
Jul
(20) |
Aug
(4) |
Sep
|
Oct
|
Nov
(1) |
Dec
(2) |
2006 |
Jan
(11) |
Feb
(2) |
Mar
(10) |
Apr
(2) |
May
(1) |
Jun
|
Jul
(24) |
Aug
(11) |
Sep
(5) |
Oct
(16) |
Nov
(25) |
Dec
(8) |
2007 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
(3) |
Jul
(1) |
Aug
|
Sep
|
Oct
(4) |
Nov
(12) |
Dec
|
2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(3) |
Aug
|
Sep
|
Oct
|
Nov
(2) |
Dec
|
2010 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(5) |
From: Dennis S. <sy...@yo...> - 2004-10-02 11:35:24
|
I've put some of the randomness request in CVS, not yet finished tho. Cheers, Dennis |
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: 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-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: Dennis S. <sy...@yo...> - 2004-10-02 09:12:24
|
On Sat, 2004-10-02 at 00:43 -0300, Duilio Javier Protti wrote: > I have implemented visual_log_set_verboseness() on > libvisual core. We can set these: > > The default level is VISUAL_LOG_VERBOSENESS_MEDIUM. (Dennis, do you > think it shoul be LOW?). > > Similar handlers can be set for warning/critical/error messages. I'm very happy with the system you implemented, I've got 1 comment and 1 question. First, there is no enum yet to entirely disable visual_log output, I think that VERBOSENESS_NONE should be really none verbose. One more question, I really like the message handle system, I wonder if it would be possible to also have a 'all messages' handler that can be optionally set. This would be nice for an app that just wants to redirect ALL output. Another thing is that the handler set function should accept a void *priv, if the app wants the handler function to handle a private. Let's say a GtkWidget in which text has to be printed. Thanks for implementing it, Dennis |
From: salsaman <sal...@xs...> - 2004-10-02 08:56:32
|
Duilio Javier Protti wrote: >I have implemented visual_log_set_verboseness() on >libvisual core. We can set these: > >typedef enum { > > VISUAL_LOG_VERBOSENESS_NONE, /**< Show only VISUAL_LOG_INFO > and VISUAL_LOG_ERROR messages. */ > > VISUAL_LOG_VERBOSENESS_LOW, /**< Show only VISUAL_LOG_INFO, > VISUAL_LOG_ERROR and > VISUAL_LOG_CRITICAL messages. */ > > VISUAL_LOG_VERBOSENESS_MEDIUM, /**< Show all log messages > except VISUAL_LOG_DEBUG ones. */ > > VISUAL_LOG_VERBOSENESS_HIGH /**< Show all log messages. */ > >} VisLogVerboseness; > > Ermm...shouldnt' VERBOSENESS_NONE produce NO output ? Or can there be a mode LOG_VERBOSENESS_REALLY_REALLY_NONE :-) Anyway haven't you got it the wrong way round, at lower verboseness levels, only the most critical messages should be shown. Salsaman. |
From: Dennis S. <sy...@yo...> - 2004-10-02 08:46:15
|
On Fri, 2004-10-01 at 20:51 -0300, Duilio Javier Protti wrote: > I think the best way to do that is to add an API function which > let the user to set a handler for outputting messages, which > overrides the default behavior, like glib does. In glib you > have i.e g_message() with a default behavior, but you can override > it calling g_set_message_handler() with a function that receives the > message string and returns nothing. > > This approach is very powerfull because you can process and redirect > output whatever you like. Specially on GUI applications, you can > redirect messages to some GUI widget. That sounds really good, doing this together with verboseness level API I assume ? Cheers, Dennis |
From: Duilio J. P. <dp...@fc...> - 2004-10-02 03:31:40
|
I have implemented visual_log_set_verboseness() on libvisual core. We can set these: typedef enum { VISUAL_LOG_VERBOSENESS_NONE, /**< Show only VISUAL_LOG_INFO and VISUAL_LOG_ERROR messages. */ VISUAL_LOG_VERBOSENESS_LOW, /**< Show only VISUAL_LOG_INFO, VISUAL_LOG_ERROR and VISUAL_LOG_CRITICAL messages. */ VISUAL_LOG_VERBOSENESS_MEDIUM, /**< Show all log messages except VISUAL_LOG_DEBUG ones. */ VISUAL_LOG_VERBOSENESS_HIGH /**< Show all log messages. */ } VisLogVerboseness; The default level is VISUAL_LOG_VERBOSENESS_MEDIUM. (Dennis, do you think it shoul be LOW?). To avoid showing info or error messages, or to redirected them or to process them on some special way, use: visual_log_set_info_handler (visual_log_message_handler_func_t handler); where handler must have signature: void my_info_handler (const char *message, const char *funcname) { /* funcname is the name of the function which invokes visual_log() and can be NULL on non-GNU systems */ ... } Similar handlers can be set for warning/critical/error messages. Bye, Duilio. |
From: Duilio J. P. <dp...@fc...> - 2004-10-01 23:39:09
|
> On Fri, 2004-10-01 at 19:44 +0100, salsaman wrote: > > This output needs to be removed or sent instead to stderr. > > > > Regards, > > Salsaman. > > All has been removed from CVS, and libvisual-INFO output will be > controlable through API. > > Dennis I think the best way to do that is to add an API function which let the user to set a handler for outputting messages, which overrides the default behavior, like glib does. In glib you have i.e g_message() with a default behavior, but you can override it calling g_set_message_handler() with a function that receives the message string and returns nothing. This approach is very powerfull because you can process and redirect output whatever you like. Specially on GUI applications, you can redirect messages to some GUI widget. Bye, Duilio. |
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-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: Dennis S. <sy...@yo...> - 2004-10-01 19:21:07
|
On Fri, 2004-10-01 at 19:44 +0100, salsaman wrote: > This output needs to be removed or sent instead to stderr. > > Regards, > Salsaman. All has been removed from CVS, and libvisual-INFO output will be controlable through API. Dennis |
From: salsaman <sal...@xs...> - 2004-10-01 19:11:40
|
Dennis Smit wrote: > >>so in future if you want to see any output at all from libvisual in >>LiVES, it will *have to* go to stderr. >> >> > >We're about to add an API to control message verboseness. > >Thanks, >Dennis > > > > Perfect ! Salsaman. |
From: Dennis S. <sy...@yo...> - 2004-10-01 19:05:17
|
On Fri, 2004-10-01 at 19:48 +0100, salsaman wrote: > salsaman wrote: > ... > > Further to my last message, I have put in libvis: > > close (1); > > so in future if you want to see any output at all from libvisual in > LiVES, it will *have to* go to stderr. We're about to add an API to control message verboseness. Thanks, Dennis |
From: salsaman <sal...@xs...> - 2004-10-01 19:02:23
|
salsaman wrote: > salsaman wrote: > ... > > Further to my last message, I have put in libvis: > > close (1); > > so in future if you want to see any output at all from libvisual in > LiVES, it will *have to* go to stderr. > > > Salsaman. OK, can't do that...it stops output from LiVES. I'm afraid I can't release the libvisual plugin until all output to stdout is removed. Salsaman. |
From: salsaman <sal...@xs...> - 2004-10-01 17:33:13
|
salsaman wrote: ... Further to my last message, I have put in libvis: close (1); so in future if you want to see any output at all from libvisual in LiVES, it will *have to* go to stderr. Salsaman. |
From: salsaman <sal...@xs...> - 2004-10-01 17:29:16
|
Hi all, in my testing of libvisual, which is almost complete now, I did: lives-exe 2>/dev/null this should produce no output because stdout is used in LiVES for output streaming. Instead I saw this, e.g. for gforce: libvisual INFO: no progname: New Delta field: Acid_Gap libvisual INFO: no progname: New wave shape: 3D_Cylinder libvisual INFO: no progname: Looking up expression in dict: MAG libvisual INFO: no progname: New Particle: Warp_Me_Away New Delta field: Accident libvisual INFO: no progname: New wave shape: Zoomed_Square libvisual INFO: no progname: Looking up expression in dict: MAG libvisual INFO: no progname: New Delta field: The_Spectrologist_s_Assistant New Delta field: Yes New Delta field: 6_Feet_Under I am guessing the "New Delta Field" is temporary debug info. Other output which needs removing: goom2: NEW RESIZE: 480 360 0x839dcf8 Jackdaw: Computing table number 1 Computing table number 2 Computing table number 3 Computing table number 4 Oinksie (!) [OINKSIE] we've got a requisition hit YEAH BABY YEAH [OINKSIE] event handler is being called [OINKSIE] we've got a dimension hit YEAH BABY YEAH This output needs to be removed or sent instead to stderr. Regards, 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-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: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 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: 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: 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: 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-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 |