Re: Playing musical notes in LC

2014-12-13 Thread René Micout
Hello,
You can see here :
http://sunny-tdz.com/art-1000
Bon souvenir de Paris
René

Le 12 déc. 2014 à 19:44, Timothy Miller  a 
écrit :

> IIRC, there was once a time, perhaps antediluvian, when the command “Play G3” 
> would play a G below middle C. The user could also specify a duration, I 
> think.
> 
> Either I don’t recall correctly, or this feature was scrapped.
> 
> Is there an extension or plug-in that makes this possible in current versions 
> of LC? (I know I can play mp3 sound clips.)
> 
> Now that I’m thinking about music, is there a way to make LC play a given 
> note from a given instrument, with a given duration, from a soundFont?
> 
> Thanks in advance.
> 
> Tim
> 
> 
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


AW: OT: Mac installer rights?

2014-12-13 Thread Tiemo Hollmann TB
Hi Jacque,
thanks for your comments. That is funny, because I am using Mark
Schonewilles Installer Maker since years without any problems and also with
this product it installs my LC prog as expected on all of my clients Macs
from OS X 10.5 to 10.10. This is the only one (on 10.9.5), where this
phenomenon happened, so I think there must be something being messed up on
the machine.
Tiemo

-Ursprüngliche Nachricht-
Von: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] Im Auftrag
von J. Landman Gay
Gesendet: Freitag, 12. Dezember 2014 19:22
An: How to use LiveCode
Betreff: Re: OT: Mac installer rights?

On 12/12/2014, 10:08 AM, Tiemo Hollmann TB wrote:
> My question to the Mac guys: What is the difference concerning writing 
> rights when the same user creates manually folders and files or lets 
> an installer do that for him? Is there on Mac something similar as on 
> Windows like "run as Admin" to try to lift the user rights? Or is here 
> something completely messed up? I have never experienced this before.

It is part of the Mac OS sandboxing, which prevents software from writing
files to locations outside of its own folders. This prevents malware from
writing to disk in areas it does not control.

Except for certain drivers and extensions, OS X does not use installers, and
users do not expect one. The user simply drags the app bundle to the
applications folder. You can zip the app if you like, and the user can unzip
it and drag it into the folder. Or commonly apps ship in dmg files (a
virtual device image.) These are easy to create with various Mac utilities
such as Drop DMG. Most users are familiar with dmg files.

-- 
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: OT: Mac installer rights?

2014-12-13 Thread J. Landman Gay
The user probably has their security settings set to the default,  which 
disallows installation except from the Mac App Store. The second level of 
security allows third party installations but only if they are code signed. The 
third level allows anything. 

You can tell the user to change the setting to allow installation from 
anywhere,. For a novice user this can compromise the security of the machine, 
so they may want to set it back to the default after installation. 

On December 13, 2014 5:10:00 AM CST, Tiemo Hollmann TB  
wrote:
>Hi Jacque,
>thanks for your comments. That is funny, because I am using Mark
>Schonewilles Installer Maker since years without any problems and also
>with
>this product it installs my LC prog as expected on all of my clients
>Macs
>from OS X 10.5 to 10.10. This is the only one (on 10.9.5), where this
>phenomenon happened, so I think there must be something being messed up
>on
>the machine.
>Tiemo
>
>-Ursprüngliche Nachricht-
>Von: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] Im
>Auftrag
>von J. Landman Gay
>Gesendet: Freitag, 12. Dezember 2014 19:22
>An: How to use LiveCode
>Betreff: Re: OT: Mac installer rights?
>
>On 12/12/2014, 10:08 AM, Tiemo Hollmann TB wrote:
>> My question to the Mac guys: What is the difference concerning
>writing 
>> rights when the same user creates manually folders and files or lets 
>> an installer do that for him? Is there on Mac something similar as on
>
>> Windows like "run as Admin" to try to lift the user rights? Or is
>here 
>> something completely messed up? I have never experienced this before.
>
>It is part of the Mac OS sandboxing, which prevents software from
>writing
>files to locations outside of its own folders. This prevents malware
>from
>writing to disk in areas it does not control.
>
>Except for certain drivers and extensions, OS X does not use
>installers, and
>users do not expect one. The user simply drags the app bundle to the
>applications folder. You can zip the app if you like, and the user can
>unzip
>it and drag it into the folder. Or commonly apps ship in dmg files (a
>virtual device image.) These are easy to create with various Mac
>utilities
>such as Drop DMG. Most users are familiar with dmg files.

