[comp.sys.amiga] A bug in MUSIC-X ??

paul2@cs.exeter.ac.uk (Paul Day) (08/20/90)

	 	A Possible bug in music-X ??

I was asked to help a friend who had problems with his amiga and DX-21
synth. The problem was that when he transferred voices from the synth
to the amiga he lost 1 (one !) byte of information - which was always
00. This byte of information corresponded to PEG RATE 1.

There was no reason for a single byte to be lost, the rest of voice
information was being sent OK. I eventually dug around using the
GENERIC (HEX) patch editor supplied with the music-X. The byte that
was vanishing turned out to be the byte _immediately_after_ the string
of ascii representing the name of the voice.

This made me suspicious ... I looked at the protocol, expecially
paying attention to the voice offset and voice length. I then changed
the voice length to 9 (instead of 10). Voila !! the missing byte was
no longer missing.

Further experimentation showed that the byte immediately after the
voice information was ALWAYS set to 00 (the null byte ....). If I set
the voice length to 5 then the byte after the 5 voice byte was 00, and
so on.

I think the bug occurs because the software is copying a C string (10
chars + null byte) into the voice starting at the voice offset, and
finishing on the place earmarked for PEG RATE 1. This is probably a
side effect of being able to edit the voice names directly from the
librarian page. When the voice name is read and written back by
music-X the PEG RATE info is overwritten by the null byte at the end
of the string.

The fix is a pure kludge -- i.e. modify the protocol to use one less
characters in the voice name. This restricts you to voice names of
only 9 characters or less, but enables you to recieve PEG RATE info.

Questions:

i) has anyone else come across this problem ??
ii) is this bug really a feature ??  (i.e. perhaps my friend and I are
the ones with bugs -- in our wetware)
iii) is there any other fix? -- I *HATE* kludgey fixes unless they
fall into the 'neat hack' category - this one doesn't
iv) can I report this bug to the music-X people via e-mail

Thanks, one and all !! -- Paul

========== "Fondling their share certificates with the lust of fools" =========
--
Paul Day, Centre for Connection Science,   |  VOICE   (0392) 264066 
Computer Science Dept, University of       |  JANET   paul2@exeter.cs
Exeter, Exeter, Devon, England.            |  UUCP    paul2@expya.uucp
================  BITNET:paul2%cs.exeter.ac.uk.@UKACRL  =================