551

(10 replies, posted in Sinclair)

(discussion split off from the Sleizsa Trio thread)

About a beeper card, would it perhaps make sense to make it Atmega based? I think it might help the popularity of such a device if it could be build from "standard household appliances", eg. Arduino. On the other hand, a Z80-based card could be made in a way that it would run Spectrum beeper engines without adaptation, which would be a big bonus, too. Not sure what's the better approach.

Been a while since I coded something on Fairchild F8... well, here's a new sound routine for the Channel F (aka VES, Grandstand, Saba Videoplay). Sleizsa Trio features 3 tone channels (one of which can play noise instead of tone), globally configurable duty cycles, and 2 interrupting click drums. It uses a mixing algorithm based on Zilogat0r's Squeeker engine for the ZX beeper, which does a somewhat better job with the Channel F's crude sound generator than Sleizsa Duo's pulse interleaving method.

Demo tune: https://soundcloud.com/irrlicht-project … -channel-f
Download: https://github.com/utz82/SleizsaTrio/releases/latest (XM converter included)
Github repo: https://github.com/utz82/SleizsaTrio

Whoa, that's very nicely done. Good find, thanks for sharing!

554

(21 replies, posted in Sinclair)

Yo Zilog, good to read you on here! Your idea about using scalers has actually found it's way into this engine, though I think in a different form than you had envisioned it wink

Anyway, would love to see a new beeper engine from you, too! Squeeker has been very inspiring for me, and in terms of sound it's still one of my all-time favourites.

555

(135 replies, posted in Sinclair)

Been doing some thinking about vibratos. Here's an algo that is reasonably fast, has configurable parameters, and doesn't require a table lookup:

    ld hl,0
    ld de,note_divider
    
    ld c,1                    ;vibrato strength (max 0xf)
    ld b,2                    ;position init (must be ½ of vibrSpeed range - else detune)

loop
    add hl,de        ;11
    ld a,h            ;4
    out (#fe),a        ;11

    ld a,e            ;4
    jr nc,noVibrato        ;12/7

    ret nc            ;5        ;timing
vibrDir                    
    inc b            ;4        ;initial direction (probably needed as configurable parameter)
vibrSpeed equ $+1
    bit 2,b            ;8        ;speed (see above, bit 3 -> ld b,4 | bit 2 -> ld b,2...)
    jp z,vibrDown        ;10
                    
vibrUp
    add a,c            ;4        ;DE += C
    ld e,a            ;4
    adc a,d            ;4
    sub e            ;4
    ld d,a            ;4    
    
    jr loop            ;12
                ;96    

vibrDown
    sub c            ;4        ;DE -= C
    ld e,a            ;4
    sbc a,a            ;4    
    add a,d            ;4            
    ld d,a            ;4    
                    
    jr loop            ;12    
                    
    
noVibrato
    ;... waste some t's
    jr loop            ;12
                ;96

I have a feeling that this thing can be optimized further by using an sbc a,a fallthrough solution, but haven't managed to implement it for the downward slide yet. Let me know if you have any ideas for this.

556

(2 replies, posted in General Discussion)

Belated Happy New Year from me, too! Back from my album recording session now and back on track for 1-bit world domination big_smile

557

(111 replies, posted in Sinclair)

Got a track in the pipes for this. Nothing great, just some simple PhaserX punk rock. Still need to polish it up a bit though.

Finally got around to listening to this properly. Awesome track, love that grinding fx at the end!

559

(10 replies, posted in General Discussion)

The was supposed to be one in november, but I didn't have time to organize it after all. Next good chance would be in early spring, after Winter Chip has finished on Battle of the Bits.
In the meantime, perhaps you would like to participate in the Beeper compo at DiHalt 2017 Lite: http://dihalt.org.ru/rules5_eng.html#zx ?

Neat!

"$db" is indeed a note value in hex notation, equal to 219 in decimal wink

I wonder what went wrong with those errors though. The line "#define db .byte" actually means the opposite in TASM, eg. "interpret '.byte' as 'db'". But as I said, back in the day when I wrote these I didn't have much of a clue about asm either. In any case, I promise to make a better version of ti1bit pack as soon as I can find the time, hopefully in January.

If you run into the "too many lines" problem, it might also suffice to put some dummy labels somewhere in the music data, eg.

   db $bla
   db $bla
   db $bla
dummyLabel1
   db $bla
   db $bla
   db $bla

Haven't tried this though. In any case, first thing for the new ti1bit pack will be to eliminate TASM and replace it with a modern assembler which doesn't bicker about stupid crap like that.

A note on speed: Speed conversion in ti1bit is not very accurate to begin with. But there are also other problems, some of which were discovered only recently. Namely 1) The TI-83 Parcus (the model you have) actually runs at around 7 MHz, despite the official specs claiming it runs at 6. 2) CPU speed on TI calcs fluctuates significantly depending on battery strength. On TI-83, it's not as bad as on some other calcs, but still normal to have +/- ½ MHz variation.