-- 
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: textStyle and Italic

2014-12-13 Thread J. Landman Gay
The information is in the release notes, and the behavior brings font 
management into conformance with how mobile font styling works (there are no 
simulated styles on mobile.) 

The IDE reports italics because that's what was assigned and the engine 
apparently keeps the designation though it no longer can render it. The IDE 
must be using that info to do a font substitution or something similar. Your 
own scripts could do the same. 

On December 13, 2014 1:44:07 AM CST, Terence Heaford  
wrote:
>Do you get informed of this in some way in your method calls?
>
>Why does the IDE say Italic when it isn’t?
>
>All the best
>
>Terry
>
>> On 12 Dec 2014, at 18:24, J. Landman Gay 
>wrote:
>> 
>> It's worth noting that the previous OS X routines used synthesised
>font styles. That is, bold and italic styles were emulated (by slanting
>or thickening)
>
>___
>use-livecode mailing list
>use-livecode@lists.runrev.com
>Please visit this url to subscribe, unsubscribe and manage your
>subscription preferences:
>http://lists.runrev.com/mailman/listinfo/use-livecode

-- 
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Port designation in URL

2014-12-13 Thread J. Landman Gay
Thanks Mike, that helps. Since the error is being processed through libURL it 
makes sense. 

On December 13, 2014 1:41:19 AM CST, Mike Bonner  wrote:
>If it works like it does in LC, its just assigning a name to the
>socket,
>the name being 6928. Its used (again, assuming its used as in lc) so
>that
>you can have multiple connects to the same socket on the same host and
>port
>so they can be distinguished from one another.  Works great when using
>chatrev (tweaked) for experimenting on a single machine.  That way I
>can
>talk to myself from multiple stacks at the same time.
>
>On Fri, Dec 12, 2014 at 10:00 PM, J. Landman Gay
>
>wrote:
>
>> A little off topic, but does anyone know what the pipe means in a url
>in
>> this format:
>>
>> www. domain.com:443|6928
>>
>> It's coming back in the error response from a POST request and the
>request
>> times out. What does the second port number mean, if that's what it
>is?
>>
>> --
>> Jacqueline Landman Gay | jac...@hyperactivesw.com
>> HyperActive Software   | http://www.hyperactivesw.com
>>
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>___
>use-livecode mailing list
>use-livecode@lists.runrev.com
>Please visit this url to subscribe, unsubscribe and manage your
>subscription preferences:
>http://lists.runrev.com/mailman/listinfo/use-livecode

-- 
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: OT: Mac installer rights?

2014-12-13 Thread Mark Schonewille

Hi Tiemo,

I assume your installer has been signed. Installer Maker's Help section 
is far from complete, but there is a suggestion there about starting the 
app with admin rights. You might try that.


--
Best regards,

Mark Schonewille

Economy-x-Talk Consulting and Software Engineering
Homepage: http://economy-x-talk.com
Twitter: http://twitter.com/xtalkprogrammer
KvK: 50277553

Installer Maker for LiveCode:
http://qery.us/468

Buy my new book "Programming LiveCode for the Real Beginner" 
http://qery.us/3fi


LiveCode on Facebook:
https://www.facebook.com/groups/runrev/

On 12/13/2014 18:02, J. Landman Gay wrote:

The user probably has their security settings set to the default,  which 
disallows installation except from the Mac App Store. The second level of 
security allows third party installations but only if they are code signed. The 
third level allows anything.

You can tell the user to change the setting to allow installation from 
anywhere,. For a novice user this can compromise the security of the machine, 
so they may want to set it back to the default after installation.

On December 13, 2014 5:10:00 AM CST, Tiemo Hollmann TB  
wrote:

Hi Jacque,
thanks for your comments. That is funny, because I am using Mark
Schonewilles Installer Maker since years without any problems and also
with
this product it installs my LC prog as expected on all of my clients
Macs
from OS X 10.5 to 10.10. This is the only one (on 10.9.5), where this
phenomenon happened, so I think there must be something being messed up
on
the machine.
Tiemo

-Ursprüngliche Nachricht-
Von: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] Im
Auftrag
von J. Landman Gay
Gesendet: Freitag, 12. Dezember 2014 19:22
An: How to use LiveCode
Betreff: Re: OT: Mac installer rights?

