From 7ab051f06ac6e57c0480a1b32fe7805dcff8894c Mon Sep 17 00:00:00 2001 From: David Schmenk Date: Thu, 2 Nov 2017 13:07:11 -0700 Subject: [PATCH] Update the documentation for seqplay usage --- src/mockingboard/seqplay.pla | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/mockingboard/seqplay.pla b/src/mockingboard/seqplay.pla index 4f7fd48..202c74e 100755 --- a/src/mockingboard/seqplay.pla +++ b/src/mockingboard/seqplay.pla @@ -844,6 +844,12 @@ musicPlay(trackPtr, trackRepeat) Params: Pointer to a track sequence created from the cvtmidi.py tool Repeat flag - TRUE or FALSE. + The first time its is called, it will try and search for a MockingBoard. + However, it is noted that this can cause problems if a Z-80 card is installed. + The scanning routine might cause a hang if it encounters a Z-80 card before + it finds a MockingBoard. In order to make this robust, it might be best to + prompt the user to search for the MockingBoard, enter the actual MockingBoard + slot, or skip the MockingBoard and use the internal speaker. musicStop() Stop playing a track sequence in the getUpperKey routine @@ -872,3 +878,20 @@ spkrPWM(samples, speed, len) Pointer to 8 bit pulse width samples Speed to play through samples Length of sample + +The main routines for sequencing music are: + +mbSequence(yield, func) +spkrSequence(yield, func) +noSequence(yield, func) + + All three try and provide more functionality than would be present in + previous music sequencers. The MockingBoard sequencer will attempt to play up + to 9 tones per sound generator (18 if a MockingBoard II is found). Up to + four notes will be played simultaneously on the internal speaker. In order + to play more notes than the hardware normally supports, a technique using + arpeggio (playing multiple notes in a quick sequence rather than concurrently) + pulls off this feat. The sequencers will immediately return if a keypress is + detected. Finally, during the sequencing, a background function can be periodically + called every 'yield' time which has a resolution of a 16th of a second. Pass + in zero for 'yield' and/or 'func' to disable any background calls.