Wow, you seem to be really active! Also, I think black metal will have a few fans around here wink

In theory it should just work by setting the loop point where you want it in 1tracker. I have no clue what I even meant by what's written in the ti1bit readme.

563

(135 replies, posted in Sinclair)

Proof of concept for my idea about saw wave generation:

;saw wave via square wave transform ([f,a]+[2f,½a]+[4f,¼a]...)

    ld hl,0
    ld de,#40
    ld c,#fe
    
loop
    add hl,de    ;11
    
    ld a,0        ;7    ;timing
    ld a,0        ;7    ;timing
    ld a,0        ;7    ;timing
    nop           ;4
    
    ld a,h        ;4

    out (c),a    ;12__64   ([f, a])
    rrca         ;4
    out (c),a    ;12__16   ([4f, ¼a])
    rrca         ;4
    ds 4         ;16
    out (c),a    ;12__32   ([2f, ½a])
    jr loop        ;12

Ha, with a demo tune like this, it was totally worth it big_smile Looking forward to what you'll come up with. Please do post your stuff here, I'm curious.
And yeah, applying some eq is totally fine in the 1-bit world (well, in my opinion at least). Though lsengine is a pretty hopeless case. I've used it quite a bit for some time, but I never managed to get it to sound really good, neither on Spectrum nor on TI.

Yeah, almost there I think.
Did you remove all dots (.) from the music.asm file? If the answer is yes and it still doesn't work, attach your music.asm here and I'll take a look.

Hey, no problem at all. Using this crap package certainly isn't trivial wink and others might benefit from having these questions discussed. So no need to feel guilty.

Regarding the error, I'm a bit surprised by this one. I don't have any problem running TASM in DOSBox. But I just noticed that I'm appearantly using 3.1, not 3.2.
http://www.ticalc.org/archives/files/fi … /1504.html
Maybe using this ^ will solve the problem? Otherwise, I'd say 3.2 appears to NOT require DOS after all. So perhaps try to run in directly under Windows (though I doubt that would work under anything newer than XP)?

567

(135 replies, posted in Sinclair)

