Page 1 of 1

Posted: 21 Jul 2008, 18:33
by zenzak
I have posted a new user module called "Bouncing Balls" :
A Bouncing balls Panel. Balls trigger when bouncing. Speed and number of balls can be set. I add a workspace where the balls trigger two StepMidi modules.

Zenzak

Posted: 21 Jul 2008, 20:22
by nay-seven
Fantastic ! really cool module , love it

just 2 little bugs :

changing the visible status : ( for ex : ctrl panel to interface panel ) change the number of balls

in interface panel , changing the size of the window bug Usine
with this message :
Error:Internal in TUserPanel

Posted: 21 Jul 2008, 22:05
by senso
impatient to try this module!!!!

Posted: 22 Jul 2008, 00:31
by zenzak
Thank you... its hollyday for me and i'll try to spare my time between correcting some bugs and.... fishing !

Cordialement
zenzak

Posted: 22 Jul 2008, 00:36
by zenzak
... i don't know how to intercept the message when changing form ctrl panel to interface panel.... I know this bug ! Thank you to Senso to help me. I Prepare a module with webcam panel and prehap histograms value out. 'Hope to be inspired !

Zenzak

Posted: 22 Jul 2008, 10:15
by nay-seven
zenzac wrote:I Prepare a module with webcam panel
ouh ouh ! Christmas in summer !!!

and happy fishing too...;-)

Posted: 22 Jul 2008, 10:52
by cmodica
Very funny and interesting !!!
Be sure i will use it. Thank you very much for this module.
i am impatient to try your 'web cam' module .... You realy make me happy.

Have nice time on holliday and good fishing.

Posted: 22 Jul 2008, 12:57
by senso
hello Zenzak thanks for your great User modules.

Error messages aren't displayed in the trace panel but reprted in the LogUsine.log file.
So it can help if you need to get error msg (in the future I'll implement a 'debug' mode to display such msg more friendly...)

In the case of the BouncingBalls you have (my system is in french)

Code: Select all

[12:38:23] TUserPanel  Descripteur non valide
[12:38:23] Error:Internal in TUserPanel 
[12:38:39] TUserPanel  La ressource demandée est en cours d'utilisation.
[12:38:39] Error:Internal in TUserPanel 
[12:38:40] TUserPanel  Out of system resources
[12:38:40] Error:Internal in TUserPanel 
[12:38:44] TUserPanel  Out of system resources
When we look carefully it seems to come from InitSpace called by the Resize.

Code: Select all

procedure TBouncingBalls.InitSpace;
begin
  Bitmap.Width:=ModuleWidth-(BorderWidth*2);
  Bitmap.height:=ModuleHeight-(BorderWidth*2);
  SpaceRgn:=CreateRectRgn(0,0,Bitmap.Width,Bitmap.Height);
end;
I don't know precisely how works the CreateRectRgn routine, (I don't use it In Usine).
But two possible bugs:
- you create Rgn without destroying the previous one ?
- the resize is called by the "display thread" and the process by the "realtime audio thread". So it's possible to have conflicts (you re-create region while you attempt to use it in the process routine). To protect your code you can use TCriticalSection (Aquire & Release).

I hope It will help you.

I'm also impatient to have the web cam Usermodule!!