926

(3 replies, posted in Sinclair)

Not contemporary and not ZX, but there are a few ones from the early days of 1-bit music:

Rekengeluiden van PASCAL - VA (1962)
D21 - In Memoriam - D22  - Göran Sundqvist (1970)

There are a couple more old ones, but I'll have to dig for those later.

And now sing along with me:

BEEPER - simply the best
BEEPER - f*ck all the rest
BEEPER - bad for your brain
BEEPER - going insane

hehehehe good job, AER! Now please make one for the forum contest wink

Huhu xxl, do you still have Beep'em all 2600 somewhere?

929

(11 replies, posted in General Discussion)

Let's dump the cool shit here tongue

This vid about the PC Speaker is pretty cool, would be nice to have English subs though.
https://www.youtube.com/watch?v=NIyQueXqRYE

Wow garvalf, that's a lot of spamming wink Thanks a ton for spreading the word!

931

(1 replies, posted in General Discussion)

Afaik the only editor that really uses this feature is 1tracker. Which of course has the luxury of storing these markers in it's own 1tm format.

Ok, here's an idea: You only need 1 bit to store a marker. So you can combine it with other data, e.g. drum triggers or per-row tempo settings. Or even note data if you're using a frequency lookup table, because a range of 0x7f notes should be more than enough wink

You can actually combine those ideas. Let me explain...

Part 9: More Soundloop Tweaks

In this part, I'll discuss two advanced tricks that you can use to open up new possibilities and further speed up your sound loops. I've learned these tricks from code by introspec and Alone Coder, respectively.


Accumulating Pin Pulses

The first trick applies to the PFM/pin pulse method of synthesis. First, let's take a look again at our PFM engine code from Part 5, and modify it to use 16-bit counters.

BC = base frequency channel 1
IX = freq. counter ch1
DE = base freq. ch2
IY = freq. counter ch2
HL = timer

soundLoop:
       add ix,bc                ;update counter ch1
       sbc a,a                  ;A = #FF if carry, else A = 0
       and #10                  ;A = #10 || A = 0
       out (#fe),a              ;output state ch1
       
       add iy,de                ;same as above, but for ch2
       sbc a,a
       and #10
       out (#fe),a
       
       dec hl                   ;decrement timer
       ld a,h
       or l
       jp z,soundLoop           ;and loop until timer == 0

Now, instead of outputting the pin pulses immediately after the counter updates, we can also "collect" them. This will potentially save some time in the sound loop and will give better sound, because the pin pulses will be longer.

In the following example, register A holds the number of pulses to output, and A' will hold #10.

soundLoop:
       add ix,bc                 ;counter.ch1 := counter.ch1 + basefreq.ch1
       adc a,0                   ;IF carry, increment pulseCounter
       
       add iy,de                 ;counter.ch2 := counter.ch2 + basefreq.ch2
       adc a,0                   ;IF carry, increment pulseCounter

       or a
       jp nz,outputOn     
       out (#fe),a              ;OUTPUT state
       nop\nop\nop              ;adjust timing
       
                                ;now we can't use A to check the counter, hence...       
       dec l                    ;decrement timer lo-byte
       jp z,soundLoop           ;and loop if != 0
                                ;this is faster on average anyway, so use it whenever you can.      
       dec h
       jp z,soundLoop           ;and loop until timer == 0
       
outputOn:
       ex af,af'
       out (#fe),a
       ex af,af
       dec a                    ;decrement pulseCounter
       
       dec l                    ;decrement timer lo-byte
       jp z,soundLoop           ;and loop if != 0
                                ;this is faster on average anyway, so use it whenever you can.      
       dec h
       jp z,soundLoop           ;and loop until timer == 0

Even better, you can use this trick to simulate different volume levels, by adding a number >1 to the pulse counter on carry. Just don't overdo it, because eventually the engine will overload, ie. it will take too long until the engine works through the "backlog" of pulses to output. This method is used in OctodeXL, btw.



Skipping Counter Updates

You have a great idea for a sound core, but just can't get it up to speed? Well, here's a trick you can use to make your loop faster.
This trick is mostly relevant to pulse-interleaving engines with more than 2 channels.

The idea here is that you don't have to update all counters on each iteration of the sound loop. It is however important that you output all the states every time,
and that the volume (read: time taken) of each of the channels is equal across loop iterations.

Here's a theoretical, not very optimized example.


DE  = base frequency ch1
IX  = counter ch1
H   = output state ch1
SP  = base frequency ch2
IY  = counter ch2
L   = output state ch2
B   = timer

       ld hl,0                    ;initialize output states
       ld c,#fe                   ;port value, needed so we can use out (c),r command
       
soundLoop:
                         ;---LOOP ITERATION 1---
       out (c),h         ;12      ;OUTPUT state ch1
                         ;^ch2: 40
       add ix,de         ;15      ;counter.ch1 := counter.ch1 + basefreq.ch1
       out (c),l         ;12
                         ;^ch1: 27
       sbc a,a           ;4       ;IF carry, toggle state ch1
       and #10           ;7
       ld h,a            ;4
       ld a,r            ;9       ;adjust timing
       nop               ;4
 
                         ;---LOOP ITERATION 2--- 
       out (c),h         ;12
                         ;^ch2: 40
       add iy,sp         ;15      ;counter.ch2 := counter.ch2 + basefreq.ch2
       out (c),l         ;12
                         ;^ch1: 27
       sbc a,a           ;4
       and #10           ;7       ;IF carry, toggle state ch2               
       ld l,a            ;4
       djnz soundLoop    ;13      ;decrement timer and loop if !0

933

(3 replies, posted in Sinclair)

Thought I'd open a thread for brainstorming about optimizing various parts of beeper engines. I'm thinking especially about various issues related to data loading.

For a start, let's talk about frequency table lookup. Lately I tend to avoid it altogether, and instead store frequencies directly in the pattern data. But sometimes it comes in handy, I suppose. So, my method is quite primitive. Suppose we have a 16-bit lookup table aligned to a 256b border, and note values are already multiplied by 2.

       ld h,HIGH(frequency_lut)      ;7
       ld a,(de)                     ;7, load note val from pattern data
       ld l,a                        ;4
       ld c,(hl)                     ;7
       inc l                         ;4
       ld b,(hl)                     ;7, frequency now in BC

Which brings us to a total of 36t. Of course, if you don't care about sp, you could also do "ld sp,hl, pop bc" which would be 2t faster. Is there any faster way to do it, preferably without touching sp?

934

(5 replies, posted in Sinclair)

Ah yes, the famous Dancebit smile A true classic!

Well, XXL and me did this a while ago, based on LSengine: http://battleofthebits.org/arena/Entry/circls/12238/
Also, there is http://www.pouet.net/prod.php?which=58051, based on Squeaker engine by Zilogat0r.
A pity that the dl for Beep'em all 2600 is broken... paging XXL, please upload it somewhere again!

The Lynx has fairly complex audio hardware on board, so it's not really interesting for 1-bit development, I think. But we're still waiting for Mono to finish his Music Studio port for the Atari Portfolio wink

936

(2 replies, posted in Sinclair)

Gnnnnrrrrr! There goes my wonderful plan for a new 256b sample engine... yikes

937

(2 replies, posted in Sinclair)

Encountered something strange a while ago. It seems that on ZX Spectrum the carry flag is reset after OUTI (and possibly OUTD). However, in documentation both official and unofficial, it is claimed that OUTI has no effect on the carry flag. Is this a special "feature" of the Z80 used in the Speccy, or is the documentation incorrect?

Just to clarify, plugging in earphones isn't harmful. Just don't do it during normal TI-OS operation, ie. plug them in after you've started DoorsCS/Mirage/whatever.

939

(164 replies, posted in Sinclair)

Latest builds have 3 new engines: OctodeXL, ZX-7, and the newly created prdr.

@garvalf: What Linux flavour are you using? Haven't encountered these problems under Debian, though I haven't tested it thoroughly yet.

@Shiru: ZX-7 engine is giving me problems, complains about "the engine does not provide any data".

@introspec: hehe thanks wink It's gonna be a tough battle... TI has nearly the same setup as the Speccy, but it's also nearly twice as fast wink

garvalf wrote:

would the 84+ be much better than the 83+? It's more expensive anyway.
So far the 83+ I got seems ok. It's a "TI-83 Plus.fr" in fact, for making music with the "French Touch" wink

I got the cable link we talked about. It's working as a "grey link" (serial) cable. I didn't manage to make it work on linux with tilp, but I'll try on another computer. It just says the cable is not connected but my system is detecting it (with dmesg). On windows I got tilp to work (with efforts), I had to test several serial ports. The official TI Connect works the best. (I had to install by hand this driver http://www.prolific.com.tw/US/ShowProdu … mp;pcid=41)
I don't know if a silverlink would have worked better, I've read it was quite complicated to connect to linux. But I'll try more with mine...

Hmm, SilverLink works out-of-the-box for me (Debian+TiLP from the repos). Never had any probs with it.
I think the problem is that the cable is interpreted as serial when it is really USB. On the one hand it's not too surprising because originally GrayLink was a indeed a serial cable. Hmm... maybe you can force TiLP to use it as SilverLink via command line? Otherwise, if problems persist shoot Lionel Debroux (TilP dev) a mail, he's a really nice guy and he might be curious about this cable, too.

A few things which didn't work at first (not your fault):
- The first time I added some new patterns to your sample tune, it could compile but not be executed on the TI83, probably a memory problem. The message during execution was more saying something like "syntax error" so it wasn't easy to understand it was because of this.

Hmm, if there's a memory problem you usually wouldn't be able to transfer it to the machine in the first place. Perhaps you can send me the problematic song file so I can have a look? Maybe I made an error somewhere...

- Adding 2 rawp songs in the TI83 were also filling its memory badly.

Yes, undoubtedly so, because the rawp engine itself is rather huge. Best to recycle the player and just swap out the song data (have a look at rawp.asm, the pointer to the music data is on line 32)

- it's a pity they used those tiny jack connectors. I only found a earphone for using with it, so I'll search more or buy a new converter. When the earphones are connected, the calculator is very unresponsive. Probably with a jack converter it won't do this.
- no speakers on the TI, it's a pity too...

Yes, 2.5mm jack suxx big_smile The unresponsiveness is due to the calculator picking up phantom voltage from the earphones. Plugging them in after you've started the shell should help to avoid the problem.

- Thank you for telling me about the 8xp. I also tried the 83p files but they were also using the extra patterns so it couldn't work anyway.
- http://irrlichtproject.de/downloads/rawp-ti.zip is not responding...

Yeah, my stupid server is down again.

So in conclusion I managed to create some music and send it to the calculator, so I'm quite happy with this. I experienced some heavy detuning in comparison with the sounds on milkytracker so I need to work more with it to learn what works ok and what works less. It sounds amazing anyway, thanks for this work!

Thank you for trying it out! Unfortunately this engine uses 8-bit frequency counters, so detuning is to be expected from upper 3rd octave on. I'm working on a version with 16-bit counters though.

Edit re: 83+ vs 84+. Starting with the 83+ SE, the processor can be used in 15 MHz mode, which is awesome. However, I don't own any calcs of this generation (yet), so I'm not supporting this. Also, the size of the Flash RAM varies among models (though it's not necessarily bigger on 84+ models). Other than that, the 83+ and 84+ are practically identical.

Yes, the 83+ is decent, just got one myself. However, don't try the 83p on it - it needs the 8xp wink
The naming of these calcs is ridiculous, btw. Especially in France where all the machines get different names. Ie. TI-82 STATS = TI-83, it has nothing to do with TI-82. There is also TI-82 Plus which is a modified TI-84 Plus, and the TI-82 Advanced, which is a more locked down TI-82 Plus.

garvalf: Thanks, that is quite useful. I'll integrate that into the first part of the tutorial.
Shiru, Hikaru: Since Hikaru deleted his posts, I've moved the rest of the "discussion" to OT for the time being. Will delete it in a while if nobody objects.

That in itself would not be such a big problem as the later models use a similar setup, but unfortunately there is hardly any documentation regarding the consequences in this case. From what I've deduced over the years, the 82 Parcus is basically a TI-83 hardware-wise (using the same port layout and such), but running a modified 82 OS (which has not been documented properly either). I've been able to run software on it, but it seems the relocation process in CrASH19.0006 is buggy (or at least there is some feature of it that isn't documented), so usually stuff will crash on exit.

I've never actually tested any of my software on TI-82 STATS. Supposedly it's fully compatible with TI-83, but it would be great to get some confirmation of this. Well, whatever you do, just don't get a TI-82 Parcus. Since years I'm trying to figure out why stuff doesn't work on it like it's supposed to, but in the end the answer remains: Because it just doesn't.

Thanks! I was surprised, too, that 6 MHz was enough to get rid of the nasty discretion noise. I should revisit the Speccy version, see if I can speed it up some more, and perhaps add 16-bit counters while I'm at it.

Re the link cable, I use the "SilverLink" USB cable nowadays, works fine with all models despite what TI claims. I'm getting a new batch of them shortly, so I can give you one, provided we can work out a way to send it. Do you know anyone in the Netherlands who could take it, or do you think it's safe enough to try it via mail?

946

(2 replies, posted in Sinclair)

Amazing. Congratulations on this outstanding achievement, you've raised the bar to near unreachable levels once again!
Btw just recompiled 1tracker from source, still works fine with krue's patch.

As a byproduct of stuff I'm currently working on, I ported my rawp engine to TI Z80. Thanks to the faster CPU, it sounds much, much better than the original ZX Spectrum version.

For those of you who aren't aware of the original engine, here's the feature list:

- 2 tone channels
- 13 different sounds
- limited volume control
- 1 interrupting hihat sound
- per-step tempo control

download (includes XM converter, requires Perl)
sound example

948

(164 replies, posted in Sinclair)

Yes, it works! Thanks a ton, krue!

949

(164 replies, posted in Sinclair)

Ah, thanks krue. Alas, I only have a 32 bit system - any idea what changes I'd need to make? At the moment gcc chokes on scriptbuilder.cpp, with some weird errors like

angelscript/scriptbuilder/scriptbuilder.cpp:808:83: error: invalid conversion from ‘int*’ to ‘asUINT* {aka unsigned int*}’ [-fpermissive]
     t = engine->ParseToken(&modifiedScript[pos], modifiedScript.size() - pos, &len);
                                                                                   ^
In file included from angelscript/scriptbuilder/scriptbuilder.h:25:0,
                 from angelscript/scriptbuilder/scriptbuilder.cpp:1:
./angelscript/include/angelscript.h:764:24: note: initializing argument 3 of ‘virtual asETokenClass asIScriptEngine::ParseToken(const char*, size_t, asUINT*) const’
  virtual asETokenClass ParseToken(const char *string, size_t stringLength = 0, asUINT *tokenLength = 0) const = 0;

Here's a list of multi-channel routines for the ZX Spectrum and ZX-81. Who will be the first to use them all? wink


ZX Spectrum

Cross-Platform Multi-Engine Editors:
1tracker
Beepola
bintracker


anteater (utz)
2ch square wave, click drums, simple PWM, compact size
XM converter, 1tracker

beepertoy (utz)
meta-engine with multiple cores, including Squeeker, Tritone, and Octode emulation, wavetable synthesis, lo-pass/hi-pass filters
source, editor n/a

BeepTracker (Alone Coder)
5ch pin pulse, envelopes/volume control, fx, non-interrupting sample drums
native editor

betaphase (utz)
experimental 3ch phaser type engine, slides, noise mode
bintracker

BM-1 aka BeepModular-1 (utz)
experimental 2ch engine with JIT code modification, can emulate almost any other beeper engine
source, editor n/a

BuzzKick (Shiru)
Improved clone of FuzzClick (SpecialFX) with sampled drums.
1tracker

BT'man (Alone Coder)
5ch custom synthesis, volume control, fx
native editor

Ear Shaver (Shiru)
2ch Earth Shaker or PuInt Synthesis, pwm drums
1tracker

Earth Shaker (Michael Batty)
1,5ch custom synthesis, click drums
1tracker

fluidcore (utz)
4ch wavetable synthesis
XM converter

Fuzz Click see SpecialFX

Huby (Shiru)
2ch PFM, synth drum, compact size
XM converter, 1tracker, Beepola

LSengine '89 (Lyndon Sharp)
2ch custom synthesis, non-interrupting sampled drums
XM converter, 1tracker

LSengine '91 (Lyndon Sharp)
2ch custom synthesis, non-interrupting sampled drums
1tracker

LSMB (Lyndon Sharp)
Lyndon Sharp's Wham! The Music Box clone with sampled drums
1tracker

Music Box, the see Wham

Music Studio, the (Saša Pušica)
2ch custom synthesis, interrupting synth drums
native editor, Beepola, 1tracker

Music Synth (Simon C. Tillson)
2ch PFM, envelopes, interrupting synth drums
native editor, native editor (tracker edition)

nanobeep (utz)
2ch custom synthesis, click drum, compact size (56-77 bytes)
XM converter, 1tracker

nanobeep2 (utz)
2ch square wave, slightly less compact than original nanobeep (64-99 bytes depending on configuration), but more feature-rich
source, editor n/a

ntropic (utz)
2ch square wave, 1ch noise, click drum, compact size
XM converter, 1tracker

Octode (Shiru)
8ch PFM, click drums
XM converter, 1tracker

Octode XL (introspec)
8ch PFM, volume control, click drums
XM converter, 1tracker

Octode 2k15 (utz)
8ch PFM, click drums
XM converter, 1tracker

Octode 2k16 (utz)
8ch square wave (digital), click drums
XM converter, 1tracker

Octode PWM (utz)
8ch custom synthesis, click drums
XM converter, 1tracker

Orfeus see SpecialFX

Oleg Origin's Engines (Oleg Origin)
various engines with different capabilities
no public release available yet

Phaser1 (Shiru)
1ch square wave, 1ch dual generator square wave, fx, interrupting sample/synth drums
native editor, 1tracker, Beepola

Phaser2 (Shiru)
2ch dual generator square wave, fx, non-interrupting synth drums
1tracker

Phaser3 (Shiru)
Even more awesome than Phaser2.
1tracker

PhaserX (utz)
2ch Phaser type engine with a drawbar organ effect and click drums. Ch2 ops can be decoupled to form 2 Squeeker type channels.
bintracker

PhaseSqueek (utz)
Powerful Phaser/Squeeker hybrid with 2-4 channels, noise, drawbar organ fx, fx tables, click drums
bintracker

PlipPlop (✝Jonathan Smith)
1ch custom synthesis, click drums
Beepola

povver (utz)
3ch pulse wave with simple volume envelopes, noise mode, click drums
1tracker

poww (utz)
2ch custom synthesis, click drums
1tracker

prdr (Shiru)
2ch custom synthesis, pitch slides
1tracker

Pytha (utz)
2ch tri/rect/saw/noise, click drums
1tracker, bintracker

qaop (utz)
2ch wavetable synthesis, click drums
XM converter

Qchan (Shiru)
4ch PFM, envelopes/volume control, click drums
XM converter, Beepola

quattropic (utz)
4ch square wave, variable pulse width, noise, pitch slides
XM converter, 1tracker

rawp (utz)
2ch wavetable synthesis, click drums
XM converter

SampleTracker (CBM)
3ch digi
native editor

Savage (Jason C. Brooke)
2ch square wave, variable pulse width, fx, click drums
Creador Musical (native editor), Beepola

Savage HD (introspec)
2ch square wave, variable pulse width, fx, click drums
editor n/a, can patch Beepola output against source

Squat (Shiru)
4ch OR synthesis, noise mode, sampled drums
1tracker

Squeeker (Zilogat0r)
4ch OR synthesis, variable pulse width
native editor, XM converter

Squeeker Plus (utz)
4ch OR synthesis, pulse width envelopes, noise mode, slides, click drums
1tracker

SpecialFX (✝Jonathan Smith)
2ch PFM, envelopes, click drums
Orfeus (native editor), Beepola

Spectone-1 (Zoltan Janosy)
4ch custom synthesis, envelopes
editor n/a

Stocker (Shiru)
2ch PFM, full envelopes/volume control, click drums
Vortex Tracker converter, 1tracker

StringKS (utz)
2ch Karplus-Strong string synthesis, volume control, pwm drums
source

tbeepr (introspec)
2ch custom synthesis, variable pulse width, duty cycle sweep, interrupting click drums
1tracker, source

Tim Follin 3ch (Tim Follin)
3ch PFM, volumes
1tracker

Tritone (Shiru)
3ch square wave, variable pulse width, click drums
XM converter, Beepola, 1tracker

Tritone Digi (Shiru)
3ch square wave, variable pulse width, pwm drums
1tracker

Tritone FX (utz)
3ch square wave, variable pulse width, noise, tick-based fx, click drums
source, editor n/a

Vibra (utz)
2ch  tone, 1ch noise, vibrato, slides
1tracker

Wham (Mark Alexander)
2ch square wave, interrupting synth drums
native editor, native editor (tracker edition), Beepola

wtbeep (utz)
3ch tone with 32 selectable waveforms, click drums
1tracker

wtfx (utz)
2ch wavetable synthesis, tick-based fx
editor n/a, source

xtone (utz)
6ch square wave, variable pulse width, click drums
XM converter, 1tracker

yawp (utz)
3ch wavetable synthesis
XM converter

YU The Music Box see Music Studio, The

zbmod (utz)
3ch digi/samples
XM converter

ZX-3 (✝Ján Deák)
3ch PFM, envelopes
native editor, 1tracker

ZX-7 (✝Ján Deák)
8ch PFM
native editor, 1tracker

ZX-10 (✝Ján Deák)
4ch PFM, envelopes
1tracker

ZX-16 (✝Ján Deák)
16ch PFM, pitch slides
XM converter, MIDI converter



ZX81

1k2b (utz)
2ch square wave, click drums
XM converter