Alright, got a new idea - use a "state memory". Now wtf is a state memory? Think about how we implement accumulative pin pulse engines (Octode XL, for example). We basically "remember" the state of the carry flag from add hl,de for a given time (which, in an accumulative pin pulse engine, will control the volume). But in pulse interleaving engines, we evaluate the state only once and then discard it immediately. But it might be useful to actually remember it for some time. For example, we can implement a primitive low-pass filter like this (excuse the sloppy code, it's early in the morning big_smile)

   ld hl,0        ;counter, clear it
   ld de,#40      ;freq divider
   ld b,0         ;"state memory"
loop
    add hl,de     ;nothing special going on here, just adding da stuff
    ld a,h        ;HL bit 12 = output state
    out (#fe),a
    
    and #10       ;store the current state in state memory
    or b
    ld b,a
    
    rrca          ;get old state from 8 loop iterations ago
    ;rrca         ;2x rrca = high cutoff, 1x rrca = low cutoff (filter moves slower)
    nop

    nop           ;timing
    
    out (#fe),a
    
    and #ef       ;delete old state from state memory
    ld b,a
    
    ld c,0        ;timing
    
    jr loop

High-pass could be implemented in a similar fashion, because HP_output is basically just (original_output - LP_output). There could be other uses for this "state memory" thing as well.

You're not giving up easily, are you? big_smile Well, with so much persistence, I don't have a choice but to help you wink

Ok, so first of all, you need the "other" TASM - not Borland, but Telemark. You can get it here:
http://www.ticalc.org/archives/files/fi … 25051.html
You'll probably need to run it in DOSbox, btw.
And devpac83 is here: http://www.ticalc.org/archives/files/fi … /3650.html
Just dump all the files in your working directory, where you have the asm files. "asm83.bat" goes into that folder as well.

Regarding step 5, just make sure the first two lines look something like this:

;#define TI82
#define TI83

Anything that has a ";" in front of it is considered a comment in assembly, and will be ignored by the assembler. If you just have the line "#define TI83" (without a ; in front of it), then that'd be correct. Don't worry about the "looping" part for now.

Also, don't worry about the "long song data corrupts TASM" part, unless you actually run into problems. If that happens, take this:

ptr1
loop1
    db $21
    db $2d
    db $1e
    db $2a
    db $20
    db $2c
    db $1c
    db $28
    db $2a
    db $1e
    db $26
    db $1a
    db $28
    db $1c
    db $25
    db $19
    db $2d
    db $2d
    db $2a
    db $2a
    db $2c
  bla bla bla...

and transform it into this:

   db $21, $2d, $1e, $2a, $20, $2c, $1c, $28, $2a, $1e, $26, $1a, $28, $1c, $25, $19
   db $2d, $2d, $2a, $2a, $2c, ...

Also yes, that rawp thing will be a bit easier to use. No need to fiddle with TASM, at least.

It's even less straightforward, actually. If you have an XM, you'll need to use one of Shiru's original XM converters to produce an .asm file, adjust some things manually, then use TASM and the ti1bit pack to compile them into a .83p. The problem is that those XM converters are meant to operate on specifically crafted templates. While it is technically possible to not use the templates, your mileage may vary wildly as far as the results are concerned. As I said, it's really one big hassle to use. Well, knowing that you are interested in using this, I'll think about rewriting the whole thing and making it more convenient to use. It'll be some time before I get around to that, though, probably won't happen this year anymore.

Ah, glad that's solved. Hmm, perhaps I can make things a bit more clear in the manual.

Also... you actually want to use ti1bit pack? yikes I always assumed there's literally nobody using it, hence I haven't updated it in ages. In it's current form, it's a major p.i.t.a to use. Well, in theory you can use the engines while ht2 is installed, but I'm afraid you'll run out of RAM very quickly. On TI-83 with HT2 installed you have around 500 bytes left, of which Ion needs another 200 or so for its internal operations. So you have just 300 bytes left, but even a small 1-bit song usually takes more than 1 KB.

Hi there,

If you don't have "A", it means the Ion shell is not fully installed. Make sure you have done the following steps, in this precise order:
1) transfer ion.83g
2) run "ION"
3) delete ION/IONZ
4) transfer ht2.83p
If that doesn't help, let me know. We'll get there eventually wink Also, props for building your own cable!

572

(135 replies, posted in Sinclair)

I believe there may be another way of fak... err, I mean generating a saw wave on beeper. For this, we need to look at the frequency spectrum, rather than the waveform. In the frequency domain, a square wave is characterized by having a peak at each odd harmonic. That means, for a 440 Hz, 50% duty square wave, frequency components will be present at 440*3, 440*5, 440*7 Hz, and so forth, but not at 440*2, 440*4, 440*6 Hz etc.
A saw wave, on the other hand, peaks at both even and odd harmonics. Thus it can be approximated by mixing a series of square waves with frequencies of f, f*2, f*4, f*8, etc. With the "fast accumulation" technique (add hl,de \ ld a,h \ out (#fe),a) we can easily achieve this by rotating A to get the required multiples. Doing this with 3-4 frequencies should already give a reasonable approximation of a saw, because the missing components will be high enough to fall out of the range at which humans can reliably detect the difference.

573

(21 replies, posted in Sinclair)

Ok folks, last engine from me for 2016. This one is a weird beast. In terms of capabilities, it's somewhere in between Tritone, Betaphase, and qaop. However, at 3-10 bytes per row, its data format is much more compact than the latter two.

wtbeep's main specialty are 32 different "waveforms", which are realtime generated, ie. no samples involved. Also re-using the new user-configurable click drum system from povver, though at a slightly decreased quality because wtbeep's loops are shorter (184 cycles vs. 224 in povver), and I don't want to decrease overall tempo resolution just to facilitate longer clicks.

To be honest I don't even understand myself what's going on with some of these waveform generators. But hey, it works, so let's not ask too many questions big_smile

Source code and stuff is on my github as usual. I might do an XM converter and/or MDAL config later if I can find some time for it.

574

(19 replies, posted in Sinclair)

Cheers guys! All that digi stuff aside, my favourite engine from this year is probably Squeeker Plus. I do hope the other engines will get some love, too, though wink

575

(1 replies, posted in Sinclair)

Ah, Jangler delivers as usual. Also nice to hear gotoandplay fiddeling with Phaser2 again. Hope to hear another full-length track made with it for the coming Winter Chip.