pouët.net

Go to bottom

Looking for known FT2 bugs

category: music [glöplog]
bruh switchman why do you have the (shitty) logo i made

chage asap
added on the 2018-12-09 17:45:49 by Flashira Flashira
change*****************
added on the 2018-12-09 17:45:58 by Flashira Flashira
I also have a memory snapshot of everything in memory running on a dos computer

that has everything running in place of memory. for ft2
i forgot to mention
to change your icon: click "edit profile" -> choose your avatar into whatevs u want
added on the 2018-12-09 17:58:59 by Flashira Flashira
******************************
* Volumes and envelopes: *
******************************

The volume formula:

FinalVol=(FadeOutVol/65536)*(EnvelopeVol/64)*(GlobalVol/64)*(Vol/64)*Scale;

The panning formula:

FinalPan=Pan+(EnvelopePan-32)*(128-Abs(Pan-128))/32;

Envelope:
---------

The envelopes are processed once per frame, instead of every frame where
no new notes are read. This is also true for the instrument vibrato and
the fadeout. Since I am so lazy and the tracker is rather self-explaining
I am not going to write any more for the moment.


********************************
* Periods and frequencies: *
********************************

PatternNote = 0..95 (0 = C-0, 95 = B-7)

FineTune = -128..+127 (-128 = -1 halftone, +127 = +127/128 halftones)
RelativeTone = -96..95 (0 => C-4 = C-4)

RealNote = PatternNote + RelativeTone; (0..118, 0 = C-0, 118 = A#9)

Linear frequence table:
-----------------------

Period = 10*12*16*4 - Note*16*4 - FineTune/2;
Frequency = 8363*2^((6*12*16*4 - Period) / (12*16*4));

Amiga frequence table:
----------------------

Period = (PeriodTab[(Note MOD 12)*8 + FineTune/16]*(1-Frac(FineTune/16)) +
PeriodTab[(Note MOD 12)*8 + FineTune/16]*(Frac(FineTune/16)))
*16/2^(Note DIV 12);
(The period is interpolated for finer finetune values)
Frequency = 8363*1712/Period;

PeriodTab = Array[0..12*8-1] of Word = (
907,900,894,887,881,875,868,862,856,850,844,838,832,826,820,814,
808,802,796,791,785,779,774,768,762,757,752,746,741,736,730,725,
720,715,709,704,699,694,689,684,678,675,670,665,660,655,651,646,
640,636,632,628,623,619,614,610,604,601,597,592,588,584,580,575,
570,567,563,559,555,551,547,543,538,535,532,528,524,520,516,513,
508,505,502,498,494,491,487,484,480,477,474,470,467,463,460,457);
its in xm.txt
ok I changed It sorry.
I also found this jem somewhere. its crazy...

good example of how he codes.

{
Solution for problem 3 day 1.

By Fredrik Huss of Sweden in 1994.

========================================================================
}

{$M 16384,64000,655360}

Type
Arr = Array[0..49999] of Boolean;
Const
Divisor : Array[0..4] of Longint = (10000,1000,100,10,1);
Bits : Array[0..9] of Word = (1,2,4,8,16,32,64,128,256,512);
Var
Prime : ^Arr;
NextNumber : Array[0..9999] of Word;
Sum,nPrimes : Integer;
FirstNumber,i,j,k : Longint;
VerticalPrimeStart : Array[0..5,0..5] of Word;
Kvadrat : Array[0..4] of Longint;
w : Word;
f : Text;

Function DigitSum(i : Longint) : Integer;
Var s : String[5];
Begin
Str(i,s);
If Length(s)=5 then
DigitSum:=Integer(s[1])+Integer(s[2])+Integer(s[3])+Integer(s[4])+
Integer(s[5])-5*48
else
DigitSum:=-1;
End;

Procedure TryLine(n : Integer); Forward;

Procedure GenPrime(p : Word; n,nn : Integer);
{
Input: p : The first part of the prime number on the current row
n : The length of the number above
nn : The current row number-1
}
Var a,i,vp : Word;
Begin
vp:=VerticalPrimeStart[nn,n];

{
Calculate all possible numbers for the next digit.
}
a:=NextNumber[vp] and NextNumber[p];

vp:=vp*10;
If n<4 then Begin
{
Generate the next number on the row
}
p:=p*10;
For i:=0 to 9 do
If (a and Bits[i])>0 then Begin
VerticalPrimeStart[nn+1,n]:=vp+i;
GenPrime(p+i,n+1,nn);
End;
End else Begin
{
Recurse to the next row
}
For i:=0 to 9 do
If (a and Bits[i])>0 then Begin
VerticalPrimeStart[nn+1,n]:=vp+i;
Kvadrat[nn]:=Longint(p)*10+Longint(i);
TryLine(nn+1);
End;
End;
End;

Procedure TryLine(n : Integer);
Var i : Integer; j,k : Longint; s : String[5];
Begin
If n<5 then
{
Generate the next row
}
GenPrime(0,0,n)
else Begin
{
Done! Check the diagonals.
}
j:=0; k:=0;
For i:=0 to 4 do Begin
j:=j*10+(Kvadrat[i] DIV Divisor[i]) MOD 10;
k:=k*10+(Kvadrat[4-i] DIV Divisor[i]) MOD 10;
End;
If Prime^[j SHR 1] and Prime^[k SHR 1] then Begin
{
We have a solution!
}
For i:=0 to 4 do
Writeln(f,Kvadrat[i]);
End;
End;
End;

Begin
Assign(f,'INPUT.TXT'); Reset(f);
Readln(f,Sum);
Readln(f,FirstNumber);
Close(f);

GetMem(Prime,Sizeof(Prime^));
FillChar(Prime^,Sizeof(Prime^),1);
FillChar(NextNumber,Sizeof(NextNumber),0);
FillChar(VerticalPrimeStart,Sizeof(VerticalPrimeStart),0);

{
Calculate primes... (only odd numbers are stored)
}
i:=3;
Repeat
If Prime^[i SHR 1] then Begin
j:=i*i;
While j<100000 do Begin
Prime^[j SHR 1]:=False;
Inc(j,i+i);
End;
End;
Inc(i,2);
Until i>320;

{
Check the digit sum.
}
For i:=0 to 49999 do
If Prime^[i] then
If DigitSum(i+i+1)<>Sum then
Prime^[i]:=False
else Inc(nPrimes);

{
Find all digits possible to add to the beginning of a prime.
}
For i:=1 to 4 do
For j:=5000 to 49999 do
If Prime^[j] then Begin
k:=(j+j+1) DIV Divisor[i-1];
w:=Bits[((j+j+1) DIV Divisor[i]) MOD 10];
NextNumber[k]:=NextNumber[k] or w;
End;
NextNumber[0]:=1023-1; { A prime can begin with the numbers 1..9 }

VerticalPrimeStart[1,0]:=FirstNumber;

Assign(f,'OUTPUT.TXT'); Rewrite(f);
GenPrime(FirstNumber,1,0);
Close(f);
End.
This is highly irrelevant to the thread, and I would appreciate if you could take it elsewhere. I'm still looking for FT2 bugs (MS-DOS version) btw. :-)
added on the 2018-12-30 23:26:44 by 8bitbubsy 8bitbubsy

login

Go to top