Freebie New Year Countdown

FFGL, OSC, GLSL. If you like abbreviations, this is the forum for you
keshrath
Met Resolume in a bar the other day
Posts: 13
Joined: Tue Dec 29, 2015 12:37

Freebie New Year Countdown

Post by keshrath » Tue Dec 29, 2015 14:14

Hello,

I hope you all had a great Christmas and are looking forward to the New Year’s Eve party!

In case you need a countdown, I created a little Resolume plugin based on Spout.
Screenshot
Screenshot
The plugin renders a countdown which will end at the beginning of the New Year. After the timer has finished a predefined video starts to play.

The program will try to reach an NTP server to get the exact time. If the request fails, it will take your system time to calculate the countdown.

It is possible to change the font of the timer and the video. Just replace the font.vlw file in the data folder to change the font or the movie.mov to change the video.

Download: https://github.com/keshrath/Timer

Resolume controls:
  • Test Timer: (On/Off) - Starts a one minute test countdown.
  • Show Millis: (On/Off) - Determines if the countdown displays milliseconds or not.
  • Show Animation: (On/Off) - If the checkbox is set to active, the last 30 seconds will be rendered differently.
  • Loop Video: (On/Off) - If the checkbox is set to active, the the video will loop.
Requirements:
  • At least a Windows 7 64 bit version
  • ATI Radeon HD 5000 series or better (256MB of VRAM)
  • NVIDIA GeForce 210 or better (256MB of VRAM)
  • Java JDK 8 or later
  • Processing 3 or later
  • Spout 2
Installation:
  • Download the zip file
  • Extract the file
  • Copy the whole folder to -> C:\Users\User\Documents\Resolume Arena 5\presets\vfx
  • The folder structure should look like this:
    C:\Users\User\Documents\Resolume Arena 5\presets\vfx\NewYearCountdown\$files$
  • Start Resolume Arena 5
  • Drag the NewYearCountdown plugin from
    Sources -> FFGL Sources -> NewYearCountdown to any layer
  • Now you can use it like a normal Resolume source.
Make sure that the correct path is set.
Hint
Hint
Settings.jpg (24.27 KiB) Viewed 8242 times
Cheers to all,
Mathias
Last edited by keshrath on Sat Jan 23, 2016 18:07, edited 5 times in total.

Joris
Doesn't Know Jack about VJ'ing or Software Development and Mostly Just Gets Coffee for Everyone
Posts: 5180
Joined: Fri May 22, 2009 11:38

Re: Freebie New Year Countdown

Post by Joris » Tue Dec 29, 2015 16:20

Nice work.

Although it's a bit pedantic, since this plugin is only really used once a year, it's better to link file locations against the Res user folder in Documents, not the Res app folder in Applications. That way your user doesn't have to remember to copy it after updates.

keshrath
Met Resolume in a bar the other day
Posts: 13
Joined: Tue Dec 29, 2015 12:37

Re: Freebie New Year Countdown

Post by keshrath » Tue Dec 29, 2015 17:20

Thanks for the advice. I changed the post accordingly.

leadedge
Hasn't felt like this about software in a long time
Posts: 102
Joined: Fri Feb 14, 2014 13:58

Re: Freebie New Year Countdown

Post by leadedge » Wed Dec 30, 2015 15:17

This is excellent work. I think I will start it up and let it count down..

I had not considered the presets folder before, so thanks for that Joris.

But maybe I might mention something here. I have had trouble installing on top of another installation i.e. an "upgrade" and all the media is missing and I have to un-install and install again.

So the folder "C:\Users\User\Documents\Resolume Arena 5\presets\vfx\" would be erased anyway. Or is it not? Maybe this has something to do with it. I don't know but I should mention it.

Also I hope you all realise what is happening here. This is not a plugin as such, but a Spout plugin that allows a Processing sketch to start as if it was a plugin. I wonder at it most of the time. Lots of potential like Mathias has done. More potential with Openframeworks and Cinder I think and I am working on that.

leadedge
Hasn't felt like this about software in a long time
Posts: 102
Joined: Fri Feb 14, 2014 13:58

Re: Freebie New Year Countdown

Post by leadedge » Sun Jan 03, 2016 08:13

A few things showed up with this, so I will see if they can be resolved within the plugin.

First I needed to copy all the dll files in the "code\windows64" sub-folder to the location of Arena.exe.

The caption was being used to display fps, so the plugin could not find the sketch window. Remove the line "surface.setTitle("FPS:" + frameRate);" and check that the sketch works before using the plugin.

If an Explorer window is open to the sketch folder, it has the same name as the sketch so it won't start. If that happens, delete from the cell and try again. To begin with there was a server connection problem, but after a couple of tries it started OK. So now it will count down to next year.

All the best to everyone for the new year..

Joris
Doesn't Know Jack about VJ'ing or Software Development and Mostly Just Gets Coffee for Everyone
Posts: 5180
Joined: Fri May 22, 2009 11:38

Re: Freebie New Year Countdown

Post by Joris » Mon Jan 04, 2016 17:25

But maybe I might mention something here. I have had trouble installing on top of another installation i.e. an "upgrade" and all the media is missing and I have to un-install and install again.

So the folder "C:\Users\User\Documents\Resolume Arena 5\presets\vfx\" would be erased anyway. Or is it not? Maybe this has something to do with it. I don't know but I should mention it.
"C:\Users\User\Documents\Resolume Arena 5\presets\vfx\" is not erased. Nothing in User\Documents\Resolume Arena 5\ is ever erased. This is the user folder and contains user preferences that are maintained between updates. For instance \presets\vfx\ contains effect presets that the user added (via Effect > Preset > Save as).

All the example media is kept in Applications. This app folder does not get replaced either, instead a new one is added next to it. Of course this could mean that relative links based on the app path go missing, because you are loading a new app from a new location.

In general, it's best practice to add any custom 3rd party things in their own folder inside Documents\Resolume Arena 5\.

For instance, we recommend to place 3rd party FFGL plugin in a folder called 'extra effects' inside Documents\Resolume Arena 5\, and to add this folder as an extra FFGL folder via the Preferences.

leadedge
Hasn't felt like this about software in a long time
Posts: 102
Joined: Fri Feb 14, 2014 13:58

Re: Freebie New Year Countdown

Post by leadedge » Tue Jan 05, 2016 14:56

OK I will try to reproduce the problem and look at what is in these folders. It isn't that things are erased but that a new installation on top of an old one came up with no media in the cells.

Also a useful folder for Freeframe plugins is "Program Files\Common Files\Freeframe" which is then common for other programs that use it.

keshrath
Met Resolume in a bar the other day
Posts: 13
Joined: Tue Dec 29, 2015 12:37

Re: Freebie New Year Countdown

Post by keshrath » Wed Jan 06, 2016 21:28

leadedge wrote: First I needed to copy all the dll files in the "code\windows64" sub-folder to the location of Arena.exe.
Hmm, well that's interesting. The dll files are used by the processing video library, but I tested the plugin on several computers and it worked without copying the files.
leadedge wrote: The caption was being used to display fps, so the plugin could not find the sketch window. Remove the line "surface.setTitle("FPS:" + frameRate);" and check that the sketch works before using the plugin.
Hm, I never had that issue either. I know that you get problems if the explorer window is open, while you try to open the plugin, but I thought that the plugin looks for the name you insert into the initSender method.

-> spout.initSender(SPOUT_NAME, width, height);

One more thing: Are you using the first 5 letters for the plugin ID? I created two plugins with both started with the string "Sound..." and only one was shown in Resolume. But after I changed the name, both plugins were listed in Resolume.

keshrath
Met Resolume in a bar the other day
Posts: 13
Joined: Tue Dec 29, 2015 12:37

Re: Freebie New Year Countdown

Post by keshrath » Wed Jan 06, 2016 21:45

I reworked the countdown a bit to make it more useful. Now it's possible to insert any date or time and start the countdown.

More on Github (https://github.com/keshrath/Timer)

leadedge
Hasn't felt like this about software in a long time
Posts: 102
Joined: Fri Feb 14, 2014 13:58

Re: Freebie New Year Countdown

Post by leadedge » Thu Jan 07, 2016 03:57

Yes the dll dependency is a strange one. Arena certainly complains until the dlls are put in the same folder. I am not sure why. Just to check, I removed them and the missing dll messages come back. I have the same problem with dlls required for openframeworks. Maybe the path to the dlls is set somehow on your machine. Could this be done when you load a library in the sketch? Not sure of how this is managed by the Processing command line.

Because of the delay in starting a sketch, the plugin checks for the presence of the sketch window itself using the FindWindow function which takes a caption name. If the caption is different it will still seem to work OK but will not Show or Hide the window, and if you hit "open" it will start the sketch again.

Freeframe has an ID for each plugin and Resolume checks it for duplicates. Because we have several copies of the same thing, they require unique IDs. But Freeframe allows only 4 unique characters to identify a plugin, so the first 4 characters of the sketch or folder name are used. So if you try "mySketch1" and mySketch2" they will have the same ID "mySk" and only one of them will show up. I haven't documented that. Also the plugin name is limited to 16 characters but that is documented.

Post Reply