Section Play

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

Summary

Return typeFunction and summary
 PlayFromBar(Score score, int barNumber, bool showKaraoke, bool scrollMusic, bool 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, bool showKaraoke, bool scrollMusic, bool 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
showKaraokebooluser prefsDisplay karaoke if score has lyrics?
scrollMusicbooluser prefsScrolls the score while playing?
followMusicbooluser 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