Resource centre for ZX Spectrum games
using Manic Miner and Jet Set Willy game engines
Archive of the
Manic Miner & Jet Set Willy Yahoo! Group
messages
|
|
||
|
|
Message: 7285
Author: rushforthian
Date: 11/12/2020
Subject: Re: Manic Miner: Format of title-screen tune
Further to the message thread below, if you want to generate a pure-tone note in a Manic Miner title-screen tune, then the two pitch values for that note should be selected such that they are separated exactly by a factor of 2. The pitch of the note that is played will then be the lower of those two pitches (i.e. numerically the highest of the two chosen pitch values).
e.g. for a pure tone Middle C note* in a MM title-screen tune, select values of 128 and 64 (a.k.a. #80 and #40 in hex) for the second and third notes in the triple of bytes assigned to that note (the order in which you put those two bytes doesn't seem to make a difference.) [Reminder: the first value in the triple of bytes corresponds to the duration of the note, which can hold any value other than 255/#FF.]
(*According to Richard Hallas's tone chart in his 'A Miner Triad' document, Middle C is usually represented in an in-game tune by a value of 128, or #80 in hex.)
N.B. This technique appears to have been discovered at some point by Dr Andrew Broad, because he utilised it in the rendition of 'Moonlight Sonata' in his conversion of Jet Set Willy to the Manic Miner game engine (released as part of the Party Willy box-set). However, I haven't managed to find any record of Andrew ever having reported on this discovery, either in this message group, on jswmm.co.uk or in any of his Readme files. (Please correct me if I'm wrong on that point, Andrew!)
P.S. I provided a detailed explanation of how this trick works in generating a pure tone note (in terms of the workings of the MM title-tune routine) in the following post over on the jswmm.co.uk site:
http://jswmm.co.uk/topic/539-title-screen-tunes-for-andrew-broads-jsw-mm-and-mm-jsw-conversions/?tab=comments#comment-11909
Ian
From: manicminerandjetsetwilly@yahoogroups.com <manicminerandjetsetwilly@yahoogroups.com> on behalf of Ian Rushforth [manicminerandjetsetwilly] <manicminerandjetsetwilly@yahoogroups.com>
Sent: 03 October 2018 13:25
To: manicminerandjetsetwilly@yahoogroups.com <manicminerandjetsetwilly@yahoogroups.com>
Subject: [Manic Miner and Jet Set Willy] Re: Manic Miner: Format of title-screen tune
Andrew wrote:
> As in the in-game tune, each pitch is represented according to Richard Hallas's tone-chart (I have not
> researched the effects of values 0 and 255).
They both yield notes of extremely low pitch.
> But the two pitches must be different, otherwise no sound is heard (this can, of course, be exploited
> deliberately to introduce rests). If only one note is to be played, the standard solution is to set the third byte to > the value of the second byte plus one, e.g. 128, 129.
The reason why no note is heard if you attempt to play two notes of identical pitch, is because the timing of execution of the XOR #18 command [at #9300] when the first note's pitch counter (the D register) reaches zero, is exactly coincident (happens during the same pass through the Title Tune routine's inner loop) with the execution of the XOR #18 command [at #9308] when the second note's pitch counter (the E register) reaches zero. So bits 3 and 4 of A are flipped and flipped back again, before the signal from A is sent to the speaker port. As a result, the speaker diaphragm is not flipped at all for the whole duration that this pair of identical notes is played!
