Ouch... xm template added. I have a hard time staying focussed these days
902 2015-09-16 13:04:40
Re: 7 days, 7 (new) beeper engines (65 replies, posted in Sinclair)
Eyyup, here we go again:
Day 3: xtone
- 6 channels of square wave sound
- limited duty cycle control
- 16-bit frequency resolution
- 3 interrupting click drum sounds
- per-row speed control
- 16.2 KHz mixing
example tune
download (includes XM converter as usual)
source
Now we're getting serious xtone is basically like Tritone, but with 6 channels. Inevitably, the sound is quite a bit grittier though, and duty cycle
control is less accurate, though you still get at least 4 different settings.
903 2015-09-16 11:51:43
Re: 7 days, 7 (new) beeper engines (65 replies, posted in Sinclair)
Yo Tufty, here's the .tap for the qaop demo track. It was hand-coded in asm so there's no XM for this one
904 2015-09-16 11:21:21
Re: Mewtone (WIP) (7 replies, posted in Sinclair)
What I meant was that it doesn't matter if you define silence as 0 or 1, because as far as I understand the beeper has a heavy DC offset, ie. it doesn't output 0V in either 0 or 1 state. So neither 0 or 1 will produce true silence in the actual meaning of the word.
905 2015-09-16 11:15:03
Re: 7 days, 7 (new) beeper engines (65 replies, posted in Sinclair)
Thanks for the cheers, guys
I've found and (hopefully) fixed a few bugs in the qaop and quattropic XM converters, so please re-download.
Also, I've added a standalone executable converter to the quattropic package, so now you can do things without using Perl. However, I just started to learn C++ yesterday, so it's probably loaded with bugs. But I'd still appreciate if you guys gave it a try and let me know if you run into any problems with it.
New engine for today is coming in a couple of hours, stay tuned
906 2015-09-15 12:47:30
Re: Mewtone (WIP) (7 replies, posted in Sinclair)
Ah, the mysteries of the Speccy beeper. I really don't have a clue what's going on here, maybe introspec can shed some more light.
Regarding the duty comparison, actually the other way around (ld a,h, cp duty) is equally correct. Why? Because if H=0, then H-duty will result in carry. Which means the channel will output 1 when muted.
907 2015-09-15 12:41:16
Re: 7 days, 7 (new) beeper engines (65 replies, posted in Sinclair)
A new day, a new engine.
Day 2: quattropic
- 4 channels of square wave sound
- full duty cycle control
- one of the channels can play noise or fast pitch slides instead of regular tone
- said channel also supports note cut
- 16-bit frequency resolution
- 15.6 KHz mixing
example tune
download
source (includes XM converter)
quattropic is the big brother of ntropic - twice as many channels, and you can even vary the sound of the noise. This comes at a small price, however: There is no per-row speed control in this engine. (It could be easily implemented, but would take another 2 bytes of song data per step.)
quattropic is a little easier to simulate in XM, but still you won't get the full range of sounds out of the template, unfortunately.
908 2015-09-14 13:40:58
Topic: 7 days, 7 (new) beeper engines (65 replies, posted in Sinclair)
As promised, I'll go a bit crazy this week (well, more than usual anyway) and release a new beeper engine every day. So let's get right to it
Day 1: qaop, aka Quite Accurate Overdriven Player
- 2 channel PCM WAV playback
- uses looped 256 byte samples
- up to 3 bit sample depth, downmixed to 3-bit output (silence + 6 volume levels)
- 16-bit frequency resolution
- 3 interrupting click drum sounds
- per-row speed control
- 15.6 KHz mixing
example tune
download (includes XM converter, Perl required as usual)
source
This one I'm quite proud of. It basically fixes all the issues in my earlier rawp engine. qaop fast enough to hide the discretion noise, and has stable tuning due to using proper 16-bit frequency counters. And there is a bonus: When mixing two loud enough samples, the engine will overdrive, which will give you some extra crunch, as heard on the kick drums in the example tune.
The downside is that the XM converter is very basic - if you want to use any additional samples (which is the whole point of this engine), you'll have to hack them in yourself.
909 2015-09-14 13:23:29
Re: 1-Bit Forum Music Compo 2015 (12 replies, posted in General Discussion)
Vote page is up!
Voting deadline is Sunday, September 20th.
910 2015-09-14 08:28:09
Re: 1-Bit Forum Music Compo 2015 (12 replies, posted in General Discussion)
The contest is now closed. Thanks to everybody who submitted!
Vote page/pack will go online tonight or tomorrow at the latest.
911 2015-09-13 11:12:59
Re: Mewtone (WIP) (7 replies, posted in Sinclair)
Hmm, sounds pretty good to my ears I especially like that drums and tones are very well balanced, volume wise.
And yes, the "code" part of the compo will indeed most likely not happen due to lack of entries. So I think I'll just release my own entries one by one over the course of the coming week.
I'm curious about your "realtime saw wave" engine, too, sounds like a very interesting concept.
912 2015-09-10 09:31:51
Re: Youtube dump (11 replies, posted in General Discussion)
Hehe thanks. That video is actually a little misleading as the footage is mostly not from lztek Am playing the track live from actual Speccy, the laptop is from the DJ that was playing inbetween and after the liveacts. And yeah, I did play Crystal Realm, too
913 2015-09-07 11:33:53
Re: The optimization thread (3 replies, posted in Sinclair)
I'd go for option 2. Unless you preshift note values like in the example above, you never need bit 7, so you can use that to signal detune. Option 1 would be not so practical, because with 16-bit frequencies, you typically need to recalculate the detune value specifically for every note anyway.
Option 2 then again boils down to two choices. Either you interpret this and the following byte as a direct frequency value (ie. skipping the table lookup), which would limit frequency range to 0-$7fff, or you interpret it as note value, followed by a byte-length detune value, which you'd then multiply with e.g. (hi-byte of the frequency/16) or so to get a decent detune range.
914 2015-09-02 13:13:50
Re: Youtube dump (11 replies, posted in General Discussion)
Ah, so happy Yeah, that's Whittaker alright.
Ok, here's another one - irrlicht project live @ Ohrbit Duisburg: https://www.youtube.com/watch?v=2ljnBXYOr-Y
915 2015-08-31 15:01:52
Re: 1-bit music on Thomson 8-bit computers (3 replies, posted in Other Platforms)
Wow, didn't know this existed. Though one has to wonder why they don't make full use of the 6-bit DAC. But I assume it's like on Dragon/CoCo - generating 1-bit music might simply be faster than using full 6-bit DAC. In fact in the contest, we'll have a CoCo 1-bit routine
916 2015-08-31 14:53:39
Re: 1-Bit Forum Music Compo 2015 (12 replies, posted in General Discussion)
Deadline extended till Sunday, September 13th, because some people asked for more time. Also, we need more works in the "alternative platforms" category!
917 2015-08-27 18:02:34
Re: 1-bit ZX Beeper albums (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.
918 2015-08-27 17:55:11
Re: Beepolyator - convertor from midi to zx16 (6 replies, posted in Sinclair)
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
919 2015-08-25 13:11:53
Re: 1-bit engines for Atari 2600 and/or Atari Lynx (3 replies, posted in Atari)
Huhu xxl, do you still have Beep'em all 2600 somewhere?
920 2015-08-25 13:09:36
Topic: Youtube dump (11 replies, posted in General Discussion)
Let's dump the cool shit here
This vid about the PC Speaker is pretty cool, would be nice to have English subs though.
https://www.youtube.com/watch?v=NIyQueXqRYE
921 2015-08-24 08:42:12
Re: 1-Bit Forum Music Compo 2015 (12 replies, posted in General Discussion)
Wow garvalf, that's a lot of spamming Thanks a ton for spreading the word!
922 2015-08-18 21:17:02
Re: Editor-Only Data (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
923 2015-08-18 21:11:57
Re: Tutorial: How to Write a 1-Bit Music Routine (56 replies, posted in General Discussion)
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
924 2015-08-17 12:32:54
Topic: The optimization thread (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?
925 2015-08-17 12:11:10
Re: colorbepp 2 (5 replies, posted in Sinclair)
Ah yes, the famous Dancebit A true classic!