51

(164 replies, posted in Sinclair)

Another update. Finally, a sample based AY engine! Reverse-engineered the code from Sample Tracker 2.1, and as it works with 48K, it was possible to fit it into the *.AY file container (although I've got ideas on how to go 128K and beyond).

I had to modify Game_Music_Emu in order to make it work, as it didn't fully support simplified AY ports decoding.

The engine also supports Covox, Stereo Covox, and SounDrive, I kept it in Z80 code, but GME does not support these devices, and it seemed to be kinda difficult to add them in, so for now these are not audible in the tracker, but still can be exported as code. This may change in the future.

The engine is already bundled with the tracker. Here is the original ST2.1 reversed code without much modifications, just in case anyone wants to look at it.

52

(3 replies, posted in Sinclair)

That's actually the routine that goes under the 'Tim Follin 3ch' title in 1tracker, added there good 11 years back. To my knowledge, no one ever used it for a song.

It is a three channel engine that has a specific limitation in that three channels share the same exact note length and 'volume' (duty cycle) envelope. I.e. you can't play a long note and a number of shorter ones at the same time. It is also prone to very severe detune, so all note combinations has to be tuned up by the ear to sound properly.

53

(164 replies, posted in Sinclair)

A minor update to v0.45. I honestly don't remember all the fixes I did, mostly minor improvements to the engine scripts here and there.

54

(4 replies, posted in Sinclair)

I honestly can't wrap my head around the internals of the 5/6ch engine. Very complicated design for the time. Hopefully FrankT will figure it out.

55

(10 replies, posted in Sinclair)

I guess so. Thanks for report!

56

(10 replies, posted in Sinclair)

There is no limitation in the engine. Import allows to import up to 64 frames worth of sample data per drum, which is 2048 bytes (16384 1-bit samples).

I don't know. I have many reports regarding FL-related issues, but I'm not an FL user, and it works just fine in the FL demo version on my end.

I mean, it is very likely there is some problem in my UI code, but VST format is extremely badly documented, and almost no one programming UIs directly as I did, most VSTs created with SynthEdit-alike constructors. So I can't even know for sure.

58

(10 replies, posted in Sinclair)

Thanks, utz! Now we certainly need to get some good use to at least some of your developments.

Meanwhile, fixed the 128K problem.

59

(4 replies, posted in Sinclair)

Released a few days back it seems, some source dumps off the Follin's Tatung Einstein floppies. Contains some Z80 and 6502 stuff, not sure which exactly. No comments spotted in the files.

https://github.com/breakintoprogram/archive-follin

60

(4 replies, posted in General Discussion)

From your description it kinda sounds like your emulator works in realtime for some reason. Normally an emulator does not run in realtime, it executes a chunk of code worth of a frame clocks, all sound writes just get queued with a timestamp in the emulated system clocks. Then it get synced with the realtime - a frame buffer displayed, the queue rendered and downsampled into a sound frame (~882 samples at 44100 Hz) that can be either streamed to the OS audio or dumped into file.

A filter is not a problem per se, just a low pass filter applied to your sound stream rendered at the system clock (8000000 Hz), so you get rid of the high frequencies before downsampling (this called pre-filtering), then downsample it to 22050/44100/48000 etc, with something better than linear interpolation preferably. The tricky part was usually how to do it efficiently, although I don't think it is a big deal for the modern PCs.

61

(4 replies, posted in General Discussion)

Why the output is 22050 Hz, tho? It will take an extremely good resampler/filter in the emu to make basic engines with channels interleaving (such as Music Box) to sound good at this rate, because the carrier tone will get well into the audible range otherwise.

62

(10 replies, posted in Sinclair)

Thanks!

Will look into these issues.

63

(10 replies, posted in Sinclair)

Just finished it. Preparing the audio and video release with all the related stuff. In meanwhile, you can give it a listen with the loadable ZX Spectrum player.

There are 11 songs, all powered by the Ear Shaver EX engine and written with 1tracker. Half of the songs were sketched out while it wasn't EX and/or had less sub-engines, actually. Overall, the idea was to showcase the potential of this particular engine and the whole idea of per-row engine switching.

Edit:

YouTube
Soundcloud
Bandcamp

64

(7 replies, posted in Sinclair)

Oh, silly me, I just lost one line that is needed to make the tempo compensation work, when I was replacing the sample routing. Updated archive is in the first post.

65

(7 replies, posted in Sinclair)

There is auto correct from Phaser3, which is done at run-time instead of compile-time. I think I need to change it to the ESEX style, which had tempo correction at song compile time.

The resulting sample rate for drums should be 3500000/136=25735 Hz. WAV import resamples the source automatically.

66

(7 replies, posted in Sinclair)

P is 'pitch'. It is not really pitch per se, more like a filter of sorts, makes the sample sound more and more muffled. On some samples it actually feels like a slight pitch change, though. O is sample offset, a sample can be played not just from beginning, but starting from a later point, it helps to get more dynamics with the same sample.

67

(7 replies, posted in Sinclair)

Finally, it is here! It is much along the lines of Phaser3, but with many improvements.

- More synthesis options, including the recently discovered CrossPhase method and limited noise generation on either channel;
- A bit improved sample rate, with a trade-off that the border now shows white strips while playing;
- Sampled drums code from Ear Shaver EX, with volume, pitch, and offset controls.

Beware, it is an early version, not tested properly, so may contain some bugs/issues.

Edit: file replaced to fix one of the bugs found, tempo compensation for the interrupting drums.

68

(135 replies, posted in Sinclair)

RLA gets the topmost bit into the Carry after a logic operation XOR/OR/AND that normally does not affect Carry. Honestly, I forgot that I ever invented this method (perhaps borrowed it from you?).

Oh yeah, dithering applied to the 1-bit sound synthesis may bring some quite interesting results! Cool idea, never thought about that.

69

(135 replies, posted in Sinclair)

Some more cool finds for Phaser4 (currently in development) specifically:

Regular XOR/OR/AND modes in Phaser3 were:

    add hl,bc
    ld a,h
    add ix,sp
    xor/and/or ixh
    rla
    sbc a,a
    and 16
    out (#fe),a

Now, instead of xor ixh:rla we can do more by changing just two bytes - keeping the ix/iy prefix in place:

cp ixh:nop - the CrossPhase
adc a,ixh:add a,h - fat octaving noisy timbre
xor ixh:sub h - more noise in a similar timbre
xor ixh:sub l - very noisy yet still tonal timbre
xor ixl:sub h - periodic noise of one kind
xor ixl:sub l - periodic noise of another kind

And another cool thing is that Phaser3 unrolls the sound loop 4 times for pseudo volume effects. And we're not obliged to use the same 'algorithm' in each iteration, we can mix in any 4, getting even more weird timbres.

70

(164 replies, posted in Sinclair)

I still can't get rid of suspicion that AngelScript just does not happen to be very stable. Especially between platforms. Too bad it is too late to switch to something, and, well, back then I picked it because it shown very good speed among other script engines, plus it had C-similar syntax. These days Python would be a better bet, I guess, but alas.

71

(164 replies, posted in Sinclair)

Just tested it, no, ZXStandartExportOptions is called just once per row or F5 play on my end. To test it quickly, there is Print function, so

void ZXStandartExportOptions(uint format,bool rom)
{
Print("call");

will show each call in the log or the console window (I'm using a debug build with console enabled under Windows).

72

(164 replies, posted in Sinclair)

Wow. Maybe I'll just rework all the engines and interfaces to avoid the use of uint altogether, so it'll be int all around? I wasn't ever getting any segfaults or crashes under Windows, though.

Oh yeah, loopRow seem to be uninitialized in one of the branches in many engines. Damnit the mindless copy paste of seemingly working framework.

Assembler is intended to be called only once (function ZXStandartExportOptions in zxspectrum.1tl), but the assembler itself is a multi pass, not a single pass one.

73

(6 replies, posted in Sinclair)

Yep, I've had plans for Phaser4 recently, but it was to be more of an up-to-date version with the new better sampled drums, a noise mode, and such minor improvements. Now with CrossPhase it really worth to make. Will get to it sometime soon.

74

(135 replies, posted in Sinclair)

Named the second idea ModPhase, implemented both ideas as experimental sub-engines inside the Ear Shaver EX engine - because it blends pretty well with the design.

75

(6 replies, posted in Sinclair)

So, as I got more new ideas mentioned in the next gen engine ideas thread, I decided to test them out inside the Ear Shaver EX engine. Here is the update. It introduces two more sub-engines into the mix:


8: CrossPhase. Another kind of a Phaser1-like modulation engine, but a bit different both from Phaser1 and EarthShaker. It is a single channel mode, much like engine 6.

9: ModPhase. Provides two channels with always-on PWM modulation and modulation alteration via W column. T2 channel is louder than T1 channel.

The modulation alteration effect is better heard with long notes, it sounds kind of a mild guitar feedback.

Edit: updated it so ModPhases's default W always resets phase LFO, while other values keep it free running; phase LFO's are now separate and independent for both channels. This makes it more handy and versatile.