<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[The 1-Bit Forum — A New Engine? Nearly.]]></title>
	<link rel="self" href="https://randomflux.info/1bit/extern.php?action=feed&amp;tid=224&amp;type=atom" />
	<updated>2019-12-03T13:33:07Z</updated>
	<generator>PunBB</generator>
	<id>http://randomflux.info/1bit/viewtopic.php?id=224</id>
		<entry>
			<title type="html"><![CDATA[Re: A New Engine? Nearly.]]></title>
			<link rel="alternate" href="http://randomflux.info/1bit/viewtopic.php?pid=2068#p2068" />
			<content type="html"><![CDATA[<p>Thanks for the encouragement.<br />A few tweaks later, and it starts an octave lower and has a much larger useful range before the tuning (and aliasing) render it crap.</p><p>I&#039;ve also introduced a &quot;rests&quot;, which will help.</p><p>Making an Excel spreadsheet, with lots of use of Concatenate to generate copy and pastable &quot;equ&quot; statements for my assembler has improved things no end... And should make any music I make with it much more portable down the line, so thanks for that tip.</p><p>I&#039;ll post source code, etc, when I&#039;ve reached a v1 that I&#039;m happy with.</p>]]></content>
			<author>
				<name><![CDATA[uglifruit]]></name>
				<uri>http://randomflux.info/1bit/profile.php?id=128</uri>
			</author>
			<updated>2019-12-03T13:33:07Z</updated>
			<id>http://randomflux.info/1bit/viewtopic.php?pid=2068#p2068</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: A New Engine? Nearly.]]></title>
			<link rel="alternate" href="http://randomflux.info/1bit/viewtopic.php?pid=2067#p2067" />
			<content type="html"><![CDATA[<p>it sounds neat! Well done!</p>]]></content>
			<author>
				<name><![CDATA[garvalf]]></name>
				<uri>http://randomflux.info/1bit/profile.php?id=6</uri>
			</author>
			<updated>2019-12-03T07:57:10Z</updated>
			<id>http://randomflux.info/1bit/viewtopic.php?pid=2067#p2067</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: A New Engine? Nearly.]]></title>
			<link rel="alternate" href="http://randomflux.info/1bit/viewtopic.php?pid=2066#p2066" />
			<content type="html"><![CDATA[<p>Yay, congratulations on this achievement! And welcome to the rabbit hole of 1-bit engine making <img src="http://randomflux.info/1bit/img/smilies/big_smile.png" width="15" height="15" alt="big_smile" /></p><p>Ehh, I wish I had Shiru&#039;s advice back in the day when I started to make my own engines. Could never wrap my head around it back in the day. Just like I couldn&#039;t figure out 16-bit dividers, lol. Speaking of which, I&#039;d say try to figure those out next. Aside from having a greater note range, it actually makes things simpler <img src="http://randomflux.info/1bit/img/smilies/wink.png" width="15" height="15" alt="wink" /></p><p>Of course, if you have any questions, ask away. More than happy to help.</p>]]></content>
			<author>
				<name><![CDATA[utz]]></name>
				<uri>http://randomflux.info/1bit/profile.php?id=2</uri>
			</author>
			<updated>2019-11-29T18:06:39Z</updated>
			<id>http://randomflux.info/1bit/viewtopic.php?pid=2066#p2066</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: A New Engine? Nearly.]]></title>
			<link rel="alternate" href="http://randomflux.info/1bit/viewtopic.php?pid=2065#p2065" />
			<content type="html"><![CDATA[<p>I&#039;ll give that a go, that may well be quicker than my brutal approach (play ALL the notes from 255 - 1), then record the output, and note down the values that are closest to pitches I wanted.</p><p>I have now equ&#039;d my pitch values in my assembler, which at least means I can do that bit slightly quicker now - I can&#039;t believe I didn&#039;t think of that!</p>]]></content>
			<author>
				<name><![CDATA[uglifruit]]></name>
				<uri>http://randomflux.info/1bit/profile.php?id=128</uri>
			</author>
			<updated>2019-11-29T13:44:25Z</updated>
			<id>http://randomflux.info/1bit/viewtopic.php?pid=2065#p2065</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: A New Engine? Nearly.]]></title>
			<link rel="alternate" href="http://randomflux.info/1bit/viewtopic.php?pid=2064#p2064" />
			<content type="html"><![CDATA[<p>Sounds legit, would be at home in a pre-1985 ZX game.</p><p>You don&#039;t really need to hand tune pitch values, just use any script engine to calculate them out. JS, Python, etc.</p><p>Then, if you go with composing by typing in the pitch values, you don&#039;t have to have a spreadsheet. Just make aliases, like C_2=100 (or C_2 equ 100 in some assemblers). Now you can just use note names in your db&#039;s.</p><p>Then, to save time, you can just generate both pitch values and aliases with the same script, and save a ton of time. You can do this with <a href="https://js.do/,">https://js.do/,</a> for example. Just go there, copy/paste code below, click Run.</p><div class="codebox"><pre><code>&lt;script&gt;

    //standart note table for a high octave

    NoteFreqTable=new Array( 2093.0,2217.4,2349.2,2489.0,2637.0,2793.8,2960.0,3136.0,3322.4,3520.0,3729.2,3951.0 );

    NoteNameTable=new Array(&quot;C_&quot;,&quot;Cs&quot;,&quot;D_&quot;,&quot;Ds&quot;,&quot;E_&quot;,&quot;F_&quot;,&quot;Fs&quot;,&quot;G_&quot;,&quot;Gs&quot;,&quot;A_&quot;,&quot;As&quot;,&quot;B_&quot;);
    
    //generate note to period table

    cpuClock=3500000.0;
    cpuToneLoop=200.0;    //cycles per engine loop
    div=32.0;

    for(octave=0;octave&lt;8;++octave)
    {
        for(note=0;note&lt;12;++note)
        {
            period=Math.floor((cpuClock/(cpuToneLoop/2.0))/(NoteFreqTable[note]/div));

            document.write(NoteNameTable[note]+octave+&quot; equ &quot;+period+&quot;&lt;br&gt;&quot;);
        }

        div=div/2;
    }

&lt;/script&gt;</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Shiru]]></name>
				<uri>http://randomflux.info/1bit/profile.php?id=11</uri>
			</author>
			<updated>2019-11-29T02:16:55Z</updated>
			<id>http://randomflux.info/1bit/viewtopic.php?pid=2064#p2064</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[A New Engine? Nearly.]]></title>
			<link rel="alternate" href="http://randomflux.info/1bit/viewtopic.php?pid=2063#p2063" />
			<content type="html"><![CDATA[<p>A pretty simple, and not quite complete 1-bit engine.</p><p>I know I&#039;ve been re-inventing-the-wheel here, but I&#039;m still quite proud of doing it from scratch.</p><p>It is a monophonic, square-wave monophonic thing - but the duty-cycle varies back and forth as it plays each note from &#039;0-100%&#039; quite pleasingly I think.</p><p>It&#039;s based on 8-bit &#039;pitch&#039; values, and I&#039;ve spent *way* too long hand-tuning it, and then working out values to get a &#039;lengths&#039; for each of the different pitches of notes that are consistent.</p><p>It plays reliably just under 2 octaves (From C#).&nbsp; I think ultimately I&#039;ll make a look up table of pitch values, and length multipliers so it&#039;s a bit easier to compose for without an excel spreadsheet to hand!</p>]]></content>
			<author>
				<name><![CDATA[uglifruit]]></name>
				<uri>http://randomflux.info/1bit/profile.php?id=128</uri>
			</author>
			<updated>2019-11-29T01:13:57Z</updated>
			<id>http://randomflux.info/1bit/viewtopic.php?pid=2063#p2063</id>
		</entry>
</feed>
