Once you have published a score, Sibelius Cloud Publishing allows you to
generate views of your score that you can display to your customers in their
web browser. Each view may be customised to your needs using the SCP API.
Assuming you have already published a score, the next
step is to generate a view of that score.
Let’s assume you have published a score and it has been assigned the unique ID
of 5adf7fc7-68b0-478f-ab08-3ecec0ab297c
.
1 | GET /apis/avid.sibelius.publishing;version=2;realm=global/scores/5adf7fc7-68b0-478f-ab08-3ecec0ab297c/view |
The API will return something like this to you (note, most of the response has
been truncated here for clarity):
1 | { |
Now, you may open the viewerUrl that is returned to you in any web browser
(or on any mobile device) and the score you published will be displayed.
Note that the viewerUrl expires automatically after 2 hours, so after that
time you’ll find that it stops working - that’s intentional! The idea is that
you request a new view of the score every time you wish to display it, thus
keeping your score secure.
The viewer URL
The viewer URL is a unique pointer to your score. It automatically
expires after two hours by default.
The viewer URL may then be embedded in your existing web site, in an<iframe>
which then appears as an interactive score that your user may then
view, navigate, play back and print.
When you generate a new view of your score, you may also specify various
settings relating to how your score should be displayed. For example, you may
request a view of your score that only displays the first page of your score -
very useful for creating a digital shop front, whilst ensuring that the complete
work is only available to paying customers.
Viewer URLs are intended to be single use - you generate a new one every
time you want to display your score to a customer. Since they expire
automatically, you don’t need to worry about that viewer URL falling into the
wrong hands.
Customising your viewer
One of the most powerful features of Sibelius Cloud Publishing is the ability to
customise your customer’s experience on a per-view basis. For example, you
may decide to present just the first page of your score to your customers before
they have paid for it. Or you may wish to limit printing.
Specifying a custom page range
By default, all pages in your score are displayed. However, you may limit
the pages that are displayed to your user using the pages
parameter. For
example, this request would create a view of just the first page of your score:
1 | GET /apis/avid.sibelius.publishing;version=2;realm=global/scores/5adf7fc7-68b0-478f-ab08-3ecec0ab297c/view?pages=1 |
The pages parameter is quite clever - you can specify multiple pages, or
page ranges (or a mixture thereof). For example:
1 | GET /apis/avid.sibelius.publishing;version=2;realm=global/scores/5adf7fc7-68b0-478f-ab08-3ecec0ab297c/view?pages=1-3,5-9,14 |
The request above would give you pages 1 to 3, 5 to 9 and 14. Perhaps a
slightly extreme example, but it demonstrates the flexibility available to you.
Printing
You can enable printing by setting the printable
parameter to true
:
1 | GET /apis/avid.sibelius.publishing;version=2;realm=global/scores/5adf7fc7-68b0-478f-ab08-3ecec0ab297c/view?printable=true |
You could even use the printable
parameter in conjunction with the pages
parameter to allow your users to try out printing with a limited sample of your
music.
License string
You can embed a custom piece of text, known as a license string, on a per-view
basis into your score. The text will be displayed as a footer on your score.
It’s intended as a watermark for licensing information, hence the name of the
parameter, but you can use it for any purpose. The idea is that it serves as
an, admittedly fairly light, deterrent to photocopying and distributing a
printed copy of your score
1 | GET /apis/avid.sibelius.publishing;version=2;realm=global/scores/5adf7fc7-68b0-478f-ab08-3ecec0ab297c/view?licenseString=Licensed%20to%20Joe%20Bloggs |
Specifying a custom viewer expiry date
By default, a viewer URL automatically expires after 2 hours. You can
customise this behaviour using the expiresIn
parameter, which accepts a value
in seconds for the viewer URL to live (TTL):
1 | GET /apis/avid.sibelius.publishing;version=2;realm=global/scores/5adf7fc7-68b0-478f-ab08-3ecec0ab297c/view?expiresIn=86400 |
The example above creates a viewer that lasts for 24 hours
(60 seconds * 60 minutes * 24 hours = 86400).