On 12/12/2014, 10:08 AM, Tiemo Hollmann TB wrote:

My question to the Mac guys: What is the difference concerning

writing

rights when the same user creates manually folders and files or lets
an installer do that for him? Is there on Mac something similar as on



Windows like "run as Admin" to try to lift the user rights? Or is

here

something completely messed up? I have never experienced this before.


It is part of the Mac OS sandboxing, which prevents software from
writing
files to locations outside of its own folders. This prevents malware
from
writing to disk in areas it does not control.

Except for certain drivers and extensions, OS X does not use
installers, and
users do not expect one. The user simply drags the app bundle to the
applications folder. You can zip the app if you like, and the user can
unzip
it and drag it into the folder. Or commonly apps ship in dmg files (a
virtual device image.) These are easy to create with various Mac
utilities
such as Drop DMG. Most users are familiar with dmg files.




___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

AW: OT: Mac installer rights?

2014-12-13 Thread Tiemo Hollmann TB
I have thought about that also, but my progam and the installer is codesigned 
and usually the user gets a message telling something about not trustful 
sources or something like that, even with "level 1" of the security settings. 
But in this case no message appeared, the installer starts installing, runs 
through to the end without any error message apparently installing and only a 
hidden logfile of the installer told me "can't create dir..."
Meanwhile I have packed all files into a DMG, which she could copy without 
problems into the same place.
Really weired.
Thanks Tiemo

-Ursprüngliche Nachricht-
Von: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] Im Auftrag von 
J. Landman Gay
Gesendet: Samstag, 13. Dezember 2014 18:02
An: How to use LiveCode
Betreff: Re: OT: Mac installer rights?

The user probably has their security settings set to the default,  which 
disallows installation except from the Mac App Store. The second level of 
security allows third party installations but only if they are code signed. The 
third level allows anything. 

You can tell the user to change the setting to allow installation from 
anywhere,. For a novice user this can compromise the security of the machine, 
so they may want to set it back to the default after installation. 

On December 13, 2014 5:10:00 AM CST, Tiemo Hollmann TB  
wrote:
>Hi Jacque,
>thanks for your comments. That is funny, because I am using Mark 
>Schonewilles Installer Maker since years without any problems and also 
>with this product it installs my LC prog as expected on all of my 
>clients Macs from OS X 10.5 to 10.10. This is the only one (on 10.9.5), 
>where this phenomenon happened, so I think there must be something 
>being messed up on the machine.
>Tiemo
>
>-Ursprüngliche Nachricht-
>Von: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] Im 
>Auftrag von J. Landman Gay
>Gesendet: Freitag, 12. Dezember 2014 19:22
>An: How to use LiveCode
>Betreff: Re: OT: Mac installer rights?
>
>On 12/12/2014, 10:08 AM, Tiemo Hollmann TB wrote:
>> My question to the Mac guys: What is the difference concerning
>writing
>> rights when the same user creates manually folders and files or lets 
>> an installer do that for him? Is there on Mac something similar as on
>
>> Windows like "run as Admin" to try to lift the user rights? Or is
>here
>> something completely messed up? I have never experienced this before.
>
>It is part of the Mac OS sandboxing, which prevents software from 
>writing files to locations outside of its own folders. This prevents 
>malware from writing to disk in areas it does not control.
>
>Except for certain drivers and extensions, OS X does not use 
>installers, and users do not expect one. The user simply drags the app 
>bundle to the applications folder. You can zip the app if you like, and 
>the user can unzip it and drag it into the folder. Or commonly apps 
>ship in dmg files (a virtual device image.) These are easy to create 
>with various Mac utilities such as Drop DMG. Most users are familiar 
>with dmg files.

-- 
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

AW: OT: Mac installer rights?

2014-12-13 Thread Tiemo Hollmann TB
Hi Mark,
yes it is signed.
Haven't noticed that option yet. I will try that the next time I build a new 
installer. By now I have a bulk of CDs on stock, where I have to find a 
solution at the customers site. Thank good, it is only one customer yet
Tiemo

-Ursprüngliche Nachricht-
Von: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] Im Auftrag von 
Mark Schonewille
Gesendet: Samstag, 13. Dezember 2014 18:17
An: How to use LiveCode
Betreff: Re: OT: Mac installer rights?

Hi Tiemo,

I assume your installer has been signed. Installer Maker's Help section is far 
from complete, but there is a suggestion there about starting the app with 
admin rights. You might try that.

