Generate random number?

Discuss D-Pro Python macro programming, and post any new macros here!
rad3d
Posts: 160
Joined: Tue Nov 27, 2012 4:28 pm

Generate random number?

Post by rad3d »

Is there any way to generate a random integer within a macro? I noticed the 'random.py' library, but it's functions don't seem to be available.
ChrisDuncan
Posts: 379
Joined: Sat Sep 14, 2013 9:35 pm
Location: Atlanta GA / USA / Earth / Milky Way / The 'Verse
Been thanked: 1 time

Re: Generate random number?

Post by ChrisDuncan »

Just so you know, while I've been coding for decades, I'm relatively new to python. That said, what do you mean when you say unavailable? I can see random.py in the python folder. Is it giving you an error message of some sort when you make calls?
Christopher Duncan
Author of
Have Fun, Get Paid: How to Make a Living With Your Creativity
http://www.ChristopherDuncan.com
ChrisDuncan
Posts: 379
Joined: Sat Sep 14, 2013 9:35 pm
Location: Atlanta GA / USA / Earth / Milky Way / The 'Verse
Been thanked: 1 time

Re: Generate random number?

Post by ChrisDuncan »

Sorry, just realized this was posted last year. My bad.
Christopher Duncan
Author of
Have Fun, Get Paid: How to Make a Living With Your Creativity
http://www.ChristopherDuncan.com
rad3d
Posts: 160
Joined: Tue Nov 27, 2012 4:28 pm

Re: Generate random number?

Post by rad3d »

Hey Chris -

I ended up getting this to work. But, I believe I needed to change something within the DMXIS config at the time. Don't remember what, though. Possible this issue has changed with more recent versions of DMXIS.
ChrisDuncan
Posts: 379
Joined: Sat Sep 14, 2013 9:35 pm
Location: Atlanta GA / USA / Earth / Milky Way / The 'Verse
Been thanked: 1 time

Re: Generate random number?

Post by ChrisDuncan »

Ah, thought you'd started using D-Pro since this is their forum. I'm just now getting my feet with it and working through the learning curve of the app. The python stuff is still pretty straightforward, though, including the ability to add UI widgets for effects. Pretty cool.
Christopher Duncan
Author of
Have Fun, Get Paid: How to Make a Living With Your Creativity
http://www.ChristopherDuncan.com
rad3d
Posts: 160
Joined: Tue Nov 27, 2012 4:28 pm

Re: Generate random number?

Post by rad3d »

Ah - you just reminded me that I was looking for this for D-Pro! Didn't bother looking at the board name.

Yup - the move to D-Pro has been good. A different take on how I needed to approach things - though still miss a few things about DMXIS (Sound Tracker).
ChrisDuncan
Posts: 379
Joined: Sat Sep 14, 2013 9:35 pm
Location: Atlanta GA / USA / Earth / Milky Way / The 'Verse
Been thanked: 1 time

Re: Generate random number?

Post by ChrisDuncan »

After a year of prep work, I finally did the first production song last week in Dmxis. It took me 20 hours, and that was aided by the 5,000 selection menu macros I'd created. And I really wasn't doing anything that spectacular.

So, I bought Dpro. From the looks of it, once I get past the initial learning curve, what took me 20 in Dmxis will probably take me 2 in Dpro. Groups and pallets alone are worth the price of admission.

While most of it is making sense, there are a couple of things that I thought would be simple, like moving an R2 from point A to point B over 5 seconds, that instead are stumping me. Dave and Jeremy are always quite helpful, but they're also always quite busy. If you're up for sharing your expertise, here's a couple of questions I have at the moment.

If given up on cue timing, but skip down to my post starting with "To make sure I can execute basic maneuvers..." to see the problems I'm having moving an R2 over time.
(But if you know the answer to the cue list fade times, I'd still like to know how to work it.)

Fading a position:
http://forums.dmxis.com/viewtopic.php?f=11&t=1270

Maxing out the number of midi notes available for show triggers:
http://forums.dmxis.com/viewtopic.php?f=11&t=1272

Would appreciate any insights you might have.
Christopher Duncan
Author of
Have Fun, Get Paid: How to Make a Living With Your Creativity
http://www.ChristopherDuncan.com
Post Reply