Section Play

Play utility functions: play the score, play a sound...

Summary

Return typeFunction and summary
 PlayFromBar(Score score, int barNumber, boolean showKaraoke, boolean scrollMusic, boolean followMusic, int metronomeBars)
Start playing music from specified bar.
 PlayNote(Symbol symbol)
Plays a note, shortcut and fix for Staff.PlayNotes().

Functions

PlayFromBar(Score score, int barNumber, boolean showKaraoke, boolean scrollMusic, boolean followMusic, int metronomeBars)

Start playing music from specified bar.

Target.PlayMusic() is bogus; here is a work-around.

ParameterTypeDefaultDescription
scoreScore The score to play
barNumberint The bar to start from, could be Target.Bar
showKaraokebooleanuser prefsDisplay karaoke if score has lyrics?
scrollMusicbooleanuser prefsScrolls the score while playing?
followMusicbooleanuser prefsOpen follow tune dialog?
metronomeBarsintuser prefsNumber of metronome bars to play before the music
Usage

PlayFromBar(FrontScore(), 2)

PlayNote(Symbol symbol)

Plays a note, shortcut and fix for Staff.PlayNotes().

Play only one note (the symbol parameter), in its context (tempo at its Time position), duration, velocity and pitch. Fix the no-sound bug when pitch==0 on grid drum staves.

ParameterTypeDefaultDescription
symbolSymbol (note) to play