--
Best regards,

Mark Schonewille

Economy-x-Talk Consulting and Software Engineering
Homepage: http://economy-x-talk.com
Twitter: http://twitter.com/xtalkprogrammer
KvK: 50277553

Installer Maker for LiveCode:
http://qery.us/468

Buy my new book "Programming LiveCode for the Real Beginner" 
http://qery.us/3fi

LiveCode on Facebook:
https://www.facebook.com/groups/runrev/

On 12/13/2014 18:02, J. Landman Gay wrote:
> The user probably has their security settings set to the default,  which 
> disallows installation except from the Mac App Store. The second level of 
> security allows third party installations but only if they are code signed. 
> The third level allows anything.
>
> You can tell the user to change the setting to allow installation from 
> anywhere,. For a novice user this can compromise the security of the machine, 
> so they may want to set it back to the default after installation.
>
> On December 13, 2014 5:10:00 AM CST, Tiemo Hollmann TB  
> wrote:
>> Hi Jacque,
>> thanks for your comments. That is funny, because I am using Mark  
>>Schonewilles Installer Maker since years without any problems and also  
>>with  this product it installs my LC prog as expected on all of my 
>>clients  Macs from OS X 10.5 to 10.10. This is the only one (on 
>>10.9.5), where this  phenomenon happened, so I think there must be 
>>something being messed up  on  the machine.
>> Tiemo
>>
>> -Ursprüngliche Nachricht-
>> Von: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] Im 
>> Auftrag von J. Landman Gay
>> Gesendet: Freitag, 12. Dezember 2014 19:22
>> An: How to use LiveCode
>> Betreff: Re: OT: Mac installer rights?
>>
>> On 12/12/2014, 10:08 AM, Tiemo Hollmann TB wrote:
>>> My question to the Mac guys: What is the difference concerning
>> writing
>>> rights when the same user creates manually folders and files or lets 
>>> an installer do that for him? Is there on Mac something similar as 
>>> on
>>
>>> Windows like "run as Admin" to try to lift the user rights? Or is
>> here
>>> something completely messed up? I have never experienced this before.
>>
>> It is part of the Mac OS sandboxing, which prevents software from 
>> writing files to locations outside of its own folders. This prevents 
>> malware from writing to disk in areas it does not control.
>>
>> Except for certain drivers and extensions, OS X does not use 
>> installers, and users do not expect one. The user simply drags the 
>> app bundle to the applications folder. You can zip the app if you 
>> like, and the user can unzip it and drag it into the folder. Or 
>> commonly apps ship in dmg files (a virtual device image.) These are 
>> easy to create with various Mac utilities such as Drop DMG. Most 
>> users are familiar with dmg files.
>

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Apple app upgrade advice

2014-12-13 Thread Ethan Lish
Hello,

I have a great deal of localization set in an iOS app and want to make sure I 
store it in the correct location so that it will persist a application upgrade. 


Is there any documentation to assist / provide guidance like;
- data stored on the stack will be lost with upgrades
- data stored in SQLite database will beif kept in the documents folder
- data stored in settings will be


Clearly data stored on a server can persist but I'm looking for local options 


E

—
Ethan@Lish.net240.876.1389
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

frequent crashes under 7.0.1-RC3

2014-12-13 Thread Dr. Hawkins
Is anyone else seeing these?  I haven't had this problem with any prior
release.

The only vaguely repeatable related event I've seen is that if I have an
inspector open and change a custom property, it crashes if a piece of code
tries to access that property before I leave the inspector.

Yet another way that livecode eats 10-15 minutes of each hour of
development . . .
-- 
Dr. Richard E. Hawkins, Esq.
(702) 508-8462
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: [ANN] homemade slider

2014-12-13 Thread Mark Smith
Excellent! Nice job Bernd. Thanks for doing this. 

Mark



--
View this message in context: 
http://runtime-revolution.278305.n4.nabble.com/ANN-homemade-slider-tp4686566p4686747.html
Sent from the Revolution - User mailing list archive at Nabble.com.

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


bug or feature in player filename?

2014-12-13 Thread Timothy Miller
I’m in version 6.7.0 on Macintosh. I’m not very good at searching for bugs, so 
it’s possible it’s a fixed bug.

If you set a player filename to an invalid filename, by hand or by script, the 
player seems to play the last valid filename entered, even though the invalid 
filename continues to display in the “source” field.

