Skip to content

forScore

forScore is a sheet music reader for iPad, iPhone, and Mac. Protocol Launcher allows you to generate forScore URL scheme links.

Usage

There are two ways to use this library:

  • On-Demand import from subpaths enables tree-shaking and keeps bundles small.
  • Full Import from the root package is convenient but includes all app modules.

Pick On-Demand for production builds; Full Import is fine for quick scripts or demos.

Select Installation Method

On-Demand
Recommended. Optimized for production.
Full Import
Convenient. Good for quick scripts.

Open

forScore documents forscore://open with at least one of path, score, setlist, or page. bookmark is optional and only applies when a score is referenced. When both path and score are supplied, forScore gives path precedence.

On-Demand
ts
import { open } from 'protocol-launcher/forscore'

const scoreUrl = open({
  path: 'My Score.pdf',
})

const setlistUrl = open({
  setlist: 'My Setlist',
  score: 'My Score',
  bookmark: 'My Bookmark',
  page: 3,
})

Service

forScore documents forscore://service with a required type. Dropbox and Box can include a starting path; content providers do not support paths.

On-Demand
ts
import { service } from 'protocol-launcher/forscore'

const dropboxUrl = service({
  type: 'dropbox',
})

const dropboxPathUrl = service({
  type: 'dropbox',
  path: 'Directory/Subdirectory',
})

const prestoUrl = service({
  type: 'presto',
})

Action

forScore documents forscore://action for relative navigation changes such as moving to the next page, next item, going back, or showing now playing.

On-Demand
ts
import { action } from 'protocol-launcher/forscore'

const url = action({
  type: 'nextitem',
})

Generated URLs

ts
open({ path: 'My Score.pdf' })
// => 'forscore://open?path=My%20Score.pdf'

open({ setlist: 'My Setlist', score: 'My Score', bookmark: 'My Bookmark', page: 3 })
// => 'forscore://open?setlist=My%20Setlist&score=My%20Score&bookmark=My%20Bookmark&page=3'

service({ type: 'dropbox' })
// => 'forscore://service?type=dropbox'

service({ type: 'dropbox', path: 'Directory/Subdirectory' })
// => 'forscore://service?type=dropbox&path=Directory%2FSubdirectory'

service({ type: 'presto' })
// => 'forscore://service?type=presto'

action({ type: 'nextitem' })
// => 'forscore://action?type=nextitem'

Official Documentation