251

(6 replies, posted in Sinclair)

I've been wondering for some time if there is a way of replacing the usual 16-bit frequency counters with an LFSR or something of that sort. Feels like such a waste to spend 4 registers on a simple counter every time.

252

(136 replies, posted in Sinclair)

Thanks! That was some very strong competition from you guys. Listening again, I think "Repeating Itself" is actually my favourite from this compo. And yup, I was likewise a bit puzzled by "who the hell is trying to beat me at Squat", but the "author's comment" was a give-away. Now who's hellraver, though?

Did you check out AMP16k already?

254

(6 replies, posted in Sinclair)

Ah, yes, Serzhsoft delivers, as usual. Thanks for reminding me about that one, I forgot to check that out when it was released!

255

(6 replies, posted in Sinclair)

Sounds surprisingly nice for being so simple.

start
  ld b,1
  ld hl,#4000
loop
  ld a,(hl)
  add a,b
  ld b,a
  ld (hl),a
  out (#fe),a
  inc hl
  ld a,h
  cp #58
  jp nz,loop
  jp start

Could've easily shaved at least 3 bytes off, though yikes

I still would like to see a bytebeat interpreter for beeper one day. Or rather, bitbeat... I don't see how it could be done though, considering the thing needs to run in constant time.

256

(5 replies, posted in Sinclair)

Should've done this much earlier, I guess, but anyway: This will be where I announce my new engines from now on, instead of spamming the board with a new thread every time.

So, here we go, first new Speccy beeper engine of 2021. Basically this one is just wrapping up my recent experiments with PD synthesis. Might still tweak things later on, but for a simple proof-of-concept it's good enough as is methinks. No converter for now, though of course it'll be available in Bintracker sooner or later.


Aczidbox

Aczidbox is a 1-bit sound engine for the ZX Spectrum beeper. It implements a simplified version of Phase Distortion Synthesis, as introduced by the Casio CZ range of synthesizers.

The two tone channels each feature a 16-bit base oscillator and a LFO-controlled 12-bit resonant oscillator. Channels each use 7 bits of volume information internally, which are reduced to 4 bits for the final mix.

3 different configurable click drum modes are available: synthesized kicks, synthesized noise, and PWM sample playback. Drums interrupt tone playback.

The core synthesis runs at 7812 Hz (double 224 cycle loop).

The source code is available on github, as usual.

257

(135 replies, posted in Sinclair)

Horray, got it working in 2 channels, with lfo-controlled resonance. That was surprisingly tough. Sadly, no room for a low-pass. It's also fairly noisy when mixing 2 channels. Will try to get it a little cleaner than this, though I'm slowly running out of ideas.

258

(135 replies, posted in Sinclair)

Yes, was thinking the same thing. What I'd really want is to have some sort of an lfo-controlled lo-pass. A simple FIR lo-pass at a fixed cut-off is fairly easy to implement, but I haven't been able to pull off a variable cut-off in constant CPU time. Maybe could be done with another table lookup but I'm currently already short one register pair for implementing the second channel.

259

(135 replies, posted in Sinclair)

Cooking up some new stuff. Seems like I've got phase distortion synthesis working. Not entirely sure if I got the maths correct, but it sounds interesting at least.

260

(9 replies, posted in Other Platforms)

Alright, with that I was able to load the program (no autotyping S1000 but whatever). Now what? I can move around in the menu. INIT and EXIT do something. I gather Q should exit from the menu, but nothing happens when I press that. No other keypress seems to do anything. Overall the program is extremely sluggish, barely reacting to keypresses. Is it the prog itself, or the emul? Before starting klavesin, it's pretty responsive though.
Will have to sit down again with this in a couple of days, when I have more time.

261

(9 replies, posted in Other Platforms)

Hm, it compiled without a problem, and generally it seems to work. However, when I load klavesin.bin and press any key, it puts garbage on the screen and then crashes (hangs with 100% CPU usage). Does that happen with the Windows version? Am I supposed to press a specific key? If I run in FOCAL mode, I get some error message instead.

262

(9 replies, posted in Other Platforms)

I don't have a working Windows anymore so need to find another way. Managed to get the machine to work in MAME. However, that will only accept tape images. Any idea what would be needed to convert klavesin to the appropriate tape format? And how to load it? Otherwise I can inject the bin into memory via the Lua console, but that'd be a bit tedious and I'd need to know the load address.

Does register 177716 do anything else besides driving beeper/tape? Otherwise it might be quite easy to fake some pcm on the machine.

263

(9 replies, posted in Other Platforms)

How is the beeper accessed on this one? Direct like on Spectrum?
Also, how compatible is it with PDP-11? Iirc there were various music programs for the PDP-11, would be interesting to know if some of these work on BK-0010.
Also, I faintly remember there being a port of Tritone for it, or was that another machine?

I'm not sure what you're trying to say. If you want you can write in Dutch, then I'll translate.

Good work! But indeed I think you've got a bug somewhere, sounds like several notes are missing to me.

Hoi Crisis, welkom wink Weren't you also experimenting with beeper sound on 16K/contended memory a while ago?

267

(13 replies, posted in Other Platforms)

Done: https://github.com/mamedev/mame/issues/7559
Can't upload the .prg there, cause github managed to break file uploads from ff on linux again.

268

(10 replies, posted in Sinclair)

I think the approach is interesting. It could indeed produce very compact data. In theory Bintracker could support such a format (though at this point it's still missing various required bits here and there). The interface would not reflect the data structure at all though. It'd still be just a normal tracker interface and then conversion to the actual format would be done by the compiler/optimizer. I even have reasonably accurate scale/mood recognition working, though it's just a very simple proof-of-concept at this point.

One problem I see though is that this format optimizes for a certain style of writing the music. Someone who doesn't care about time signature and/or mood might not benefit from size savings as much. Then again, the chance that someone is going to write dubsteb with that thing isn't that high I guess.

269

(13 replies, posted in Other Platforms)

Shiru wrote:

However, MAME's SR produced pitch is twice higher than it should be.

Ugh. Do you want me to file an issue against MAME? Occasionally folks there are pretty quick with fixing stuff. I'd need some sort of "proof" though.

270

(10 replies, posted in Sinclair)

Wow, these sound really good.

What's your idea regarding a new song data format? Sure, 16K is pretty big yikes I think generally it's not necessary for beeper data to be super optimized, though. Usually things compresses quite well with common compressors (zx7, apack, etc).

271

(20 replies, posted in Sinclair)

Welcome back, mate! Looking forward to what you will come up with. If you have any questions we're here to help, of course.
I think Hikaru's new AMP16k might be interesting for you to study as well. Generally, the "Squeaker" method used there is a good candidate for in-game music because its CPU requirements are not that high, and it tolerates some deviance in timing as well. Though pin-pulse like synthesis like in Qchan should work well, too.

From what I remember of my experiments back in the day, there is no noticable benefit to distributing the 1s like this, except for many consecutive 1s - eg. 11101110 is sometimes a bit cleaner than 11111100. I'd say it's not worth spending extra CPU cylces on, though.

Part 10 is actually a bit outdated, in part 12 you will find a better synthesis method that can also be adapted to PCM playback. In a sense, the same caveat about consecutive 1s applies to that, though, e.g. having two 3-bit outputs will be cleaner than having one 4-bit output, but having one 4-bit output saves 24 cycles...

In any case there are some interesting effects that can be observed in this regard. This is because the expansion of a speaker diaphragm isn't linear, so at volumes >50% it will react differently than <50%. So far nobody has been able to really make use of that, though.

273

(13 replies, posted in Other Platforms)

Shiru wrote:

There is another mode where you can also output an arbitrary bit stream, getting an IRQ every time when shift register gets empty, thus getting some buffered playback. This mode is not emulated, unfortunately.

Damnit! So that's why that didn't work when I tried it. I guess MAME doesn't emulate that either, does it?
Also, do you have any more in-depth documentation about the PET? I'm mostly working with petmem.txt, pet-io-2.txt, The PET User Port Cookbook, and the Raeto West book. Somehow I don't find any of them particularly satisfying.

pet-io-2.txt mentions

Also (on my machine), when generating sound one must first set the shift
register in "free running" mode, and then load it with a value to shift.
The other way around does not seem to work.

Is that true? I have one player prototype that sets the Shift register to $ff and just toggles bit 4 in ACR, and that seems to work fine on my friend's 8032.

Fun story, I once owned a half-working 8096... for a couple of hours. It was given to me at a demoparty. Since I had no means of transporting it, I had to give it away. It's now in the computer museum in Katowice.

274

(13 replies, posted in Other Platforms)

@Shiru: Oh wow, that whole bit about Mr. Murray totally escaped my attention. Yeah, deffo uncool, but on the other hand it clearly says more about them than you guys.

Btw what's your approach for going below 245 Hz limit? Right now I'm toggling CB2 in direct mode via a Timer 1 interrupt, but I'm thinking there's got to be a better way. Also, the Raeto C West book mentions using the Timer 2 high-byte in conjunction with the Shift Register, but this doesn't appear to work. Am I missing something here?

@Tufty: Mr. Murray = The 8-bit Guy

275

(13 replies, posted in Other Platforms)

Pretty damn impressive. I think PET audio can be pushed further still, but this is quite an achievement.
Fun story, I was actually working on a multi-channel PET routine right when this got released. Grrrrr!