It wouldn’t happen very often by hand, because normally one clicks on the 
button next to the “source” field, to get a dialog box of filenames.

If you (I) don’t know about this, it can drive you (me) crazy when trying to 
figure out why a script isn’t working right.  To make the experience even more 
vexatious, the result is empty when you play the player, by click or script. If 
this is mentioned in the documentation, I can’t find it.

Bug or feature?

I tried to enter a note about this in the dictionary, but I don’t seem to be 
eligible to do that. Tried to log in or register, couldn’t manage it.

Comments?

Cheers,

Tim Miller
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Direction, and color

2014-12-13 Thread Mike Bonner
Thanks for the ideas and hints, some ideas finally triggered in my noggin
and I have a pretty good solution now.  Craig, yeah I love the idea. A
simple lookup table would work, especially since the motion of the objects
is a simple x,y thing, so a keyed array would make it simple.

I'm stubborn though, and want to generate a nice smooth transition (like my
own home built color wheel algorithm.)

The code (plus extra code that cycles the background color of a field just
to see the visual) follows.
-- constants for these.  Mainly so that if I want skewed colors like heavy
blue, I can tweak these.
constant kRed=255,kGreen=255,kBlue=255
on mouseUp

   repeat with i = 1 to 360 -- morph the color based on degrees
  put i mod 360 into tCurAngle
  put  round((colorshift(tCurAngle,0))* kRed) into tRed -- colorshift
function does all the work.

-- multiply the base color value by the factor returned from the colorshift
function
  put  round(( (colorshift(tCurAngle,240))) * kBlue ) into tBlue
  put round((colorshift(tCurAngle,120)) * kGreen) into tGreen
  set the backgroundcolor of field 3 to tRed,tGreen,tBlue
  wait 10 millisec with messages -- so you can more easily see the
changes

   end repeat
end mouseUp

-- this is the heavy lifting.  tcolorAngle is the angle that designates the
stronges
-- point of color intensity for that color. I've assigned, 0, 120, 240
function colorshift tCurAngle, tColorAngle
-- subtract tColorangle to "normalize"
-- then convert that angle to radians, which gives a factor between 0 and 1
-- which will then be used to adjust the color value itself
   put abs(sin((tCurAngle - tColorAngle) * pi / 180)) into tAdjustedAngle
   return tAdjustedAngle
end colorshift

>From there, it should be easy to adjust by velocity.  If initial values are
maxed at 200, that gives a 55 point per color scale that can be used for
intensity adjustments, which could be another factor multiplied uniformly
across all 3 rgb values.

I'm sure it can be simplified and cleaned up, but is working pretty well.

Thanks all for helping me get my head wrapped around this.

