29th Apr 2019, 6:22 pm | #1 |
Octode
Join Date: Apr 2018
Location: Newbury, Berkshire, UK.
Posts: 1,287
|
Micro music box project.
For a long time now I've been trying to locate any information about a music box project that I saw in ETI, Practical Electronics or possibly Everyday Electronics years ago, probably in the late 70's/early 80s. It was a microprocessor based music box that composed its own tunes algorithmically. I believe it was based around an SC/MP or possibly CDP1802 processor. I don't recall it being particularly complex but the article did go into some detail about how the music was composed.
While I have no musical talent whatsoever I have always had a fascination with the idea of generating "music" with a computer, and would love to find this article. I seem to recall the cover of the magazine was pale yellow with a picture of the music box in the middle if thats any help! I've started looking through the magazines on the "American Radio History" archive ( https://www.americanradiohistory.com/ ) but as this may take some time given the only vague idea I have as to what magazine and what year it was this is going to take time, so any hints from others who may recall it or have stumbled across it would be great! Any pointers to similar projects would be welcome too! |
29th Apr 2019, 6:45 pm | #2 |
Nonode
Join Date: Jan 2016
Location: Stafford, Staffs. UK.
Posts: 2,532
|
Re: Micro music box project.
Can't help with the project link, I'm sorry. But while at school in a music lesson we were taught some basic rules of composition. Can't remember much but it was thing like never moving more that a couple of notes up or down in a jump. I programmed a VIC20 with some of the basic rules and it was suprisingly musical, in spite of no recognisable tune and no phrasing / timing rules. I think I still have the cassette with VICPIN (VIC piano) on it!
|
29th Apr 2019, 11:00 pm | #3 |
Octode
Join Date: Apr 2018
Location: Newbury, Berkshire, UK.
Posts: 1,287
|
Re: Micro music box project.
Thats interesting If you ever manage to get the program off the tape I'd love to see it.
I've done some experiments in the past generating random melodies and transposing or reversing sections that were ... interesting! I wouldn't say they were great. I have tried to little avail to get my laptop to play notes through the midi synthesiser on the sound card from Python, but despite it being proclaimed easy I can't get a peep from it. I also used to have a program called "Band in a box" that you could type chord progressions into and it wpuld synthesise an accompaniment and drums which isn't quite what I wanted but fun to play with. I will probably end up getting one of my old Atari 7800XLs or my C64 to work and try again using that - at least from BASIC you could get notes to come out! But I still would like to find that article because if it was SC/MP based I have a number of "spare" SC/MP chips just looking for a use! |
29th Apr 2019, 11:41 pm | #4 |
Octode
Join Date: Apr 2018
Location: Newbury, Berkshire, UK.
Posts: 1,287
|
Re: Micro music box project.
Good news, I've found it in the Feb 1979 issue of ETI.
https://www.americanradiohistory.com...1979-02-79.pdf The cover of the magazine was nothing like I remembered it but I spotted it on the list of projects. It's called "Twonky" which I imagine is intended to reflect what the tunes sound like..... Looks like an ideal breadboard project to me! |
29th Apr 2019, 11:51 pm | #5 |
Dekatron
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,577
|
Re: Micro music box project.
...Page 79, for anyone with less patience than me.
That same issue also contains a one page editorial obituary for John Miller-Kirkpatrick, who was mentioned in other recent threads. (Page 60). |
30th Apr 2019, 12:08 am | #6 |
Octode
Join Date: Apr 2018
Location: Newbury, Berkshire, UK.
Posts: 1,287
|
Re: Micro music box project.
There's a review/article on the SCRUMPI3 in the Oct 78 edition of ETI as wel.
The Twonky article points out that with a few mods the twoky program could be made to work on an MK14, if you made a PRBS generator and speaker circuit and hooked them up saving the trouble of working out the schematic that has no pin numbers or PCB layout.... I think I might try that put, will make for a good MK14 project now I have one! |
30th Apr 2019, 9:00 am | #7 |
Dekatron
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,577
|
Re: Micro music box project.
Once you have it working 'on board' maybe try modifying it to send out the equivalent MIDI notes instead, that's another exercise I had in mind, to try modifying the MK14 manual 'Music Box' program to send its notes out via MIDI.
(It sounds as though you have interests in electronic music and therefore possibly a MIDI instrument or two). |
30th Apr 2019, 8:38 pm | #8 |
Octode
Join Date: Mar 2019
Location: Barry, Vale of Glamorgan, Wales, UK.
Posts: 1,364
|
Re: Micro music box project.
I had found the Twonky article and filed it to go back later the other week at that time I also found in the May 1979 issue there is a news item that music it produced was due to be used as the theme tune on the BBC - they also mention that the Tolinka Chess (also SC/MP based) was on Blakes 7!
There is a random number circuit in Computing Today June 1979 Page 69 - the sample game is in Z80 but, the circuit is contemporary. http://www.flaxcottage.com/ComputingToday/7906.pdf I did see one in Practical Electronics as well and thought - oh that is interesting but, did not save the reference... |
25th May 2019, 6:29 pm | #9 |
Tetrode
Join Date: May 2019
Location: Reading, Berkshire, UK.
Posts: 51
|
Re: Micro music box project.
That copy of ETI was part of a box-load that I shipped to the owner of American Radio History in the USA two years ago. It cost me about £50 but save me keeping them in my loft! I was pleased to see the link to the Computing Today scans - sad to say I binned all my copies years ago.
Neal |
27th Jun 2019, 12:41 am | #10 |
Dekatron
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,577
|
Re: Micro music box project.
Thanks to Timbucus's discovery of / suspected involvement in the uploading online of those old issues of the MK14 user group newsletter 'Complement And Add', we now have the necessary changes, as published by Geoff Philips, to make the ETI 'Twonky' code run on an MK14, on this page:
https://archive.org/details/Compleme...Issue2/page/n7 The original 'Twonky' code (to which these changes have to be made) is on magazine page 81 of the ETI issue Slothie linked to in post #4 of this thread. The MK14 version also requires an independent square wave oscillator (a 555?) to be running into the SC/MP Sense-B input. |
27th Jun 2019, 3:05 am | #11 |
Octode
Join Date: Apr 2018
Location: Newbury, Berkshire, UK.
Posts: 1,287
|
Re: Micro music box project.
That's interesting, thanks for digging that up! I'd got stuck because I knew I'd have to put in a couple of extra instructions to correct the index registers but my SC/MP skillz where not mad enough to work out how without making the code any longer.
I've typed in and corrected the assembly code to work with SBASM so I'll see what these changes involve! Once I get my uploader finished I'll be able to try it out. |
8th May 2023, 1:16 pm | #12 |
Octode
Join Date: Mar 2011
Location: North Yorkshire, UK.
Posts: 1,119
|
Twonky again
Did anyone manage to get Twonky running? if so is it very effective?
I was thinking if you were to add a software prsg... it might run on the PICL? Cheers Phil Last edited by Station X; 8th May 2023 at 1:58 pm. Reason: Threads merged. |
8th May 2023, 8:25 pm | #13 |
Dekatron
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,577
|
Re: Micro music box project.
No, but this might get everybody kick-started - the original TWONKY code in SBASM3 .ASM format. Because .ASM is not an allowed attachment type, I have put it into a .ZIP file.
Assembles with one warning - 'code begins at page boundary' - the instruction at 0000 is a NOP and is never executed. Notes: -There is no .OR (Origin) directive in the .ASM code so the code currently assembles to reside in ROM at 0000, as originally intended by the author. This code will need to be further modified as per Geoff's instructions in the COMPLEMENT AND ADD issue linked to in #10 before it will run on an MK14. I believe the modified version is intended to live in optional extra memory at 0B00-0BFF so you will at the very least need to add a .OR 0x0B00 near the start of the source, and then make Geoff's further modifications to the code. -The external circuit to supply the 'random' input which the software samples will still need to be built. In #10, I suggested that the required input could be a simple squarewave because I misunderstood what the input signal was for, now that I've read it a little bit more, I realise the input has to be something more complicated. You could potentially generate the required input (random digital noise?) using an Arduino programmed to do it. -The next line after the line at label START is shown in the original listing as XPAH PTR1 but has to be changed to XPAH P2, which makes more sense anyway, to match the opcode '36' given for this location in both the listing and the hex dump. (I have changed it in the SBASM3 .ASM file). The instruction at label OUTLOOP is given as LD PTR2+0 in the original article but if assembled that way does not generate the code C6 00 as shown in that position in both the Hex dump and the listing. The instruction has to be changed to LD @0(P2) (which I have done) in order to generate the correct code at that location. -The code at address xx09 in the listing is given as 0A 00, whereas the instruction in the listing and in the SBASM3 .ASM file should, and does, generate the code CA 00, as shown in the same location in the hex dump file. -While the code now assembles as closely as it can to that in the original hex file and listing, given that there are errors in both, I have not actually tried running it so there may still be undiscovered logical errors in the code, or indeed in my hand entry of the code, if so, I apologise in advance. Good luck! Last edited by Station X; 10th May 2023 at 10:40 am. Reason: Post edited at OP's request. |
8th May 2023, 11:01 pm | #14 |
Octode
Join Date: Mar 2011
Location: North Yorkshire, UK.
Posts: 1,119
|
Re: Micro music box project.
I just read through the original ETI article again, this is going to be an absolute mare!
the comments & description are almost incomprehensible, I dont think they were written by the software author! The hexfile errors start with the second byte and continue throughout... I wonder if (in typical ETI fashion) they published corrections in a subsequent issue? The text says that Marshalls supplied a pre-programmed 1702, if only we could find one of those! First job is to print everything out on paper and find a pen that works Last edited by Phil__G; 8th May 2023 at 11:12 pm. |
8th May 2023, 11:27 pm | #15 |
Dekatron
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,577
|
Re: Micro music box project.
Well, here's a version of the .ASM file with Geoff P's patches integrated, see if that's any better for you. I've checked that all of the patched bits come out at the right hex values in the right places.
Unfortunately I can't pretend to understand the code very well despite it being quite liberally commented, so maybe just try the code this .ASM generates and be amazed if it actually works? Load and execute at 0B00 - I haven't included auto-exec because I know not everyone has that. |
8th May 2023, 11:54 pm | #16 |
Dekatron
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,577
|
Re: Micro music box project.
I've trawled through quite a few of the subsequent ETIs and haven't found one 'errata' section so far. I think they largely thought that not many people at that time would have EPROM programmers of their own - I certainly didn't - and assumed that 90% pf people would buy the pre-programmed EPROM. Maybe they did, too.
You were obviously expected to buy the PCB as well because they made it pretty hard not to, given that, as Slothie originally pointed out, there are no IC pin numbers on the circuit diagram and no PCB foil pattern for the lower side of the PCB from which this information could be divined. The more trouble this is to get working, the more disappointing the end result is likely to be. |
9th May 2023, 12:26 am | #17 | |
Octode
Join Date: Mar 2011
Location: North Yorkshire, UK.
Posts: 1,119
|
Re: Micro music box project.
Quote:
To be honest I dont even understand the text explanation of the principles involved, so I cant re-write it from scratch... I need to make some notes (ha - see what I did there) Its a major rework for me as I dont have an MK14 (PIC14 only has 256 bytes) so my options are the Andrew Aitken or the PICL, neither of which has the same memory map It would be good to know if the Geoff P MK14 version does in fact work, easy enough to adapt to different hardware from that point... I'll have a look at the MK14 source for clues tomorrow, so many uncertainties, like the LD at OUTLOOP should be a store, so many more... Last edited by Phil__G; 9th May 2023 at 12:32 am. |
|
9th May 2023, 1:04 am | #18 | |
Dekatron
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,577
|
Re: Micro music box project.
Quote:
If I get a chance I will try loading the 'patched for MK14' Twonky code into my issue VI early this week. I think probably only Realtime, who has non-volatile RAM in the 0000-> area of his memory map and might be able to enable RAM in the right area, could attempt to run the original Twonky code. |
|
9th May 2023, 1:33 am | #19 | |
Dekatron
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,577
|
Re: Micro music box project.
Quote:
Last edited by SiriusHardware; 9th May 2023 at 1:39 am. |
|
9th May 2023, 1:52 am | #20 |
Dekatron
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,577
|
Re: Micro music box project.
The hex code at label OUTLOOP in both the listing and the hex dump is C6 01 which would equate to a LD@1(P2) instruction and that's what I've changed it to in the source, but you probably have a better feel for this stuff than I do.
What I did notice was that Geoff P picked up on the obvious wrong byte in the listing at xx09 (0A instead of CA) and included a correction in his list of patches, but didn't include any other corrections which suggests he didn't feel any others were needed, the rest of his alterations being changes which were necessary to get the code running on the MK14. He didn't mention the incorrect second byte because it's only wrong in the hex dump, not in the listing, which makes me think he started with the code in the listing and corrected / patched that as needed. I suggest maybe ignoring the hex dump for now and concentrating on the hex code which is part of the listing. |