Firstly, although this is rather similar to @rank13’s excellent GPSelector extension, this one is much more of a technology demonstration with the source code fully available.
The purpose of this example project is to illustrate how to build a Gig Performer extension using HTML, CSS and JavaScript to build the UI as opposed to a system like JUCE or creating graphical elements long-hand in C++ code. Instead, you create a single HTML page whereby you can bind pseudo-functions within JavaScript to C++ functions in your code that can, in turn, access the GigPerformer API. It is a “Hello World” type extension to show what is possible as a starting point. What the extension actually does is to pop-up a window that displays the current set list in a touchscreen friendly format allowing you to easily select songs from list (by touching the song name) and GigPerformer will switch you to that song.
The intention is to give you a boiler-plate starting point to write your own extensions using HTML and JavaScript for the front-end alongside C++ for the back end. It illustrates the basic techniques for 2-way binding of functions within the C++ code of the back-end to functions embedded within the JavaScript code of the front-end. It is my hope that it will enable more developers get into creating GigPerformer extensions where they can leverage the knowledge they already have of HTML, CSS and JavaScript for the UI and only need to delve into C++ coding for the actual interaction with the GigPerformer API.
In its current state it requires Gig Performer v 4.7, but could be adapted back to work with v4.5 with some code tweaks.
The code can be viewed and downloaded from GitHub here:
FULL DISCLOSURE:
I will shortly be offering a powerful advanced paid-for version of this extension with much more capability aimed at users who regularly go “off script” from the intended set list or who, like me, don’t use a set list at all.
@npudar It is for v4.7 and above only as it uses a new API function to get the artist name for the list. Some one could adapt it back to v4.5.x by changing the GIT TAG of the GigPerformer SDK to reference a v4.5 compatible release of the SDK and not use getArtistName(). I’ll update the original post to state GP v4.7 required.
I have now added a new branch to the GitHub repo (named compatible_v4.5) that should work with GP v4.5.x albeit without the ability to get the artist name for each song.
Just in case anyone may have been looking at the code in this repo, be aware I am going to be switching away from the Saucer WebView type library to a new one that better handles cross platform creation, in my case making this Windows only version code work on a Mac too. Hopefully the repo will be updated over the next few days.
The choc WebView library functionality looks interesting. Do you happen to know whether that will handle displaying a pdf file?
Off and on over the past several years I’ve wanted to have something in pdf format display in a controllable GP window, but every time I go down that path I give up very shortly after getting started.