On Sat, Dec 13, 2014 at 12:32 AM, Mike Bonner  wrote:
>
> Hey!  Simple and easy, Thanks much, will try and get it working tomorrow.
>
> On Fri, Dec 12, 2014 at 11:27 AM, Richmond 
> wrote:
>
>> On 12/12/14 19:19, Mike Bonner wrote:
>>
>>> I have a quick question, its one of those that should be obvious, but i'm
>>> just not seeing it.
>>>
>>> What i'm playing with right now, is just a bunch of round grc moving on
>>> screen. (an adaption of the "swarm" sample stack created by scott rossi)
>>>   What I'd like to do, is modify the colors of of each ball based on
>>> direction and speed.  Sort of like a color wheel, zero speed or direction
>>> being the center of the wheel.  So, direction would affect color, and
>>> speed
>>> would affect the end color based on a gradient dark to light.
>>>
>>> I hope the explanation is clearer than mud.
>>>
>>> Any suggestions, or reading material that might help get me kickstarted?
>>>
>>> TIA
>>>
>>> Mike
>>> ___
>>>
>>>
>> I don't think that should be unduly difficult . . .
>>
>> For instance, one could leverage RGB codes so that, let us say, the
>> direction in degrees
>> could be signalled something like this:
>>
>> RRR= round (255/(360-DIR)
>> set the backgroundColor of grc "myFatBlob" to RRR,GGG,BBB
>>
>> where DIR is the direction in degrees, GGG is some number 0> so is BBB.
>>
>> Darkness could be worked out by having one's "Blobs" consist of a pair of
>> graphics (one on top of the other)
>> where the lower one is black. Speed could then be signalled by setting
>> the BLEND level of the top one.
>>
>> Richmond.
>>
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>
>
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Direction, and color

2014-12-13 Thread Mike Bonner
Oh, just realized, due to the normalization, I only needed to cycle 1 to
180 to get the full color chart. DOH.  360 repeats. (since its basically,
seeing "how far" from a point on the circumference, based on degrees, 180
is the cap, and the abs() stuff makes dealing with negatives moot. )


On Sat, Dec 13, 2014 at 8:24 PM, Mike Bonner  wrote:
>
> Thanks for the ideas and hints, some ideas finally triggered in my noggin
> and I have a pretty good solution now.  Craig, yeah I love the idea. A
> simple lookup table would work, especially since the motion of the objects
> is a simple x,y thing, so a keyed array would make it simple.
>
> I'm stubborn though, and want to generate a nice smooth transition (like
> my own home built color wheel algorithm.)
>
> The code (plus extra code that cycles the background color of a field just
> to see the visual) follows.
> -- constants for these.  Mainly so that if I want skewed colors like heavy
> blue, I can tweak these.
> constant kRed=255,kGreen=255,kBlue=255
> on mouseUp
>
>repeat with i = 1 to 360 -- morph the color based on degrees
>   put i mod 360 into tCurAngle
>   put  round((colorshift(tCurAngle,0))* kRed) into tRed -- colorshift
> function does all the work.
>
> -- multiply the base color value by the factor returned from the
> colorshift function
>   put  round(( (colorshift(tCurAngle,240))) * kBlue ) into tBlue
>   put round((colorshift(tCurAngle,120)) * kGreen) into tGreen
>   set the backgroundcolor of field 3 to tRed,tGreen,tBlue
>   wait 10 millisec with messages -- so you can more easily see the
> changes
>
>end repeat
> end mouseUp
>
> -- this is the heavy lifting.  tcolorAngle is the angle that designates
> the stronges
> -- point of color intensity for that color. I've assigned, 0, 120, 240
> function colorshift tCurAngle, tColorAngle
> -- subtract tColorangle to "normalize"
> -- then convert that angle to radians, which gives a factor between 0 and 1
> -- which will then be used to adjust the color value itself
>put abs(sin((tCurAngle - tColorAngle) * pi / 180)) into tAdjustedAngle
>return tAdjustedAngle
> end colorshift
>
> From there, it should be easy to adjust by velocity.  If initial values
> are maxed at 200, that gives a 55 point per color scale that can be used
> for intensity adjustments, which could be another factor multiplied
> uniformly across all 3 rgb values.
>
> I'm sure it can be simplified and cleaned up, but is working pretty well.
>
> Thanks all for helping me get my head wrapped around this.
>
> On Sat, Dec 13, 2014 at 12:32 AM, Mike Bonner  wrote:
>>
>> Hey!  Simple and easy, Thanks much, will try and get it working tomorrow.
>>
>>
>> On Fri, Dec 12, 2014 at 11:27 AM, Richmond 
>> wrote:
>>
>>> On 12/12/14 19:19, Mike Bonner wrote:
>>>
 I have a quick question, its one of those that should be obvious, but
 i'm
 just not seeing it.

 What i'm playing with right now, is just a bunch of round grc moving on
 screen. (an adaption of the "swarm" sample stack created by scott rossi)
   What I'd like to do, is modify the colors of of each ball based on
 direction and speed.  Sort of like a color wheel, zero speed or
 direction
 being the center of the wheel.  So, direction would affect color, and
 speed
 would affect the end color based on a gradient dark to light.

 I hope the explanation is clearer than mud.

 Any suggestions, or reading material that might help get me kickstarted?

 TIA

 Mike
 ___


>>> I don't think that should be unduly difficult . . .
>>>
>>> For instance, one could leverage RGB codes so that, let us say, the
>>> direction in degrees
>>> could be signalled something like this:
>>>
>>> RRR= round (255/(360-DIR)
>>> set the backgroundColor of grc "myFatBlob" to RRR,GGG,BBB
>>>
>>> where DIR is the direction in degrees, GGG is some number 0>> so is BBB.
>>>
>>> Darkness could be worked out by having one's "Blobs" consist of a pair
>>> of graphics (one on top of the other)
>>> where the lower one is black. Speed could then be signalled by setting
>>> the BLEND level of the top one.
>>>
>>> Richmond.
>>>
>>> ___
>>> use-livecode mailing list
>>> use-livecode@lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your
>>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>>
>>
>>
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode