<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[The 1-Bit Forum — next gen engine ideas]]></title>
	<link rel="self" href="https://randomflux.info/1bit/extern.php?action=feed&amp;tid=66&amp;type=atom" />
	<updated>2023-10-23T22:47:22Z</updated>
	<generator>PunBB</generator>
	<id>http://randomflux.info/1bit/viewtopic.php?id=66</id>
		<entry>
			<title type="html"><![CDATA[Re: next gen engine ideas]]></title>
			<link rel="alternate" href="http://randomflux.info/1bit/viewtopic.php?pid=2928#p2928" />
			<content type="html"><![CDATA[<p>Found a new el-cheapo PRNG/noise generator. It&#039;s a bit slower than the usual add hl,de; rlc h variations, but needs only 1 register pair instead of 2. It also sounds a bit different.</p><div class="codebox"><pre><code>  ld a,MAGIC_NUM
  add a,e
  rrca
  xor d
  ld e,a
  inc d</code></pre></div><p>For MAGIC_NUM, most values do pretty much the same, except some that are straight metallic beeps and a few that sound more rumbly.<br />test.tap plays through all possible values.</p><p>The main downside is that we can&#039;t smc-hotswap this with regular tone channel code. What could work though is to hotswap it on an 8-bit divider and use a separate 8-bit pre-scale on this. Pre-scale would pitch the noise as well. Unfortunately the perceived pitch of the noise is quite a bit lower than using add hl,de; rlc h. Not sure if it&#039;s actually much of an improvement over just lazily reading from ROM:</p><div class="codebox"><pre><code>  ld a,(de)
  inc de</code></pre></div>]]></content>
			<author>
				<name><![CDATA[utz]]></name>
				<uri>http://randomflux.info/1bit/profile.php?id=2</uri>
			</author>
			<updated>2023-10-23T22:47:22Z</updated>
			<id>http://randomflux.info/1bit/viewtopic.php?pid=2928#p2928</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: next gen engine ideas]]></title>
			<link rel="alternate" href="http://randomflux.info/1bit/viewtopic.php?pid=2823#p2823" />
			<content type="html"><![CDATA[<p>Ha, I missed that gem <img src="http://randomflux.info/1bit/img/smilies/wink.png" width="15" height="15" alt="wink" /></p>]]></content>
			<author>
				<name><![CDATA[utz]]></name>
				<uri>http://randomflux.info/1bit/profile.php?id=2</uri>
			</author>
			<updated>2023-02-05T22:14:51Z</updated>
			<id>http://randomflux.info/1bit/viewtopic.php?pid=2823#p2823</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: next gen engine ideas]]></title>
			<link rel="alternate" href="http://randomflux.info/1bit/viewtopic.php?pid=2820#p2820" />
			<content type="html"><![CDATA[<p><img src="http://randomflux.info/1bit/img/smilies/big_smile.png" width="15" height="15" alt="big_smile" /></p><p>From the article Grayscale on 1-bit LCDs:</p><p>&quot;To be honest, I didn’t come to this stage by accident, I have worked with delta-sigma modulators and noise shapers in audio applications before so I know these, and I have been wondering about if they could be applied to driving these LCDs for a long time.&quot;</p>]]></content>
			<author>
				<name><![CDATA[XoRRoX]]></name>
				<uri>http://randomflux.info/1bit/profile.php?id=184</uri>
			</author>
			<updated>2023-01-31T15:47:12Z</updated>
			<id>http://randomflux.info/1bit/viewtopic.php?pid=2820#p2820</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: next gen engine ideas]]></title>
			<link rel="alternate" href="http://randomflux.info/1bit/viewtopic.php?pid=2808#p2808" />
			<content type="html"><![CDATA[<p>Ah, yes, of course. I&#039;m clearly getting senile.</p><p>Don&#039;t think it was me who invented the rla trick. I&#039;d be a cheap bastard and omit both the rla and the sbc a,a. Doing that could potentially open up a few more possibilities here, but with the unrolled loop, modifying 3 bytes might not be worth it. Even without that, I&#039;ve got a feeling there are more possibilities hiding in those 2 bytes. I just don&#039;t see them right now. #dd 0 0 would give a pin pulse, of course, but that&#039;s probably not very useful in this setup. You could also swap bc and sp. Then #dd 0, add b/c would give duty control for example, but we already have that via phase offset, of course.</p>]]></content>
			<author>
				<name><![CDATA[utz]]></name>
				<uri>http://randomflux.info/1bit/profile.php?id=2</uri>
			</author>
			<updated>2023-01-14T11:48:50Z</updated>
			<id>http://randomflux.info/1bit/viewtopic.php?pid=2808#p2808</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: next gen engine ideas]]></title>
			<link rel="alternate" href="http://randomflux.info/1bit/viewtopic.php?pid=2807#p2807" />
			<content type="html"><![CDATA[<p>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?).</p><p>Oh yeah, dithering applied to the 1-bit sound synthesis may bring some quite interesting results! Cool idea, never thought about that.</p>]]></content>
			<author>
				<name><![CDATA[Shiru]]></name>
				<uri>http://randomflux.info/1bit/profile.php?id=11</uri>
			</author>
			<updated>2023-01-14T00:07:47Z</updated>
			<id>http://randomflux.info/1bit/viewtopic.php?pid=2807#p2807</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: next gen engine ideas]]></title>
			<link rel="alternate" href="http://randomflux.info/1bit/viewtopic.php?pid=2806#p2806" />
			<content type="html"><![CDATA[<p>Wahoo, now you&#039;re on a roll!</p><p>Excuse me for having a brain freeze right now, but what is the purpose of the rla in normal phasing mode?</p><p>Some tangentially related, inspirational reading: <a href="https://www.zephray.me/post/grayscale_lcd/">Grayscale on 1-bit LCDs</a>. Would be interesting to try and apply some of the more advanced techniques to 1-bit music. Iirc perevalovds was using <a href="http://randomflux.info/1bit/viewtopic.php?pid=2318#p2318">error diffusion of sorts for 1-bit sampling</a>.</p>]]></content>
			<author>
				<name><![CDATA[utz]]></name>
				<uri>http://randomflux.info/1bit/profile.php?id=2</uri>
			</author>
			<updated>2023-01-14T00:03:01Z</updated>
			<id>http://randomflux.info/1bit/viewtopic.php?pid=2806#p2806</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: next gen engine ideas]]></title>
			<link rel="alternate" href="http://randomflux.info/1bit/viewtopic.php?pid=2805#p2805" />
			<content type="html"><![CDATA[<p>Some more cool finds for Phaser4 (currently in development) specifically:</p><p>Regular XOR/OR/AND modes in Phaser3 were:</p><div class="codebox"><pre><code>    add hl,bc
    ld a,h
    add ix,sp
    xor/and/or ixh
    rla
    sbc a,a
    and 16
    out (#fe),a</code></pre></div><p>Now, instead of xor ixh:rla we can do more by changing just two bytes - keeping the ix/iy prefix in place:</p><p>cp ixh:nop - the CrossPhase<br />adc a,ixh:add a,h - fat octaving noisy timbre<br />xor ixh:sub h - more noise in a similar timbre<br />xor ixh:sub l - very noisy yet still tonal timbre<br />xor ixl:sub h - periodic noise of one kind<br />xor ixl:sub l - periodic noise of another kind</p><p>And another cool thing is that Phaser3 unrolls the sound loop 4 times for pseudo volume effects. And we&#039;re not obliged to use the same &#039;algorithm&#039; in each iteration, we can mix in any 4, getting even more weird timbres.</p>]]></content>
			<author>
				<name><![CDATA[Shiru]]></name>
				<uri>http://randomflux.info/1bit/profile.php?id=11</uri>
			</author>
			<updated>2023-01-13T22:47:18Z</updated>
			<id>http://randomflux.info/1bit/viewtopic.php?pid=2805#p2805</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: next gen engine ideas]]></title>
			<link rel="alternate" href="http://randomflux.info/1bit/viewtopic.php?pid=2793#p2793" />
			<content type="html"><![CDATA[<p>Nom nom, that CrossPhase has a very satisfying sound. Great discovery.</p><p>I&#039;ve used the idea behind ModPhase (without the xor modulation) a couple of places, BetaPhase for example. The good thing is that it can be done in the outer loop, which also allows for variable speed (by adding a variable amount to DE). In a pinch, one could even abuse the outer length counter for this, hehe.</p>]]></content>
			<author>
				<name><![CDATA[utz]]></name>
				<uri>http://randomflux.info/1bit/profile.php?id=2</uri>
			</author>
			<updated>2023-01-10T16:06:34Z</updated>
			<id>http://randomflux.info/1bit/viewtopic.php?pid=2793#p2793</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: next gen engine ideas]]></title>
			<link rel="alternate" href="http://randomflux.info/1bit/viewtopic.php?pid=2791#p2791" />
			<content type="html"><![CDATA[<p>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.</p>]]></content>
			<author>
				<name><![CDATA[Shiru]]></name>
				<uri>http://randomflux.info/1bit/profile.php?id=11</uri>
			</author>
			<updated>2023-01-10T15:32:36Z</updated>
			<id>http://randomflux.info/1bit/viewtopic.php?pid=2791#p2791</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: next gen engine ideas]]></title>
			<link rel="alternate" href="http://randomflux.info/1bit/viewtopic.php?pid=2789#p2789" />
			<content type="html"><![CDATA[<p>And if we just drop xor N right before cp d, it gives a quite interesting modulation control!</p>]]></content>
			<author>
				<name><![CDATA[Shiru]]></name>
				<uri>http://randomflux.info/1bit/profile.php?id=11</uri>
			</author>
			<updated>2023-01-10T12:54:06Z</updated>
			<id>http://randomflux.info/1bit/viewtopic.php?pid=2789#p2789</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: next gen engine ideas]]></title>
			<link rel="alternate" href="http://randomflux.info/1bit/viewtopic.php?pid=2788#p2788" />
			<content type="html"><![CDATA[<p>The idea above gives this simple PWM modulation type for the 16-bit adders system. It takes two 16-bit accumulators but a single adder:</p><div class="codebox"><pre><code>    ld hl,0 ;acc1
    ld de,0 ;acc2
    ld bc,100 ;adder
    
loop

    add hl,bc
    ld a,h
    inc de
    cp d
    sbc a,a
    and 16
    out (#fe),a

    jp loop</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Shiru]]></name>
				<uri>http://randomflux.info/1bit/profile.php?id=11</uri>
			</author>
			<updated>2023-01-10T12:47:40Z</updated>
			<id>http://randomflux.info/1bit/viewtopic.php?pid=2788#p2788</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: next gen engine ideas]]></title>
			<link rel="alternate" href="http://randomflux.info/1bit/viewtopic.php?pid=2787#p2787" />
			<content type="html"><![CDATA[<p>Just come up with a dumb, but more controllable and thus usable PWM-like modulation idea:</p><br /><div class="codebox"><pre><code>    ld hl,0
    ld bc,100
    exx
    ld hl,0
    ld bc,201
    
loop

    add hl,bc
    ld a,h
    exx
    add hl,bc
    cp h
    exx
    sbc a,a
    and 16
    out (#fe),a

    jp loop</code></pre></div><p>bc=100, bc&#039;=100+detune is the regular PWM like drift, bc=100, bc&#039;=bc*2+detune is one with octave etc, bc&#039;=bc*4+detune is another octave, etc. Other not related values is kinda Earth Shaker&#039;y, but not so much, a different kind of the sound.</p><br /><p>Edit: I tested it out, and it actually matches exactly to Phaser1 in the resulting sound for any given adders I thought to test. Interesting.</p><p>Re-Edit: Nah, I messed up the previous test (was testing it inside Ear Shaver EX framework, and used a wrong pointer). It is really different both from EarthShaker and Phaser1! Hence giving this potential engine a name of CrossPhase, will add it as an Ear Shaver EX&#039;s update for now.</p>]]></content>
			<author>
				<name><![CDATA[Shiru]]></name>
				<uri>http://randomflux.info/1bit/profile.php?id=11</uri>
			</author>
			<updated>2023-01-10T11:53:02Z</updated>
			<id>http://randomflux.info/1bit/viewtopic.php?pid=2787#p2787</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: next gen engine ideas]]></title>
			<link rel="alternate" href="http://randomflux.info/1bit/viewtopic.php?pid=2786#p2786" />
			<content type="html"><![CDATA[<p>the last test.tap reminds me of some bytebeat effects!&nbsp; Sounds a bit like a human voice...</p>]]></content>
			<author>
				<name><![CDATA[garvalf]]></name>
				<uri>http://randomflux.info/1bit/profile.php?id=6</uri>
			</author>
			<updated>2023-01-09T18:14:09Z</updated>
			<id>http://randomflux.info/1bit/viewtopic.php?pid=2786#p2786</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: next gen engine ideas]]></title>
			<link rel="alternate" href="http://randomflux.info/1bit/viewtopic.php?pid=2784#p2784" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>    di
    ld hl,0
    ld de,0
    ld bc,#180
    ld sp,#38+#180/4

.play_note
    add hl,bc

    ex de,hl
    add hl,sp
    ccf
    sbc a,a
    ex de,hl
    and h
    ld h,a

    cp #20
    sbc a,a
    out (#fe),a

    dec ixl
    jr nz,.play_note
    dec bc
    jr .play_note</code></pre></div><p>Not going to pretend I have any idea what&#039;s going on here. Some interesting sounds happening though. Seems that the note frequency is actually determined by the value in sp, not the one in bc. Just resetting the phase without additional modulation in the outer loop does something rather Earth Shaker-y. inc sp instead of dec bc is fun, too. No idea how to make any practical use of all of this, though.</p>]]></content>
			<author>
				<name><![CDATA[utz]]></name>
				<uri>http://randomflux.info/1bit/profile.php?id=2</uri>
			</author>
			<updated>2023-01-09T17:19:00Z</updated>
			<id>http://randomflux.info/1bit/viewtopic.php?pid=2784#p2784</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: next gen engine ideas]]></title>
			<link rel="alternate" href="http://randomflux.info/1bit/viewtopic.php?pid=2783#p2783" />
			<content type="html"><![CDATA[<p>Yeah, I trying to get my head around it, but it doesn&#039;t really works the expected way. The inner adder works as usual, 3500000/t-states of inner loop/(65536/FREQ1). The outer adder is presumably 3500000*number of inner loop iterations/t-states of inner loop/(65536/FREQ2). However, when the second (modulation) frequency happens to be above the inner loop sample rate, i.e. a few phase changes should happen, it introduces another frequency into the equation, a kind of low frequency carrier, and the resulting frequency kinda gets unpredictable.</p><p>Not that it is useless anyways, but to make it usable from composer standpoint it is better to find a way to provide the secondary divider in a form better than a 0..65535 value per note.</p>]]></content>
			<author>
				<name><![CDATA[Shiru]]></name>
				<uri>http://randomflux.info/1bit/profile.php?id=11</uri>
			</author>
			<updated>2023-01-09T15:45:54Z</updated>
			<id>http://randomflux.info/1bit/viewtopic.php?pid=2783#p2783</id>
		</entry>
</feed>
