Tuesday, 30 April 2013

The first beeps


One step closer. I had a little time to read the manual of commands and BASIC programming. It may not be the most efficient system but it has its romantic for sure.


I've found a simple reference of commands here, where they explain what they are doing and give some samples. Clear and easy to understand. I was surprised that it can define functions, so it's not just GOSUB and GOTO where you can create callable code blocks. Also the fact that it's kinda type safe with using the variable naming conventions, such as $ or %. Well, a computer that has a dedicated PI key is nothing but great.

I started reading the sound generation chapters. Met with all the essential basics of sound, lot's of new definitions and physics. As expected it all works through the registers. As a sample I created this short demo to present a beep sound:


10 ff = 16*80
20 pn = 54270
25 poke 54295, 0
26 poke 54296, 15
30 poke pn+3,ff/64
40 poke pn+2,(ff-32768) and 255
50 poke pn+5, 999/8
60 poke pn+8, 240
70 poke pn+7, 112
80 poke pn+6, 17
90 for c = 1 to 250:next
100 poke pn+6, 0

I've met with DATA and the concept of data files. At the moment I think the track will be a lot of register binary operation to merge frequencies and handle the attack, decay and many other attributes. And then I realized I might be able to connect it with Drupal. Maybe with NodeJS I can use C64 a content authoring frontend. We'll see.

---

Peter

No comments:

Post a Comment