<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[The 1-Bit Forum — new engine: Phase Squeek]]></title>
		<link>http://randomflux.info/1bit/viewtopic.php?id=101</link>
		<atom:link href="https://randomflux.info/1bit/extern.php?action=feed&amp;tid=101&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in new engine: Phase Squeek.]]></description>
		<lastBuildDate>Mon, 31 Oct 2016 16:23:59 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: new engine: Phase Squeek]]></title>
			<link>http://randomflux.info/1bit/viewtopic.php?pid=1037#p1037</link>
			<description><![CDATA[<p>sounds very good</p>]]></description>
			<author><![CDATA[null@example.com (xxl)]]></author>
			<pubDate>Mon, 31 Oct 2016 16:23:59 +0000</pubDate>
			<guid>http://randomflux.info/1bit/viewtopic.php?pid=1037#p1037</guid>
		</item>
		<item>
			<title><![CDATA[Re: new engine: Phase Squeek]]></title>
			<link>http://randomflux.info/1bit/viewtopic.php?pid=1035#p1035</link>
			<description><![CDATA[<p>Alright, we&#039;ve got a working PhaseSqueek config! It&#039;s pretty complete, except that MDAL doesn&#039;t support tables that aren&#039;t linked from a pattern yet. <br />For example something like this doesn&#039;t work yet:<br /></p><div class="codebox"><pre><code>:SEQUENCE
    pattern1
:pattern1
    A=c1, FX=fx1
    .
:fx1
   A=c1
   A=d1
   A=e1
   FXJUMP=fx2
:fx2
   A=f1
   A=g1
   FXJUMP=fx2</code></pre></div><p>I have to say, MDAL makes things easier, but the engine is still a major p.i.t.a. to use. You have to be very careful especially when constructing tables, because of the data format quirks. For example, if you have A and B set in your pattern, and want to use a table that modifies A, then you should set B again at the start of the table. This is because the player expects a value for B when A is set, but mdalc has no means of knowing what that value should be, and thus will fall back to the default value if you don&#039;t tell it to do otherwise. (Setting the value once is enough, mdalc will use the value that was last set from this point on). Likewise, SIDA requires SIDB, ESA, and ESB and vice versa. Also, when in doubt, use PAB/PCD=0 to reset the phase.</p>]]></description>
			<author><![CDATA[null@example.com (utz)]]></author>
			<pubDate>Mon, 31 Oct 2016 14:42:53 +0000</pubDate>
			<guid>http://randomflux.info/1bit/viewtopic.php?pid=1035#p1035</guid>
		</item>
		<item>
			<title><![CDATA[Re: new engine: Phase Squeek]]></title>
			<link>http://randomflux.info/1bit/viewtopic.php?pid=1033#p1033</link>
			<description><![CDATA[<p>Not 100% there yet with PhaseSqueek, some details are still missing. For example, I&#039;ve recently added label prefixes, to minimize the change of name collisions (eg. if you name a pattern &quot;pattern1&quot;, it&#039;ll be named &quot;mdp_pattern1&quot; in the asm output. However, I still need to implement this for commands that set a pointer (which the PhaseSqueek config uses). Once these things are taken care of though, MDAL should be able to support almost all existing beeper engines, except those that use multi-track sequences and/or samples.</p>]]></description>
			<author><![CDATA[null@example.com (utz)]]></author>
			<pubDate>Fri, 28 Oct 2016 21:55:49 +0000</pubDate>
			<guid>http://randomflux.info/1bit/viewtopic.php?pid=1033#p1033</guid>
		</item>
		<item>
			<title><![CDATA[Re: new engine: Phase Squeek]]></title>
			<link>http://randomflux.info/1bit/viewtopic.php?pid=1032#p1032</link>
			<description><![CDATA[<p>congrat! So now there are already 3 engines... well done.</p>]]></description>
			<author><![CDATA[null@example.com (garvalf)]]></author>
			<pubDate>Fri, 28 Oct 2016 18:41:48 +0000</pubDate>
			<guid>http://randomflux.info/1bit/viewtopic.php?pid=1032#p1032</guid>
		</item>
		<item>
			<title><![CDATA[Re: new engine: Phase Squeek]]></title>
			<link>http://randomflux.info/1bit/viewtopic.php?pid=1031#p1031</link>
			<description><![CDATA[<p>I&#039;ve got some very good news: The core table parser is implemented and working. In other words, MDAL just generated the first complete and (more or less) working music.asm for PhaseSqueek. There&#039;s a number of things that still need tweaking, but we&#039;re definately getting there.</p>]]></description>
			<author><![CDATA[null@example.com (utz)]]></author>
			<pubDate>Fri, 28 Oct 2016 15:51:33 +0000</pubDate>
			<guid>http://randomflux.info/1bit/viewtopic.php?pid=1031#p1031</guid>
		</item>
		<item>
			<title><![CDATA[Re: new engine: Phase Squeek]]></title>
			<link>http://randomflux.info/1bit/viewtopic.php?pid=978#p978</link>
			<description><![CDATA[<p>A quick update on this: Just got the parser to output it&#039;s first blob of correct asm data. Unfortunately today is the last day I can work on it for the forseeable future, but I&#039;m glad I got this far. There&#039;s still tons of functionality missing, and the code would probably give any self-respecting programmer a heart attack at this point. So long story short, there probably won&#039;t be any public release till beginning of 2017.</p><p>In the meantime, here&#039;s a little preview, to give you an idea how the thing works (it has a name now, too, btw - MDAL aka Music Data Abstraction Language).</p><p>The input music file looks like this:<br /></p><div class="codebox"><pre><code>CONFIG=PhaseSqueek

:SEQUENCE
    intro
    pattern0
    [loop]
    pattern0
    pattern2
    
:intro
    A=a1, B=c3, C=e3, GMIX=or, MIXAB=or, MIXCD=or, SPD=$8
    .
    A=a2
    .
    A=a3
    .
    A=a2, C=0
    .

:pattern0
    .

:pattern2
    .</code></pre></div><p>which gives us this:</p><div class="codebox"><pre><code>    dw intro
    dw pattern0
loop
    dw pattern0
    dw pattern2
    dw 0

intro

    dw #b000, fx0, #b000, a1, c3, #4040, #c6, #c6, #0, #b000, e3, #0, #4040, #0, #800
    dw #b085, #800
    dw #b001, #b0c4, a2, #0, #800
    dw #b085, #800
    dw #b001, #b0c4, a3, #0, #800
    dw #b085, #800
    dw #b001, #b0c4, a2, #0, #b0c0, #0, #0, #800
    dw #b085, #800
    db #40

pattern0

    dw #b085, #800
    db #40

pattern2

    dw #b085, #800
    db #40</code></pre></div><p>based on this config:<br /></p><div class="codebox"><pre><code>MDAL_VERSION(0)
USE_SEQUENCE;
USE_PATTERNS;

WORD_DIRECTIVE(&quot;dw&quot;);
BYTE_DIRECTIVE(&quot;db&quot;);
HEX_PREFIX(&quot;#&quot;);


CFG_SEQUENCE {
    USE_END(&quot;dw 0&quot;);
    USE_LOOP(LABEL, &quot;loop&quot;);
    USE_TRACKS(1);
}

CFG_PATTERNS {
    USE_END(&quot;db #40&quot;);
}
    
CFG_COMMANDS {
                
    WORD(&quot;FX&quot;,&quot;fx0&quot;);    
    WORD(&quot;A&quot;, 0, USE_LAST_SET|USE_RESTS(0));
    WORD(&quot;B&quot;, 0, USE_LAST_SET|USE_RESTS(0));
    BYTE(&quot;DA&quot;, $40, USE_LAST_SET);    
    BYTE(&quot;DB&quot;, $40, USE_LAST_SET);    
    BYTE(&quot;SIDA&quot;, $c6, USE_LAST_SET|FORCE_SUBSTITUTION(&quot;off&quot;=$c6, &quot;on&quot;=$ce));
    BYTE(&quot;SIDB&quot;, $c6, USE_LAST_SET|FORCE_SUBSTITUTION(&quot;off &quot;=$c6, &quot;on&quot;=$ce));
    BYTE(&quot;ESA&quot;, 0, USE_LAST_SET);
    BYTE(&quot;ESB&quot;, 0, USE_LAST_SET);
    WORD(&quot;PAB&quot;, 0, USE_LAST_SET);
    WORD(&quot;C&quot;, 0, USE_LAST_SET|USE_RESTS(0));
    WORD(&quot;D&quot;, 0, USE_LAST_SET|USE_RESTS(0));
    BYTE(&quot;DC&quot;, $40, USE_LAST_SET);
    BYTE(&quot;DD&quot;, $40, USE_LAST_SET);
    BOOL(&quot;NC&quot;, false, USE_LAST_SET|FORCE_SUBSTITUTION(&quot;off&quot;=false, &quot;on&quot;=true));
    WORD(&quot;PCD&quot;, 0, USE_LAST_SET);
    
    BYTE(&quot;DRUM&quot;, 0, FORCE_SUBSTITUTION(&quot;kick&quot;=$40, &quot;hat&quot;=$80));
    BYTE(&quot;GMIX&quot;, $b0, FORCE_REPEAT|FORCE_SUBSTITUTION(&quot;or&quot;=$b0, &quot;xor&quot;=$a8, &quot;and&quot;=$a0));
    BYTE(&quot;MIXAB&quot;, $b0, USE_LAST_SET|FORCE_SUBSTITUTION(&quot;or&quot;=$b0, &quot;xor&quot;=$a8, &quot;and&quot;=$a0));
    BYTE(&quot;MIXCD&quot;, $b0, USE_LAST_SET|FORCE_SUBSTITUTION(&quot;or&quot;=$b0, &quot;xor&quot;=$a8, &quot;and&quot;=$a0));
    BYTE(&quot;GSPD&quot;, $10, GLOBAL_CONST);
    BYTE(&quot;SPD&quot;, $10, FORCE_REPEAT);
}
    
    
CFG_FIELDS {
    WORD(0, REQUIRED(), SET_IF(!(FX&amp;A&amp;B&amp;DA&amp;DB&amp;SIDA&amp;SIDB&amp;ESA&amp;ESB&amp;PAB&amp;C&amp;D&amp;DC&amp;DD&amp;NC&amp;PCD&amp;MIXAB&amp;MIXCD), 4), SET_IF(!FX, 1), SET_IF(!(A&amp;B&amp;DA&amp;DB&amp;SIDA&amp;SIDB&amp;ESA&amp;ESB&amp;PAB&amp;MIXAB), $80), SET_HI(GMIX));
    WORD(&quot;fx0&quot;, SET(FX));
    WORD(0, REQUIRED(A|B|DA|DB|SIDA|SIDB|ESA|ESB|PAB|MIXAB), SET_IF(!(A&amp;B), 1), SET_IF(!(SIDA&amp;SIDB&amp;ESA&amp;ESB), 4), SET_IF(!DA&amp;DB, $40), SET_IF(!PAB, $80), SET_HI(MIXAB));
    WORD(1, REQUIRED(B), SET(A));
    WORD(2, REQUIRED(A), SET(B));
    WORD($4040, SET_HI(DA), SET_LO(DB));
    WORD($00c6, SET_HI(ESA), SET_LO(SIDA));
    WORD($00c6, SET_HI(ESB), SET_LO(SIDB));
    WORD(3, SET(PAB));
    WORD(4, REQUIRED(C|D|DC|DD|NC|PCD|MIXCD), SET_IF(!(C&amp;D), 1), SET_IF(!(DC&amp;DD), $40), SET_IF(!PCD, $80), SET_HI(MIXCD));
    WORD(5, REQUIRED(D), SET(C));
    WORD(6, REQUIRED(C), SET(D));
    WORD($4040, SET_HI(DC), SET_LO(DD));
    WORD(7, SET(PCD));    
    WORD($1000, REQUIRED(), SET_HI(SPD), SET_LO(DRUM));

    REQUIRE_SEQ_BEGIN();    
}</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (utz)]]></author>
			<pubDate>Thu, 08 Sep 2016 14:52:51 +0000</pubDate>
			<guid>http://randomflux.info/1bit/viewtopic.php?pid=978#p978</guid>
		</item>
		<item>
			<title><![CDATA[Re: new engine: Phase Squeek]]></title>
			<link>http://randomflux.info/1bit/viewtopic.php?pid=955#p955</link>
			<description><![CDATA[<p>oh yes, midi, mod or XM import would be very cool too!<br />There are various converters between all those formats so we&#039;re never stuck.</p>]]></description>
			<author><![CDATA[null@example.com (garvalf)]]></author>
			<pubDate>Mon, 22 Aug 2016 05:35:17 +0000</pubDate>
			<guid>http://randomflux.info/1bit/viewtopic.php?pid=955#p955</guid>
		</item>
		<item>
			<title><![CDATA[Re: new engine: Phase Squeek]]></title>
			<link>http://randomflux.info/1bit/viewtopic.php?pid=953#p953</link>
			<description><![CDATA[<p>I&#039;m afraid an ABC/MML converter would be very difficult to pull off. A note/sequence importer from XM or perhaps MIDI would be easier.</p><p>Shiru, yes, good point. I still want to add <em>some</em> configurability right from the start though, because I want to improve my C++ skills a bit, too.</p><p>In any case, it&#039;ll take a while before I have anything to show, as I&#039;m planning on taking a break from coding next week.</p>]]></description>
			<author><![CDATA[null@example.com (utz)]]></author>
			<pubDate>Sun, 21 Aug 2016 21:11:55 +0000</pubDate>
			<guid>http://randomflux.info/1bit/viewtopic.php?pid=953#p953</guid>
		</item>
		<item>
			<title><![CDATA[Re: new engine: Phase Squeek]]></title>
			<link>http://randomflux.info/1bit/viewtopic.php?pid=950#p950</link>
			<description><![CDATA[<p>&gt; Any more thoughts on the language thing?</p><p>none, as long as the notes can be defined in a way that can be easily be imported / exported from other tools (like mml or abc can be) the rest will probably be fine. <br />For the record, there are already some abc parsers in lua, in C <a href="https://sites.google.com/site/abcparser/">https://sites.google.com/site/abcparser/</a><br />and a cool preprocessor: <a href="http://abcplus.sourceforge.net/#abcpp">http://abcplus.sourceforge.net/#abcpp</a></p>]]></description>
			<author><![CDATA[null@example.com (garvalf)]]></author>
			<pubDate>Sun, 21 Aug 2016 14:02:11 +0000</pubDate>
			<guid>http://randomflux.info/1bit/viewtopic.php?pid=950#p950</guid>
		</item>
		<item>
			<title><![CDATA[Re: new engine: Phase Squeek]]></title>
			<link>http://randomflux.info/1bit/viewtopic.php?pid=949#p949</link>
			<description><![CDATA[<p>I think it is better to start simple, without adding too many features, and without expecting to expanding the same code to new engines. In general, it needs to be a prototype, to see how convinient the current idea could be. Later we can redo it as an improved, expandable version, having better understanding how to design such thing.</p>]]></description>
			<author><![CDATA[null@example.com (Shiru)]]></author>
			<pubDate>Fri, 19 Aug 2016 18:59:00 +0000</pubDate>
			<guid>http://randomflux.info/1bit/viewtopic.php?pid=949#p949</guid>
		</item>
		<item>
			<title><![CDATA[Re: new engine: Phase Squeek]]></title>
			<link>http://randomflux.info/1bit/viewtopic.php?pid=946#p946</link>
			<description><![CDATA[<p>Thanks mate <img src="http://randomflux.info/1bit/img/smilies/wink.png" width="15" height="15" alt="wink" /></p><p>Any more thoughts on the language thing? I&#039;ve already worked out a rough draft for the implementation. Think I&#039;ll do the parser in C++ after all (since I can&#039;t really be bothered to learn yet another language atm, and I don&#039;t feel like using Perl either). The parser will be customizable via config files, which will allow for creating extra commands and so on. Well, we&#039;ll see how that goes, I really have zero experience in writing such a thing.</p>]]></description>
			<author><![CDATA[null@example.com (utz)]]></author>
			<pubDate>Fri, 19 Aug 2016 10:28:30 +0000</pubDate>
			<guid>http://randomflux.info/1bit/viewtopic.php?pid=946#p946</guid>
		</item>
		<item>
			<title><![CDATA[Re: new engine: Phase Squeek]]></title>
			<link>http://randomflux.info/1bit/viewtopic.php?pid=943#p943</link>
			<description><![CDATA[<p>Returning back to the topic: utz, I always knew that beeper was more rock&#039;n&#039;roll than AY, but massive thank you for providing plenty of convincing evidence recently.</p><p>I always thought that beeper must be good for emulating overdriven instruments.</p>]]></description>
			<author><![CDATA[null@example.com (introspec)]]></author>
			<pubDate>Sun, 14 Aug 2016 23:12:55 +0000</pubDate>
			<guid>http://randomflux.info/1bit/viewtopic.php?pid=943#p943</guid>
		</item>
		<item>
			<title><![CDATA[Re: new engine: Phase Squeek]]></title>
			<link>http://randomflux.info/1bit/viewtopic.php?pid=941#p941</link>
			<description><![CDATA[<p>After studying the ABC standard a bit, I&#039;m actually leaning more towards defining a new standard. ABC is very strongly focused on score notation while offering very little in terms of timbre control. It does actually provide most of what we need (there are tools for creating user-defined commands, macros, etc), but ultimately using those would cause quite a mess. Besides, it seems inconvenient for parsing. Furthermore, I kind of prefer having a traditional pattern structure, rather than long strings of commands. </p><p>In any case, using calls/macros is a good idea. <br />At the moment, I&#039;m thinking something along these lines</p><div class="codebox"><pre><code>:order               // &quot;order&quot; would be a reserved keyword.
^intro               // names could be freely chosen
(loop)
^1                    // or short-handed by supplying only a number which will be expanded depending on context, ie. this will look for &quot;pattern1&quot;
...
// end directive is optional, as each block end can be determined by following :

:intro
A=a1  B=r  C=c3  D=e3  CFG=^1,^2,^3  FX=none        //note length fixed, ABCD=operator/channel, number after note name denotes octave
.                                                                                      //no changes in this row
A=a2  DUTY_A=#20
.
A=a1  B=a1-#1                                              // # denotes usage of immediate (hex) value instead of string literal
A=#800 FX=^1

:cfg1
GMIX=OR        // so alternative notation for phaser would be: GMIX=#b0

:cfg2
PHASE_AB=#1000
PHASE_CD=#0
DUTY_A=#40
DUTY_B=#40
DUTY_C=#20
MIX_AB=OR
MIX_CD=XOR

:cfg3
DUTY_D=#20
SID_A=OFF
SID_B=OFF
ES_A=OFF
ES_B=#1

:cfg4
GMIX=XOR

:fx1
A=C2
.
(loop)
A=c3 CFG=^4
.
A=c4 CFG=^1
.</code></pre></div><p>Admittedly, it&#039;s still quite a mess, and nothing more than a rough draft. </p><p>Regarding independant patterns per channel vs multi-channel patterns: There are certain benefits to having independant patterns per channel, but I think that with Phase Squeek, it would make things super messy, both for editing and for parsing.</p>]]></description>
			<author><![CDATA[null@example.com (utz)]]></author>
			<pubDate>Sat, 13 Aug 2016 20:44:03 +0000</pubDate>
			<guid>http://randomflux.info/1bit/viewtopic.php?pid=941#p941</guid>
		</item>
		<item>
			<title><![CDATA[Re: new engine: Phase Squeek]]></title>
			<link>http://randomflux.info/1bit/viewtopic.php?pid=940#p940</link>
			<description><![CDATA[<p>The ABC notation standard is quite exhaustive (and still evolving), but it&#039;s more made toward folk / classical users, using real instruments. Yet a common use for extending it is to use the comment symbol % so it won&#039;t interfere with other applications. For example in a program which can convert to midi, one can add this:<br />%%MIDI channel 1<br />%%MIDI program 20 % reed organ<br />%%MIDI transpose 0</p><p>There are a bunch of applications for working with abc files, for example for converting from midi, for transposing, to printing to pdf, for converting to lilypond etc. (I&#039;ve been using abc for almost 20 years so I like it quite much, I&#039;ve transcribed many tunes with it).</p><p>The MML problem is there are several software using it, but they use different syntaxes, so you can get a tune in MML which won&#039;t compile because of some incompatibilities. As far as I&#039;ve seen, most MML allows to define macros, for making differents parts or even some rythms. With the 3ML tool, it&#039;s ok for using with midi tunes (even if you have to manually import every track). MML is more popular among chip musicians so it might be a better choice.</p>]]></description>
			<author><![CDATA[null@example.com (garvalf)]]></author>
			<pubDate>Sat, 13 Aug 2016 20:26:23 +0000</pubDate>
			<guid>http://randomflux.info/1bit/viewtopic.php?pid=940#p940</guid>
		</item>
		<item>
			<title><![CDATA[Re: new engine: Phase Squeek]]></title>
			<link>http://randomflux.info/1bit/viewtopic.php?pid=939#p939</link>
			<description><![CDATA[<p>I think that to keep things under control and in a convinient way, we should use ABC or MML as a base, but not fully match to the standard. I.e. add convinient shortcuts for things.</p><p>For one, we can implement a &#039;subroutine&#039;, just like in BASIC. The subroutine can be either another sequence of notes, or a set of parameter changes. I.e. there would be no instrument per se, just immediate parameters change that could be abstracted as subroutines. For example, ^ used as a call operator (to keep it short) working by a label:</p><div class="codebox"><pre><code>^ins0 C2 E2 G2 R2 ^ins1 C2 E2 G2 R2

ins0:
duty=50
detune=2
ret</code></pre></div><p>Also, to keep it short, I&#039;d suggest to allow using a note name without duration by remembering the last value, i.e. C2 E2 G2 R2 equal to C2 E G R.</p><br /><p>Using calls, we actually won&#039;t need to have an order list equivalent. Just write patterns with labels and rets, then the entry point will be just series of calls.</p><div class="codebox"><pre><code>^pattern1 ^pattern2 ^pattern1 ^pattern3
stop

pattern1:

C2 E2 G2 B2

ret

...</code></pre></div><br /><p>One thing to think deeper is how to use chords in an convinient way, not split per a number of data sequences. Maybe some operator like + (C+E+G2 for Cmaj).</p><br /><p>I imagine this system as being written in some scripting language, such as Python, with infrastructure a bit similar to the 1tracker&#039;s, i.e. the compiler script generates text data (DB/DW), then an assembler (maybe just SjAsm/Pasmo, or also written in the script language) gets invoked to compile that into AY/TAP/SNA/etc.</p>]]></description>
			<author><![CDATA[null@example.com (Shiru)]]></author>
			<pubDate>Sat, 13 Aug 2016 17:53:05 +0000</pubDate>
			<guid>http://randomflux.info/1bit/viewtopic.php?pid=939#p939</guid>
		</item>
	</channel>
</rss>
