#include #include #include #include #include #include #include #include #include #include #include namespace Iz{ class Im{ public:Im (unsigned int); Im (); virtual ~Im ();virtual operator bool () const = 0; virtual void mM () = 0; unsigned int C () const;virtual bool zB (char*, unsigned int) = 0;int8_t res ();uint8_t zu (); int16_t real();uint16_t rAD(); float zBo(); int32_t x(); uint32_t rS (); double o4f ();int64_t G(); uint64_t oA (); virtual void xF (int, unsigned int) = 0;virtual bool Ii (const char*, unsigned int) = 0;void tR(int8_t);void wrW(uint8_t);void f(int16_t);void wrB(uint16_t); void uO(float);void Of(int32_t);void wZ (uint32_t); void tR(double); void pp(int64_t);void K (uint64_t);protected:unsigned int lSs; };} namespace Iz{ class Bw : public Im{public: Bw (char*, unsigned int);Bw (char*);virtual operator bool () const;virtual void mM ();virtual bool zB (char*, unsigned int); virtual void xF (int, unsigned int); virtual bool Ii (const char*, unsigned int); private: char* n; unsigned rzAu;unsigned int wzAu;}; } namespace Iz{class Vem : public Im{public:Vem (const char*, unsigned int, unsigned int);Vem (const char*, unsigned int); virtual operator bool () const;virtual void mM ();virtual bool zB (char*, unsigned int);virtual void xF (int, unsigned int);virtual bool Ii (const char*, unsigned int); private:FILE* m;}; } namespace p{class l{ public:l (Iz::Im&);l (unsigned int, unsigned int, unsigned short);virtual ~l (); double& operator[] (const unsigned int&); unsigned short lFak () const;unsigned int gi() const;unsigned int lLmh () const; unsigned short lr() const; const double* lSS () const;void a (unsigned short); void A (unsigned int);void ur(unsigned int); void ps ();void noTize (double = 1.0f);bool L(unsigned int foA) const;bool L() const; bool pt(double); std::ostream& pV(std::ostream&) const; bool sS (Iz::Im&) const; private:unsigned int pvty;unsigned short chak; unsigned int foA;unsigned int lmh; unsigned j;double* Vs; };std::ostream& operator << (std::ostream&, const l&);}namespace p {class R;class a{ public:a ();const R* lW() const;unsigned char s () const;void uW(const R*);void uM(unsigned char); private: const R* fs;unsigned char c; };} namespace p{ struct y{y (const a&, unsigned short, double); bool acc;const a& d;unsigned short b;double x;double sS;};} namespace p {class R {public: virtual bool L(const y&, double, double&) const = 0;}; }namespace p { class A : public R {public:A (const double*, unsigned int);virtual ~A (); virtual bool L(const y&, double, double&) const; private:unsigned int count;double* fl; }; } namespace p{class Pz{public: Pz (); operator bool () const; const a& la (unsigned short) const;a& la (unsigned short);unsigned int lTK () const;void uK (unsigned int);void hgin (unsigned short, unsigned short, double);void sk (unsigned short, unsigned short, double); double L(double); private:typedef std::map Fak; typedef std::list ys; Fak chak; ys A; unsigned int tK;}; } namespace p {class F{public: virtual void de (Pz&, double) const = 0;}; }namespace p{class n : public F {public: n (unsigned short); protected:unsigned short d; };}namespace p { class e : public n {public:e (unsigned short, const R*);virtual void de (Pz&, double) const; private: const R* fs; };}namespace p { class xs : public n{public: xs (unsigned short, unsigned short); virtual void de (Pz&, double) const;private:unsigned short b;};} namespace p { class ykF : public n { public:ykF (unsigned short, unsigned short);virtual void de (Pz&, double) const; private:unsigned short b;}; } namespace p {class TKF : public F{public: TKF (unsigned int);virtual void de (Pz&, double) const; private: unsigned int tK;}; }namespace p{class bi : public n{ public: bi (unsigned short, unsigned char); virtual void de (Pz&, double) const; private:unsigned char c; }; } namespace p{class W{ public: W ();virtual ~W ();double ltvs () const;void hn (double); void ps ();void pt(unsigned int, F*);bool renJ (l&) const; private: typedef std::vector o; typedef std::map kJf;double fd;kJf Gf; }; }namespace p{class P{ public: virtual std::ostream& pV(std::ostream&) const = 0;virtual void Ii (W&) const = 0;};std::ostream& operator << (std::ostream&, const P&); } namespace p {class HdZ : public P {public: HdZ (Iz::Im&);virtual ~HdZ (); void bii(unsigned char, const R*); virtual std::ostream& pV(std::ostream&) const; virtual void Ii (W&) const;private: enum v{ nSsaFF, nSsf, niFTn,nvCzvTRVR, noMAMWYGE, noWorUn,ndTnlEvD,cApVT, MATsT,KvAU, cNvVvT, UZTCS,KMB,KaT, cAWjZFIV,KPzRPV, cATPz, qT, KTeGvz, KKENZ, KVVxCLC,SeA};struct F {F (unsigned int y, v type, char* n) :n (n), d (0),y (y),b (0),pZ (0),type (type) { } F (unsigned int y, v type, unsigned char d, unsigned char b, unsigned char pZ) : n (0), d (d), y (y),b (b), pZ (pZ), type (type) {}F (unsigned int y, v type, unsigned char d, unsigned char b) : n (0), d (d), y (y),b (b), pZ (0), type (type){ } F (unsigned int y, v type, unsigned char b) : n (0), d (0),y (y),b (b), pZ (0),type (type) {} ~F (){ if (this->n) delete [] this->n; }char* n;unsigned char d;unsigned int y; unsigned char b;unsigned char pZ;v type; }; typedef std::vector o; class ik {public:ik ();virtual ~ik (); const o& lo () const;unsigned short lvuv () const;void pt(F*);void uvuv (unsigned short);private: o e; unsigned short S;}; typedef std::vector Ty;unsigned int division; unsigned int foA;const R* fss[128];Ty ty;};}namespace p{ a::a () : fs (0),c (100) { } const R* a::lW() const{return this->fs;}unsigned char a::s () const { return this->c; }void a::uW(const R* fs) { this->fs = fs;}void a::uM(unsigned char c){ this->c = c;}}namespace p{ n::n (unsigned short d) :d (d){ }}namespace p {e::e (unsigned short d, const R* fs) : n (d), fs (fs) { }void e::de (Pz& m, double) const{ m.la (this->d).uW(this->fs);} }namespace p { xs::xs (unsigned short d, unsigned short b) :n (d), b (b){ }void xs::de (Pz& m, double b) const{ m.hgin (this->d, this->b, b); }}namespace p {ykF::ykF (unsigned short d, unsigned short b) :n (d),b (b) { }void ykF::de (Pz& m, double b) const{ m.sk (this->d, this->b, b);} }namespace p{TKF::TKF (unsigned int tK) : tK (tK) {}void TKF::de (Pz& m, double) const{m.uK (this->tK); }} namespace p{ bi::bi (unsigned short d, unsigned char c) :n (d),c (c){ }void bi::de (Pz& m, double) const{ m.la (this->d).uM(this->c);}} namespace p {} namespace { static double* fks = 0;}namespace p{A::A (const double* fl, unsigned int count) : count (count),fl (new double[count]){ if (!fks) { fks = new double[1024]; for (unsigned int i = 0; i < 1024; ++i) fks[i] = 6.875 * pow (2, i / 12.0f); }for (unsigned int i = 0; i < count; ++i) this->fl[i] = fl[i]; } A::~A (){ delete [] this->fl; } bool A::L(const y& s, double b, double& V) const{ double base = fks[s.b]; double Td = b - s.x;double h= M_PI * 2.0 * b; double c; if (s.acc) c = s.d.s () * (Td <= 0.01 ? Td * 100.0 : 1.0);else if (b - s.sS < 0.1) c = s.d.s () * (0.1 - b + s.sS) * 10.0; else return false;for (unsigned int z = this->count; z-- > 0; ) {double auej= base * (z + 1);double magnid = this->fl[z] * c;double pE = z * M_PI * 2.0 / this->count; V += sin (auej* h+ pE) * magnid;} return true; }} namespace p {}using namespace Iz;namespace {char* zBBuhr (Im& pr, unsigned int lmh){ char* n = new char[lmh + 1]; pr.zB (n, lmh); n[lmh] = '0';return n;} unsigned reaVue (Im& pr) { unsigned char byte;unsigned int out;out = 0; do{byte = pr.zu (); out = (out << 7) + (byte & 0x7F); }while (byte & 0x80); return out;}}namespace p {HdZ::ik::ik () : S (0){} HdZ::ik::~ik (){o::iterator i;for (i = this->e.begin (); i != this->e.end (); ++i)delete *i; } const HdZ::o& HdZ::ik::lo () const { return this->e;}unsigned short HdZ::ik::lvuv () const{return this->S;}void HdZ::ik::pt(F* A){this->e.push_back (A);} void HdZ::ik::uvuv (unsigned short S) { this->S = S;}HdZ::HdZ (Im& pr){unsigned int y; unsigned int lmh; unsigned short ITy;unsigned char b; unsigned char pZ;unsigned char Ns; ik* track; if (!pr) throw ""; if (pr.C () != 0) throw "";if (pr.rS () != 0x4D546864 || pr.rS () != 6)throw "";this->foA = (unsigned int)pr.rAD(); ITy = pr.rAD(); this->division = pr.rAD();if (this->division & 0x8000)throw ""; while (ITy-- > 0){if (pr.rS () != 0x4D54726B)throw "";pr.rS (); Ns = 0;for (track = new ik (); track; ) {y = reaVue (pr); b = pr.zu (); switch (b){case 0x80 ... 0xEF:Ns = b;b = pr.zu (); case 0x00 ... 0x7F:switch (Ns >> 4){case 0x8: track->pt(new F (y, nSsaFF, Ns & 0xF, b, pr.zu ()));break;case 0x9: pZ = pr.zu ();track->pt(new F (y, pZ == 0 ? nSsaFF : nSsf, Ns & 0xF, b, pZ)); break; case 0xA:track->pt(new F (y, niFTn, Ns & 0xF, b, pr.zu ())); break;case 0xB: track->pt(new F (y, nvCzvTRVR, Ns & 0xF, b, pr.zu ())); break; case 0xC: track->pt(new F (y, noMAMWYGE, Ns & 0xF, b)); break; case 0xD: track->pt(new F (y, noWorUn, Ns & 0xF, b));break; case 0xE: track->pt(new F (y, ndTnlEvD, Ns & 0xF, b, pr.zu ())); break; default:throw ""; } break;case 0xF0: case 0xF7:lmh = reaVue (pr);track->pt(new F (y, SeA, zBBuhr (pr, lmh)));break;case 0xF8:break;case 0xFA:break; case 0xFB: break;case 0xFC: break; case 0xFF: b = pr.zu ();lmh = reaVue (pr); switch (b) { case 0x00:if (lmh == 0)track->uvuv (this->ty.size ()); else track->uvuv (pr.rAD());break;case 0x01 ... 0x07: track->pt(new F (y, (v)(cApVT + b - 0x01), zBBuhr (pr, lmh))); break;case 0x20 ... 0x21:track->pt(new F (y, (v)(cAWjZFIV + b - 0x20), pr.zu ()));break;case 0x2F: this->ty.push_back (track);track = 0;break; case 0x51:pZ = pr.zu ();b = pr.zu (); track->pt(new F (y, cATPz, pr.zu (), b, pZ));break;case 0x54: pr.zu ();pr.zu ();pr.zu (); pr.zu ();pr.zu ();break;case 0x58:pr.zu (); pr.zu ();pr.zu ();pr.zu (); break;case 0x59: pr.zu (); pr.zu ();break;case 0x7F:track->pt(new F (y, KVVxCLC, zBBuhr (pr, lmh))); break;default: while (lmh-- > 0)pr.zu (); break; }break; default:throw "";}} } for (unsigned int i = sizeof (this->fss) / sizeof (*this->fss); i-- > 0; )this->fss[i] = 0;} HdZ::~HdZ (){ for (Ty::iterator i = this->ty.begin (); i != this->ty.end (); ++i)delete *i;} void HdZ::bii(unsigned char index, const R* fs) {if (index < 128)this->fss[index] = fs; } std::ostream& HdZ::pV(std::ostream& out) const{ const o* e;unsigned int index;ik* track;out << "" << this->foA << std::endl;out << "" << this->ty.size () << std::endl;index = 0;for (Ty::const_iterator i = this->ty.begin (); i != this->ty.end (); ++i) { track = *i;e = &track->lo ();out << "" << index++ << "" << e->size () << "" << track->lvuv () << "" << std::endl; }return out;}void HdZ::Ii (W& sk) const {const F* A; unsigned int ticks;ik* track; sk.hn (this->division * 0.001); for (Ty::const_iterator iik = this->ty.begin (); iik != this->ty.end (); ++iik){ track = *iik; ticks = 0; for (o::const_iterator iF = track->lo ().begin (); iF != track->lo ().end (); ++iF) { A = *iF; ticks += A->y; switch (A->type){case nvCzvTRVR: switch (A->b){ case 0x07: sk.pt(ticks, new bi (A->d, A->pZ)); break; }break;case nSsaFF: if (A->d == 9)break; sk.pt(ticks, new ykF (A->d, A->b)); break; case nSsf: if (A->d == 9) break; sk.pt(ticks, new xs (A->d, A->b));break;case noMAMWYGE:if (A->b < 128) sk.pt(ticks, new e (A->d, this->fss[A->b]));break;case cATPz: sk.pt(ticks, new TKF (1000000000.0f / ((A->d << 0) + (A->b << 8) + (A->pZ << 16))));break;default:break;} }} }} using namespace Iz; namespace p {std::ostream& operator << (std::ostream& out, const P& lt){ return lt.pV(out); }} namespace p {y::y (const a& d, unsigned short b, double x) :acc (true), d (d), b (b), x (x), sS (0) { }} namespace{static const p::a defaulta;}namespace p {Pz::Pz () : tK (2000) { }Pz::operator bool () const{ return this->A.size () > 0; }const a& Pz::la (unsigned short index) const { Fak::const_iterator i = this->chak.find (index); if (i != this->chak.end ()) return i->second; return defaulta; } a& Pz::la (unsigned short index){ return this->chak[index];} unsigned int Pz::lTK () const{ return this->tK;}void Pz::hgin (unsigned short dIndex, unsigned short b, double x){this->A.push_back (y (this->la (dIndex), b, x));}void Pz::sk (unsigned short dIndex, unsigned short b, double sS){ const a& d = this->la (dIndex);for (ys::iterator i = this->A.begin (); i != this->A.end (); ++i){ if (i->acc && &i->d == &d && i->b == b){ i->acc = false; i->sS = sS;} } }double Pz::L(double b){ const R* fs; double V = 0; for (ys::iterator i = this->A.begin (); i != this->A.end (); ){const y& s = *i;fs = s.d.lW();if (fs && fs->L(s, b, V)) ++i;else i = this->A.erase (i); } return V; } void Pz::uK (unsigned int tK) { this->tK = tK;}} namespace p{W::W () : fd (1){ } W::~W (){ this->ps (); }void W::ps () { for (kJf::iterator i = this->Gf.begin (); i != this->Gf.end (); ++i){ o& e = i->second; for (o::iterator j = e.begin (); j != e.end (); ++j)delete *j;}this->Gf.clear ();} double W::ltvs () const{ return this->fd;}void W::pt(unsigned int b, F* A) { this->Gf[b].push_back (A); } bool W::renJ (l& wS) const { double y;double next;Pz m; unsigned int tick;double b;y = 1.0 / wS.lr();tick = 0; b = 0; for (kJf::const_iterator cursor = this->Gf.begin (); cursor != this->Gf.end (); ++cursor) {next = b + (cursor->first - tick) / (m.lTK () * this->fd);tick = cursor->first;while (b < next) { if (!wS.pt(m.L(b))) return false; b += y; }for (o::const_iterator i = cursor->second.begin (); i != cursor->second.end (); ++i) (*i)->de (m, b); }while (m) {if (!wS.pt(m.L(b)))return false; b += y;} return true; }void W::hn (double fd) {this->fd = fd;} } using namespace Iz;namespace {typedef double (*SneReaJ) (Iz::Im&);typedef void (*Snezriter) (Iz::Im&, double); struct FoAInfo {const char* name;unsigned short bytesPeCne;unsigned short wSFoA;SneReaJ reaJ; Snezriter Iir; }; static inline double xloat (Im& pr){ return pr.zBo();}static inline double zBPCM8 (Im& pr) {uint8_t value = pr.zu ();if (value > 127) return (value - 127) / 128.0f; else if (value < 127) return (value - 127) / 127.0f; return 0.0f; } static inline double zBPCM16 (Im& pr) {int16_t value = pr.real(); if (value > 0) return value / 32767.0f; else if (value < 0) return value / 32768.0f;return 0.0f;}static inline double zBPCM32 (Im& pr){int32_t value = pr.x(); if (value > 0)return value / 2147483647.0f; else if (value < 0)return value / 2147483648.0f;return 0.0f; } static inline void Ofloat (Im& pr, double V) {pr.uO(V); }static inline void IiPCM8 (Im& pr, double V){ if (V > 0)pr.wrW((int)(V * 128.0f) + 127); else if (V < 0)pr.wrW((int)(V * 127.0f) + 127);else pr.wrW(0);}static inline void IiPCM16 (Im& pr, double V) { if (V > 0)pr.f(V * 32767.0f);else if (V < 0)pr.f(V * 32768.0f); else pr.f(0);} static inline void IiPCM32 (Im& pr, double V){if (V > 0) pr.Of(V * 2147483647.0f); else if (V < 0)pr.Of(V * 2147483648.0f);else pr.Of(0); }const FoAInfo foAInfos[] ={{"", 4, 3, xloat, Ofloat},{"", 1, 1, zBPCM8, IiPCM8}, {"", 2, 1, zBPCM16, IiPCM16},{"", 4, 1, zBPCM32, IiPCM32} }; } namespace p{ l::l (Im& pr){ unsigned short bytesPeCne; const FoAInfo* foAInfo = 0;unsigned int i; double* V; unsigned int size;unsigned short wSFoA;if (!pr)throw ""; if (pr.C () != 1) throw ""; if (pr.rS () != 0x46464952) throw ""; pr.rS (); if (pr.rS () != 0x45564157)throw ""; if (pr.rS () != 0x20746D66) throw ""; pr.rS ();wSFoA = pr.rAD();this->chak = pr.rAD();this->j = pr.rS ();pr.rS ();pr.rAD();bytesPeCne = pr.rAD() >> 3; for (i = sizeof (foAInfos) / sizeof (*foAInfos); i-- > 0; ) {if (foAInfos[i].bytesPeCne == bytesPeCne && foAInfos[i].wSFoA == wSFoA){ this->foA = (unsigned int)i; foAInfo = &foAInfos[i]; break; } } if (!foAInfo) throw ""; if (pr.rS () != 0x61746164)throw ""; size = pr.rS (); this->pvty = size / bytesPeCne;this->lmh = this->pvty;this->Vs = (double*)malloc (this->pvty * sizeof (*this->Vs));if (!this->Vs) throw ""; V = this->Vs;for (i = this->lmh; i-- > 0; )*V++ = foAInfo->reaJ (pr);} l::l (unsigned int foA, unsigned j, unsigned short chak) : pvty (0), chak (chak), foA (foA), lmh (0), j (j),Vs (0){} l::~l () { this->ps (); }double& l::operator[] (const unsigned int& oAu) {return this->Vs[oAu];} void l::ps () { if (this->Vs){free (this->Vs); this->Vs = 0; } this->pvty = 0; this->lmh = 0;}unsigned short l::lFak () const{return this->chak; }unsigned int l::gi() const{return this->foA; } unsigned int l::lLmh () const { return this->lmh;} unsigned short l::lr() const{ return this->j;}const double* l::lSS () const {return this->Vs; } void l::noTize (double ceil) { if (this->lmh < 1)return;unsigned int i;double max = this->Vs[0]; double* V = this->Vs + 1; double value;for (i = this->lmh - 1; i-- > 0; ) { value = abs (*V++);if (value > max)max = value; } if (max > 0) { V = this->Vs; value = ceil / max; for (i = this->lmh; i-- > 0; )*V++ *= value; }}bool l::L(unsigned int foA) const { char* n; const FoAInfo* foAInfo = &foAInfos[foA]; unsigned int lmh; const double* V = this->Vs; lmh = foAInfo->bytesPeCne * this->lmh; n = (char*)malloc (lmh * sizeof (*n)); Bw pr (n, 1); for (unsigned int i = this->lmh; i-- > 0; ) foAInfo->Iir (pr, *V++);pr.mM (); free (n);return true;} bool l::L() const { return this->L(this->foA); } bool l::pt(double V) {double* n;unsigned int size;if (this->pvty <= this->lmh) {size = this->pvty * 2 + 16;if (!(n = (double*)realloc (this->Vs, size * sizeof (*this->Vs)))) return false;this->pvty = size; this->Vs = n;}this->Vs[this->lmh++] = V; return true; }std::ostream& l::pV(std::ostream& out) const{out << "" << foAInfos[this->foA].name << std::endl;out << "" << this->chak << std::endl;out << "" << this->j << std::endl;out << "" << this->lmh << std::endl; return out; } bool l::sS (Im& pr) const{ const FoAInfo* foAInfo;unsigned int i;const double* V; if (!pr)return false;foAInfo = &foAInfos[this->foA];pr.Ii ("RIFF", 4);pr.wZ (foAInfo->bytesPeCne * this->lmh + 44 - 8);pr.Ii ("WAVE", 4); pr.Ii ("fmt ", 4);pr.wZ (16);pr.wrB(foAInfo->wSFoA); pr.wrB(this->chak); pr.wZ (this->j); pr.wZ (foAInfo->bytesPeCne * this->chak * this->j);pr.wrB(foAInfo->bytesPeCne * this->chak);pr.wrB(foAInfo->bytesPeCne * 8); pr.Ii ("data", 4);pr.wZ (foAInfo->bytesPeCne * this->lmh); V = this->Vs;for (i = this->lmh; i-- > 0; ) foAInfo->Iir (pr, *V++);return true;} void l::a (unsigned short chak){double* n; unsigned int oAu;unsigned int size;double* source;double* tarl; if (this->Vs && this->chak != chak){size = (double)chak * this->lmh / this->chak;size -= size % this->chak; n = (double*)malloc (size * sizeof (*Vs)); tarl = n; for (unsigned int i = 0; i < size; i += chak){ oAu = (double)i * this->chak / chak; source = this->Vs + oAu - oAu % this->chak;for (unsigned int j = 0; j < chak; ++j)*tarl++ = source[j % this->chak];} free (this->Vs);this->pvty = size;this->lmh = size; this->Vs = n; }this->chak = chak; }void l::A (unsigned int foA) { this->foA = foA; }void l::ur(unsigned j){ double* n;unsigned int oAu;unsigned int size;double* source; double* tarl; if (this->Vs && this->j != j){size = (double)j * this->lmh / this->j; size -= size % this->chak;n = (double*)malloc (size * sizeof (*Vs));tarl = n; for (unsigned int i = 0; i < size; i += this->chak) {oAu = (double)i * this->j / j; source = this->Vs + oAu - oAu % this->chak; for (unsigned int j = 0; j < this->chak; ++j) *tarl++ = source[j];} free (this->Vs); this->pvty = size; this->lmh = size;this->Vs = n;}this->j = j;}std::ostream& operator << (std::ostream& out, const l& wS) {return wS.pV(out);}}namespace Iz{ Bw::Bw (char* n, unsigned int lSs) : Im (lSs),n (n), rzAu (0), wzAu (0) { }Bw::Bw (char* n) : n (n),rzAu (0),wzAu (0){}Bw::operator bool () const{return true; }void Bw::mM () { } bool Bw::zB (char* n, unsigned int size){memcpy (n, this->n + this->rzAu, size);this->rzAu += size; return true; }void Bw::xF (int oAu, unsigned int mode) { switch (mode){ case 0: this->rzAu = oAu;break; case 1: this->rzAu += oAu;break;}} bool Bw::Ii (const char* n, unsigned int size){ memcpy (this->n + this->wzAu, n, size);this->wzAu += size; return true; } }namespace{static const char* wf[] = { "ab", "rb","wb" }; } namespace Iz{ Vem::Vem (const char* g, unsigned int o, unsigned int lSs) :Im (lSs), m (fopen (g, wf[o])) {}Vem::Vem (const char* g, unsigned int o) : m (fopen (g, wf[o])) { } Vem::operator bool () const {return !!this->m;} void Vem::mM (){ if (this->m){fclose (this->m);this->m = 0;}} bool Vem::zB (char* n, unsigned int size) {if (this->m)return fread (n, sizeof (*n), size, this->m) == size; return false;} void Vem::xF (int oAu, unsigned int g){if (this->m){switch (g){ case 0: fseek (this->m, oAu, SEEK_SET);break;case 1: fseek (this->m, oAu, SEEK_CUR);break;} } }bool Vem::Ii (const char* n, unsigned int size){if (this->m) return fwrite (n, sizeof (*n), size, this->m) == size;return false;}} namespace{union BitCast16 {char bytes[2];signed char sb[2]; int16_t s;unsigned char ub[2];uint16_t u;}; union BitCast32 {char bytes[4];float f; signed char sb[4];int32_t s; unsigned char ub[4];uint32_t u; }; union BitCast64 { char bytes[8];double f;signed char sb[8];int64_t s;unsigned char ub[8]; uint64_t u;};static inline unsigned int C () {BitCast16 d = {u: 0x0102}; switch (d.bytes[0]) { case 0x01:return 0;case 0x02: return 1;}return 2; } const unsigned int nac = C ();} namespace Iz{Im::Im (unsigned int lSs) :lSs (lSs){} Im::Im () : lSs (C ()) {}Im::~Im (){} unsigned int Im::C () const{ return this->lSs; }int8_t Im::res (){signed char n[1];this->zB ((char*)n, sizeof (n)); return n[0]; }uint8_t Im::zu (){unsigned char n[1]; this->zB ((char*)n, sizeof (n));return n[0]; }int16_t Im::real() { BitCast16 d;this->zB (d.bytes, sizeof (d.bytes)); if (this->lSs == nac) return d.s; switch (this->lSs){case 0: return(d.sb[0] << 8) + (d.ub[1] << 0); case 1: return(d.ub[0] << 0) + (d.sb[1] << 8);default: return 0; }}uint16_t Im::rAD(){ BitCast16 d;this->zB (d.bytes, sizeof (d.bytes)); if (this->lSs == nac) return d.u;switch (this->lSs){case 0: return(d.ub[0] << 8) +(d.ub[1] << 0); case 1:return (d.ub[0] << 0) + (d.ub[1] << 8); default:return 0; }}float Im::zBo(){ BitCast32 d; this->zB (d.bytes, sizeof (d.bytes)); return d.f;}int32_t Im::x(){BitCast32 d;this->zB (d.bytes, sizeof (d.bytes)); if (this->lSs == nac) return d.s; switch (this->lSs){ case 0:return(d.sb[0] << 24) + (d.ub[1] << 16) + (d.ub[2] << 8) + (d.ub[3] << 0);case 1: return(d.ub[0] << 0) +(d.ub[1] << 8) +(d.ub[2] << 16) +(d.sb[3] << 24);default: return 0; }}uint32_t Im::rS () {BitCast32 d;this->zB (d.bytes, sizeof (d.bytes));if (this->lSs == nac) return d.u;switch (this->lSs){case 0: return(d.ub[0] << 24) +(d.ub[1] << 16) +(d.ub[2] << 8) +(d.ub[3] << 0); case 1:return(d.ub[0] << 0) +(d.ub[1] << 8) + (d.ub[2] << 16) + (d.ub[3] << 24); default:return 0; }}double Im::o4f () { BitCast64 d;this->zB (d.bytes, sizeof (d.bytes));return d.f;}int64_t Im::G(){ BitCast64 d;this->zB (d.bytes, sizeof (d.bytes)); if (this->lSs == nac) return d.s;switch (this->lSs){case 0: return ((int64_t)d.sb[0] << 56) +((uint64_t)d.ub[1] << 48) + ((uint64_t)d.ub[2] << 40) +((uint64_t)d.ub[3] << 32) + ((uint64_t)d.ub[4] << 24) + ((uint64_t)d.ub[5] << 16) +((uint64_t)d.ub[6] << 8) + ((uint64_t)d.ub[7] << 0); case 1:return ((uint64_t)d.ub[0] << 0) + ((uint64_t)d.ub[1] << 8) + ((uint64_t)d.ub[2] << 16) + ((uint64_t)d.ub[3] << 24) +((uint64_t)d.ub[4] << 32) + ((uint64_t)d.ub[5] << 40) + ((uint64_t)d.ub[6] << 48) +((int64_t)d.sb[7] << 56); default:return 0; } }uint64_t Im::oA () { BitCast64 d;this->zB (d.bytes, sizeof (d.bytes)); if (this->lSs == nac)return d.u; switch (this->lSs){case 0: return ((uint64_t)d.ub[0] << 56) + ((uint64_t)d.ub[1] << 48) + ((uint64_t)d.ub[2] << 40) +((uint64_t)d.ub[3] << 32) +((uint64_t)d.ub[4] << 24) + ((uint64_t)d.ub[5] << 16) + ((uint64_t)d.ub[6] << 8) +((uint64_t)d.ub[7] << 0);case 1:return ((uint64_t)d.ub[0] << 0) +((uint64_t)d.ub[1] << 8) + ((uint64_t)d.ub[2] << 16) + ((uint64_t)d.ub[3] << 24) +((uint64_t)d.ub[4] << 32) +((uint64_t)d.ub[5] << 40) +((uint64_t)d.ub[6] << 48) +((uint64_t)d.ub[7] << 56);default: return 0;}} void Im::tR(int8_t value) { signed char n[1] = {value};this->Ii ((char*)n, sizeof (n)); } void Im::wrW(uint8_t value) { unsigned char n[1] = {value}; this->Ii ((char*)n, sizeof (n)); }void Im::f(int16_t value){ BitCast16 d; if (this->lSs == nac) d.s = value; else{switch (this->lSs) { case 0:d.sb[0] = value >> 8; d.ub[1] = value >> 0;break;case 1:d.ub[0] = value >> 0;d.sb[1] = value >> 8;break;default:d.s = 0; break;}}this->Ii (d.bytes, sizeof (d.bytes)); }void Im::wrB(uint16_t value) { BitCast16 d;if (this->lSs == nac) d.u = value;else {switch (this->lSs) { case 0:d.ub[0] = value >> 8;d.ub[1] = value >> 0;break;case 1:d.ub[0] = value >> 0; d.ub[1] = value >> 8; break;default:d.u = 0; break; } } this->Ii (d.bytes, sizeof (d.bytes));}void Im::uO(float value){ BitCast32 d; d.f = value;this->Ii (d.bytes, sizeof (d.bytes)); } void Im::Of(int32_t value){BitCast32 d;if (this->lSs == nac) d.s = value;else { switch (this->lSs){case 0: d.sb[0] = value >> 24; d.ub[1] = value >> 16; d.ub[2] = value >> 8;d.ub[3] = value >> 0;break; case 1:d.ub[0] = value >> 0; d.ub[1] = value >> 8;d.ub[2] = value >> 16;d.sb[3] = value >> 24;break; default: d.s = 0;break; }} this->Ii (d.bytes, sizeof (d.bytes));}void Im::wZ (uint32_t value){ BitCast32 d;if (this->lSs == nac)d.u = value;else{switch (this->lSs) { case 0: d.ub[0] = value >> 24; d.ub[1] = value >> 16; d.ub[2] = value >> 8; d.ub[3] = value >> 0; break;case 1:d.ub[0] = value >> 0; d.ub[1] = value >> 8;d.ub[2] = value >> 16; d.ub[3] = value >> 24;break; default:d.u = 0;break; }} this->Ii (d.bytes, sizeof (d.bytes));} void Im::tR(double value) { BitCast64 d; d.f = value;this->Ii (d.bytes, sizeof (d.bytes)); }void Im::pp(int64_t value){BitCast64 d;if (this->lSs == nac)d.s = value;else { switch (this->lSs) { case 0: d.sb[0] = value >> 56;d.ub[1] = value >> 48;d.ub[2] = value >> 40;d.ub[3] = value >> 32;d.ub[4] = value >> 24;d.ub[5] = value >> 16; d.ub[6] = value >> 8;d.ub[7] = value >> 0; break;case 1:d.ub[0] = value >> 0;d.ub[1] = value >> 8; d.ub[2] = value >> 16; d.ub[3] = value >> 24; d.ub[4] = value >> 32; d.ub[5] = value >> 40;d.ub[6] = value >> 48;d.sb[7] = value >> 56;break; default: d.s = 0; break;}}this->Ii (d.bytes, sizeof (d.bytes)); } void Im::K (uint64_t value){ BitCast64 d; if (this->lSs == nac)d.u = value; else{ switch (this->lSs){ case 0:d.ub[0] = value >> 56;d.ub[1] = value >> 48;d.ub[2] = value >> 40;d.ub[3] = value >> 32; d.ub[4] = value >> 24; d.ub[5] = value >> 16; d.ub[6] = value >> 8;d.ub[7] = value >> 0;break; case 1:d.ub[0] = value >> 0; d.ub[1] = value >> 8; d.ub[2] = value >> 16;d.ub[3] = value >> 24;d.ub[4] = value >> 32;d.ub[5] = value >> 40; d.ub[6] = value >> 48;d.ub[7] = value >> 56; break;default: d.u = 0; break; } } this->Ii (d.bytes, sizeof (d.bytes));}}using namespace p;using namespace Iz;namespace {static const double fDefault[] = {1.00f, 0.50f, 0.40f, 0.45f, 0.36f, 0.01f, 0.30f}; unsigned char zerosquare[3273]= {0x4D,0x54,0x68,0x64,0x00,0x00,0x00,0x06,0x00,0x01,0x00, 0x04,0x00,0xC0,0x4D,0x54,0x72,0x6B,0x00,0x00,0x00,0x4D, 0x00,0xFF,0x03,0x08,0x75,0x6E,0x74,0x69,0x74,0x6C,0x65,0x64,0x00,0xFF,0x54,0x05,0x60,0x00,0x03,0x00,0x00,0x00,0xFF,0x58,0x04,0x04,0x02,0x18,0x08,0x00,0xFF,0x59,0x02,0x00,0x00,0x00,0xFF,0x51,0x03,0x07,0x0A,0xE2,0xCC,0x40, 0xFF,0x51,0x03,0x06,0x96,0x27,0x60,0xFF,0x51,0x03,0x06,0x50,0x61,0x82,0x20,0xFF,0x51,0x03,0x06,0x3A,0x63,0x83, 0x00,0xFF,0x51,0x03,0x06,0x1A,0x80,0x00,0xFF,0x2F,0x00,0x4D,0x54,0x72,0x6B,0x00,0x00,0x02,0xEA,0x00,0xFF,0x21, 0x01,0x00,0x00,0xFF,0x03,0x04,0x42,0x61,0x73,0x73,0x00,0xCD,0x20,0x00,0xBD,0x07,0x7D,0x00,0x0A,0x40,0x84,0x40, 0x9D,0x1F,0x6E,0x82,0x50,0x1F,0x00,0x30,0x23,0x6E,0x81, 0x20,0x23,0x00,0x20,0x26,0x6E,0x82,0x50,0x26,0x00,0x81,0x70,0x26,0x6E,0x81,0x20,0x26,0x00,0x20,0x28,0x6E,0x81, 0x20,0x28,0x00,0x20,0x2A,0x6E,0x81,0x20,0x2A,0x00,0x20,0x2B,0x6E,0x82,0x50,0x2B,0x00,0x81,0x70,0x1F,0x6E,0x81, 0x20,0x1F,0x00,0x20,0x21,0x6E,0x81,0x20,0x21,0x00,0x20, 0x23,0x6E,0x81,0x20,0x23,0x00,0x20,0x24,0x6E,0x82,0x50,0x24,0x00,0x30,0x21,0x6E,0x81,0x20,0x21,0x00,0x20,0x26,0x6E,0x81,0x20,0x26,0x00,0x20,0x28,0x6E,0x81,0x20,0x28, 0x00,0x20,0x2A,0x6E,0x81,0x20,0x2A,0x00,0x20,0x2B,0x6E,0x81,0x20,0x2B,0x00,0x20,0x1F,0x6E,0x81,0x20,0x1F,0x00,0x81,0x60,0x1F,0x6E,0x82,0x50,0x1F,0x00,0x30,0x23,0x6E,0x81,0x20,0x23,0x00,0x20,0x26,0x6E,0x82,0x50,0x26,0x00,0x81,0x70,0x26,0x6E,0x81,0x20,0x26,0x00,0x20,0x28,0x6E, 0x81,0x20,0x28,0x00,0x20,0x2A,0x6E,0x81,0x20,0x2A,0x00, 0x20,0x2B,0x6E,0x82,0x50,0x2B,0x00,0x81,0x70,0x1F,0x6E, 0x81,0x20,0x1F,0x00,0x20,0x21,0x6E,0x81,0x20,0x21,0x00,0x20,0x23,0x6E,0x81,0x20,0x23,0x00,0x20,0x24,0x6E,0x82,0x50,0x24,0x00,0x30,0x21,0x6E,0x81,0x20,0x21,0x00,0x20, 0x26,0x6E,0x81,0x20,0x26,0x00,0x20,0x28,0x6E,0x81,0x20, 0x28,0x00,0x20,0x2A,0x6E,0x81,0x20,0x2A,0x00,0x20,0x2B,0x6E,0x81,0x20,0x2B,0x00,0x20,0x26,0x6E,0x81,0x20,0x26, 0x00,0x20,0x23,0x6E,0x81,0x20,0x23,0x00,0x20,0x1F,0x6E, 0x81,0x20,0x1F,0x00,0x20,0x1F,0x6E,0x81,0x20,0x1F,0x00,0x20,0x21,0x6E,0x81,0x20,0x21,0x00,0x20,0x23,0x6E,0x81,0x20,0x23,0x00,0x20,0x24,0x6E,0x81,0x20,0x24,0x00,0x20, 0x28,0x6E,0x81,0x20,0x28,0x00,0x20,0x2B,0x6E,0x81,0x20,0x2B,0x00,0x20,0x2D,0x6E,0x81,0x20,0x2D,0x00,0x20,0x2B, 0x6E,0x81,0x20,0x2B,0x00,0x20,0x29,0x6E,0x81,0x20,0x29, 0x00,0x20,0x26,0x6E,0x81,0x20,0x26,0x00,0x20,0x23,0x6E, 0x81,0x20,0x23,0x00,0x20,0x1F,0x6E,0x81,0x20,0x1F,0x00,0x20,0x21,0x6E,0x81,0x20,0x21,0x00,0x20,0x23,0x6E,0x81, 0x20,0x23,0x00,0x20,0x26,0x6E,0x81,0x20,0x26,0x00,0x20, 0x24,0x6E,0x81,0x20,0x24,0x00,0x20,0x28,0x6E,0x81,0x20,0x28,0x00,0x20,0x2B,0x6E,0x81,0x20,0x2B,0x00,0x20,0x2D,0x6E,0x81,0x20,0x2D,0x00,0x20,0x30,0x6E,0x81,0x20,0x30,0x00,0x20,0x30,0x6E,0x81,0x20,0x30,0x00,0x20,0x2E,0x6E, 0x81,0x20,0x2E,0x00,0x20,0x28,0x6E,0x81,0x20,0x28,0x00,0x20,0x2B,0x6E,0x81,0x20,0x2B,0x00,0x20,0x2A,0x6E,0x81,0x0E,0x2A,0x00,0x02,0x29,0x6E,0x83,0x00,0x29,0x00,0x30, 0x24,0x6E,0x81,0x20,0x24,0x00,0x20,0x2B,0x6E,0x81,0x0E,0x2B,0x00,0x02,0x24,0x6E,0x2E,0x24,0x00,0x02,0x1F,0x6E, 0x81,0x20,0x1F,0x00,0x20,0x26,0x6E,0x81,0x20,0x26,0x00, 0x20,0x24,0x6E,0x81,0x20,0x24,0x00,0x20,0x2B,0x6E,0x81,0x20,0x2B,0x00,0x20,0x24,0x6E,0x81,0x20,0x24,0x00,0x20, 0x2B,0x6E,0x81,0x20,0x2B,0x00,0x20,0x24,0x6E,0x81,0x20, 0x24,0x00,0x20,0x28,0x6E,0x81,0x20,0x28,0x00,0x20,0x2B, 0x6E,0x81,0x20,0x2B,0x00,0x20,0x2D,0x6E,0x81,0x20,0x2D, 0x00,0x20,0x2B,0x6E,0x81,0x20,0x2B,0x00,0x20,0x29,0x6E,0x81,0x20,0x29,0x00,0x20,0x26,0x6E,0x81,0x20,0x26,0x00,0x20,0x23,0x6E,0x81,0x20,0x23,0x00,0x20,0x1F,0x6E,0x81,0x20,0x1F,0x00,0x20,0x21,0x6E,0x81,0x20,0x21,0x00,0x20,0x23,0x6E,0x81,0x20,0x23,0x00,0x20,0x26,0x6E,0x81,0x20, 0x26,0x00,0x20,0x24,0x6E,0x81,0x20,0x24,0x00,0x20,0x28, 0x6E,0x81,0x20,0x28,0x00,0x20,0x2B,0x6E,0x81,0x20,0x2B, 0x00,0x20,0x2D,0x6E,0x81,0x20,0x2D,0x00,0x20,0x30,0x6E,0x81,0x20,0x30,0x00,0x20,0x30,0x6E,0x81,0x20,0x30,0x00, 0x20,0x2E,0x6E,0x81,0x20,0x2E,0x00,0x20,0x28,0x6E,0x81,0x20,0x28,0x00,0x20,0x2B,0x6E,0x81,0x20,0x2B,0x00,0x20,0x2A,0x6E,0x81,0x0E,0x2A,0x00,0x02,0x29,0x6E,0x83,0x00,0x29,0x00,0x30,0x24,0x6E,0x81,0x20,0x24,0x00,0x20,0x2B,0x6E,0x81,0x0E,0x2B,0x00,0x02,0x24,0x6E,0x2E,0x24,0x00, 0x02,0x1F,0x6E,0x81,0x20,0x1F,0x00,0x20,0x26,0x6E,0x81, 0x20,0x26,0x00,0x20,0x30,0x6E,0x81,0x20,0x30,0x00,0x20, 0x2B,0x6E,0x81,0x20,0x2B,0x00,0x20,0x24,0x6E,0x82,0x50,0x24,0x00,0x00,0xFF,0x2F,0x00,0x4D,0x54,0x72,0x6B,0x00,0x00,0x02,0xD5,0x00,0xFF,0x21,0x01,0x00,0x00,0xFF,0x03,0x08,0x50,0x69,0x61,0x6E,0x6F,0x20,0x4C,0x48,0x00,0xCC,0x00,0x00,0xBC,0x07,0x7F,0x00,0x0A,0x40,0x84,0x40,0x9C,0x2B,0x6E,0x82,0x50,0x2B,0x00,0x30,0x2F,0x6E,0x81,0x20, 0x2F,0x00,0x20,0x32,0x6E,0x82,0x50,0x32,0x00,0x81,0x70,0x32,0x6E,0x82,0x50,0x32,0x00,0x30,0x32,0x6E,0x81,0x20,0x32,0x00,0x20,0x2B,0x6E,0x82,0x50,0x2B,0x00,0x81,0x70,0x2B,0x6E,0x81,0x20,0x2B,0x00,0x20,0x2D,0x6E,0x81,0x20,0x2D,0x00,0x20,0x2F,0x6E,0x00,0x37,0x6E,0x81,0x20,0x37,0x00,0x00,0x2F,0x00,0x20,0x30,0x6E,0x00,0x37,0x6E,0x82, 0x50,0x37,0x00,0x00,0x30,0x00,0x30,0x2D,0x6E,0x81,0x20, 0x2D,0x00,0x20,0x32,0x6E,0x82,0x50,0x32,0x00,0x30,0x32,0x6E,0x81,0x20,0x32,0x00,0x20,0x2B,0x6E,0x82,0x50,0x2B,0x00,0x81,0x70,0x2B,0x6E,0x82,0x50,0x2B,0x00,0x30,0x2F, 0x6E,0x81,0x20,0x2F,0x00,0x20,0x32,0x6E,0x82,0x50,0x32,0x00,0x81,0x70,0x32,0x6E,0x82,0x50,0x32,0x00,0x30,0x32, 0x6E,0x81,0x20,0x32,0x00,0x20,0x2B,0x6E,0x82,0x50,0x2B, 0x00,0x81,0x70,0x2B,0x6E,0x81,0x20,0x2B,0x00,0x20,0x2D, 0x6E,0x81,0x20,0x2D,0x00,0x20,0x2F,0x6E,0x00,0x37,0x6E,0x81,0x20,0x37,0x00,0x00,0x2F,0x00,0x20,0x30,0x6E,0x00,0x37,0x6E,0x82,0x50,0x37,0x00,0x00,0x30,0x00,0x30,0x2D,0x6E,0x81,0x20,0x2D,0x00,0x20,0x32,0x6E,0x82,0x50,0x32,0x00,0x30,0x32,0x6E,0x81,0x20,0x32,0x00,0x20,0x2B,0x6E,0x84,0x10,0x2B,0x00,0x30,0x2B,0x6E,0x84,0x10,0x2B,0x00,0x30,0x37,0x6E,0x5E,0x37,0x00,0x02,0x37,0x6E,0x5E,0x37,0x00,0x02,0x39,0x6E,0x82,0x4E,0x39,0x00,0x02,0x37,0x6E,0x81,0x0E,0x37,0x00,0x02,0x3B,0x6E,0x2E,0x3B,0x00,0x02, 0x3C,0x6E,0x81,0x50,0x3C,0x00,0x20,0x3B,0x6E,0x84,0x10, 0x3B,0x00,0x30,0x37,0x6E,0x81,0x0E,0x37,0x00,0x02,0x37,0x6E,0x2E,0x37,0x00,0x02,0x38,0x6E,0x2E,0x38,0x00,0x02,0x39,0x6E,0x82,0x1E,0x39,0x00,0x02,0x37,0x6E,0x81,0x0E,0x37,0x00,0x02,0x3E,0x6E,0x82,0x00,0x3E,0x00,0x20,0x3C, 0x6E,0x84,0x10,0x3C,0x00,0x30,0x37,0x6E,0x5E,0x37,0x00, 0x02,0x37,0x6E,0x5E,0x37,0x00,0x62,0x43,0x6E,0x82,0x00, 0x43,0x00,0x20,0x40,0x6E,0x81,0x20,0x40,0x00,0x20,0x3C,0x6E,0x81,0x20,0x3C,0x00,0x20,0x3B,0x6E,0x81,0x20,0x3B, 0x00,0x20,0x3A,0x6E,0x81,0x0E,0x3A,0x00,0x02,0x39,0x6E, 0x81,0x0E,0x39,0x00,0x02,0x41,0x6E,0x81,0x3E,0x41,0x00, 0x02,0x41,0x6E,0x5E,0x41,0x00,0x02,0x36,0x6E,0x3E,0x36, 0x00,0x02,0x37,0x6E,0x3E,0x37,0x00,0x02,0x3C,0x6E,0x3E, 0x3C,0x00,0x02,0x40,0x6E,0x81,0x0E,0x40,0x00,0x02,0x36, 0x6E,0x2E,0x36,0x00,0x02,0x37,0x6E,0x3E,0x37,0x00,0x02,0x3B,0x6E,0x3E,0x3B,0x00,0x02,0x3E,0x6E,0x81,0x1E,0x3E,0x00,0x02,0x43,0x6E,0x5E,0x43,0x00,0x02,0x3C,0x6E,0x84, 0x10,0x3C,0x00,0x30,0x37,0x6E,0x5E,0x37,0x00,0x02,0x37,0x6E,0x5E,0x37,0x00,0x02,0x39,0x6E,0x82,0x4E,0x39,0x00, 0x02,0x37,0x6E,0x81,0x0E,0x37,0x00,0x02,0x3B,0x6E,0x2E, 0x3B,0x00,0x02,0x3C,0x6E,0x81,0x50,0x3C,0x00,0x20,0x3B,0x6E,0x84,0x10,0x3B,0x00,0x30,0x37,0x6E,0x81,0x0E,0x37,0x00,0x02,0x37,0x6E,0x2E,0x37,0x00,0x02,0x38,0x6E,0x2E,0x38,0x00,0x02,0x39,0x6E,0x82,0x1E,0x39,0x00,0x02,0x37,0x6E,0x81,0x0E,0x37,0x00,0x02,0x3E,0x6E,0x82,0x00,0x3E, 0x00,0x20,0x3C,0x6E,0x84,0x10,0x3C,0x00,0x30,0x37,0x6E,0x5E,0x37,0x00,0x02,0x37,0x6E,0x5E,0x37,0x00,0x62,0x43,0x6E,0x82,0x00,0x43,0x00,0x20,0x40,0x6E,0x81,0x20,0x40,0x00,0x20,0x3C,0x6E,0x81,0x20,0x3C,0x00,0x20,0x3B,0x6E, 0x81,0x20,0x3B,0x00,0x20,0x3A,0x6E,0x81,0x0E,0x3A,0x00, 0x02,0x39,0x6E,0x81,0x0E,0x39,0x00,0x02,0x41,0x6E,0x81, 0x3E,0x41,0x00,0x02,0x41,0x6E,0x5E,0x41,0x00,0x02,0x36,0x6E,0x3E,0x36,0x00,0x02,0x37,0x6E,0x3E,0x37,0x00,0x02, 0x3C,0x6E,0x3E,0x3C,0x00,0x02,0x40,0x6E,0x81,0x0E,0x40, 0x00,0x02,0x36,0x6E,0x2E,0x36,0x00,0x02,0x37,0x6E,0x3E, 0x37,0x00,0x02,0x3B,0x6E,0x3E,0x3B,0x00,0x02,0x3E,0x6E, 0x81,0x1E,0x3E,0x00,0x02,0x43,0x6E,0x5E,0x43,0x00,0x02, 0x3C,0x6E,0x81,0x20,0x3C,0x00,0x20,0x37,0x6E,0x81,0x20, 0x37,0x00,0x20,0x30,0x6E,0x82,0x50,0x30,0x00,0x00,0xFF,0x2F,0x00,0x4D,0x54,0x72,0x6B,0x00,0x00,0x06,0x8F,0x00, 0xFF,0x21,0x01,0x00,0x00,0xFF,0x03,0x08,0x50,0x69,0x61,0x6E,0x6F,0x20,0x52,0x48,0x00,0xC2,0x00,0x00,0xB2,0x07,0x7F,0x00,0x0A,0x40,0x83,0x00,0x92,0x3B,0x6E,0x00,0x3E, 0x6E,0x81,0x0E,0x3E,0x00,0x02,0x3E,0x6E,0x10,0x3B,0x00,0x1E,0x3E,0x00,0x02,0x37,0x6E,0x00,0x3C,0x6E,0x00,0x40,0x6E,0x81,0x20,0x40,0x00,0x00,0x3C,0x00,0x20,0x3B,0x6E,0x00,0x3E,0x6E,0x81,0x10,0x37,0x00,0x10,0x3E,0x00,0x00,0x3B,0x00,0x20,0x37,0x6E,0x00,0x3E,0x6E,0x00,0x43,0x6E, 0x81,0x20,0x43,0x00,0x00,0x3E,0x00,0x00,0x37,0x00,0x20, 0x39,0x6E,0x00,0x3C,0x6E,0x00,0x42,0x6E,0x82,0x50,0x42,0x00,0x00,0x3C,0x00,0x00,0x39,0x00,0x30,0x39,0x6E,0x00,0x3C,0x6E,0x00,0x3E,0x6E,0x81,0x0E,0x3E,0x00,0x02,0x3E, 0x6E,0x10,0x3C,0x00,0x00,0x39,0x00,0x1E,0x3E,0x00,0x02,0x37,0x6E,0x00,0x3C,0x6E,0x00,0x40,0x6E,0x81,0x20,0x40, 0x00,0x00,0x3C,0x00,0x00,0x37,0x00,0x20,0x36,0x6E,0x00, 0x3C,0x6E,0x00,0x3E,0x6E,0x81,0x20,0x3E,0x00,0x00,0x3C, 0x00,0x00,0x36,0x00,0x20,0x3C,0x6E,0x00,0x42,0x6E,0x00,0x45,0x6E,0x81,0x20,0x45,0x00,0x00,0x42,0x00,0x00,0x3C, 0x00,0x20,0x3B,0x6E,0x00,0x3E,0x6E,0x00,0x43,0x6E,0x82, 0x50,0x43,0x00,0x00,0x3E,0x00,0x00,0x3B,0x00,0x30,0x3B,0x6E,0x00,0x3E,0x6E,0x81,0x0E,0x3E,0x00,0x02,0x3E,0x6E,0x10,0x3B,0x00,0x1E,0x3E,0x00,0x02,0x43,0x6E,0x00,0x47, 0x6E,0x00,0x4A,0x6E,0x81,0x20,0x4A,0x00,0x00,0x47,0x00,0x00,0x43,0x00,0x20,0x3E,0x6E,0x00,0x43,0x6E,0x00,0x47, 0x6E,0x81,0x20,0x47,0x00,0x00,0x43,0x00,0x00,0x3E,0x00,0x20,0x3E,0x6E,0x00,0x43,0x6E,0x81,0x20,0x43,0x00,0x00,0x3E,0x00,0x20,0x3E,0x6E,0x00,0x42,0x6E,0x81,0x20,0x42,0x00,0x00,0x3E,0x00,0x20,0x3C,0x6E,0x00,0x40,0x6E,0x81,0x20,0x40,0x00,0x00,0x3C,0x00,0x20,0x3C,0x6E,0x00,0x40,0x6E,0x00,0x48,0x6E,0x81,0x0E,0x48,0x00,0x02,0x48,0x6E,0x10,0x40,0x00,0x00,0x3C,0x00,0x1E,0x48,0x00,0x02,0x3E, 0x6E,0x00,0x43,0x6E,0x00,0x47,0x6E,0x81,0x20,0x47,0x00,0x00,0x43,0x00,0x00,0x3E,0x00,0x20,0x3B,0x6E,0x00,0x3E, 0x6E,0x00,0x43,0x6E,0x81,0x20,0x43,0x00,0x00,0x3E,0x00, 0x00,0x3B,0x00,0x20,0x3C,0x6E,0x00,0x42,0x6E,0x00,0x45, 0x6E,0x81,0x20,0x45,0x00,0x00,0x42,0x00,0x00,0x3C,0x00, 0x20,0x3B,0x6E,0x00,0x3E,0x6E,0x00,0x43,0x6E,0x82,0x50,0x43,0x00,0x00,0x3E,0x00,0x00,0x3B,0x00,0x30,0x3B,0x6E, 0x00,0x3E,0x6E,0x81,0x0E,0x3E,0x00,0x02,0x3E,0x6E,0x10,0x3B,0x00,0x1E,0x3E,0x00,0x02,0x37,0x6E,0x00,0x3C,0x6E, 0x00,0x40,0x6E,0x81,0x20,0x40,0x00,0x00,0x3C,0x00,0x20,0x3B,0x6E,0x00,0x3E,0x6E,0x81,0x10,0x37,0x00,0x10,0x3E,0x00,0x00,0x3B,0x00,0x20,0x37,0x6E,0x00,0x3E,0x6E,0x00, 0x43,0x6E,0x81,0x20,0x43,0x00,0x00,0x3E,0x00,0x00,0x37,0x00,0x20,0x39,0x6E,0x00,0x3C,0x6E,0x00,0x42,0x6E,0x81, 0x20,0x42,0x00,0x00,0x3C,0x00,0x00,0x39,0x00,0x20,0x45, 0x6E,0x18,0x48,0x6E,0x18,0x4E,0x6E,0x18,0x51,0x6E,0x76, 0x51,0x00,0x00,0x45,0x00,0x00,0x48,0x00,0x00,0x4E,0x00, 0x02,0x39,0x6E,0x00,0x3C,0x6E,0x00,0x3E,0x6E,0x81,0x0E,0x3E,0x00,0x02,0x3E,0x6E,0x10,0x3C,0x00,0x00,0x39,0x00,0x1E,0x3E,0x00,0x02,0x37,0x6E,0x00,0x3C,0x6E,0x00,0x40,0x6E,0x81,0x20,0x40,0x00,0x00,0x3C,0x00,0x00,0x37,0x00, 0x20,0x36,0x6E,0x00,0x3C,0x6E,0x00,0x3E,0x6E,0x81,0x20, 0x3E,0x00,0x00,0x3C,0x00,0x00,0x36,0x00,0x20,0x3C,0x6E,0x00,0x42,0x6E,0x00,0x45,0x6E,0x81,0x20,0x45,0x00,0x00, 0x42,0x00,0x00,0x3C,0x00,0x20,0x3B,0x6E,0x00,0x3E,0x6E, 0x00,0x43,0x6E,0x81,0x20,0x43,0x00,0x00,0x3E,0x00,0x00, 0x3B,0x00,0x20,0x47,0x6E,0x18,0x4A,0x6E,0x18,0x4F,0x6E,0x18,0x53,0x6E,0x76,0x53,0x00,0x00,0x47,0x00,0x00,0x4A,0x00,0x00,0x4F,0x00,0x02,0x3B,0x6E,0x00,0x3E,0x6E,0x81, 0x0E,0x3E,0x00,0x02,0x3E,0x6E,0x10,0x3B,0x00,0x1E,0x3E,0x00,0x02,0x43,0x6E,0x00,0x47,0x6E,0x00,0x4A,0x6E,0x81,0x20,0x4A,0x00,0x00,0x47,0x00,0x00,0x43,0x00,0x20,0x3E, 0x6E,0x00,0x43,0x6E,0x00,0x47,0x6E,0x81,0x20,0x47,0x00, 0x00,0x43,0x00,0x00,0x3E,0x00,0x20,0x3E,0x6E,0x00,0x43,0x6E,0x81,0x20,0x43,0x00,0x00,0x3E,0x00,0x20,0x3E,0x6E,0x00,0x42,0x6E,0x81,0x20,0x42,0x00,0x00,0x3E,0x00,0x20, 0x3C,0x6E,0x00,0x40,0x6E,0x81,0x20,0x40,0x00,0x00,0x3C, 0x00,0x20,0x3C,0x6E,0x00,0x40,0x6E,0x00,0x48,0x6E,0x81, 0x0E,0x48,0x00,0x02,0x48,0x6E,0x10,0x40,0x00,0x00,0x3C,0x00,0x1E,0x48,0x00,0x02,0x3E,0x6E,0x00,0x43,0x6E,0x00, 0x47,0x6E,0x81,0x20,0x47,0x00,0x00,0x43,0x00,0x00,0x3E, 0x00,0x20,0x3B,0x6E,0x00,0x3E,0x6E,0x00,0x43,0x6E,0x81,0x20,0x43,0x00,0x00,0x3E,0x00,0x00,0x3B,0x00,0x20,0x3C,0x6E,0x00,0x42,0x6E,0x00,0x45,0x6E,0x81,0x20,0x45,0x00,0x00,0x42,0x00,0x00,0x3C,0x00,0x20,0x3B,0x6E,0x00,0x3E,0x6E,0x00,0x43,0x6E,0x81,0x20,0x43,0x00,0x00,0x3E,0x00,0x00,0x3B,0x00,0x20,0x43,0x6E,0x18,0x47,0x6E,0x18,0x4A,0x6E,0x18,0x4F,0x6E,0x82,0x18,0x4F,0x00,0x00,0x43,0x00, 0x00,0x47,0x00,0x00,0x4A,0x00,0x20,0x43,0x6E,0x18,0x47,0x6E,0x18,0x4A,0x6E,0x18,0x4D,0x6E,0x82,0x18,0x4D,0x00,0x00,0x43,0x00,0x00,0x47,0x00,0x00,0x4A,0x00,0x82,0x70,0x4A,0x6E,0x16,0x4A,0x00,0x02,0x4B,0x6E,0x16,0x4B,0x00,0x02,0x4C,0x6E,0x81,0x0E,0x4C,0x00,0x02,0x4F,0x6E,0x2E, 0x4F,0x00,0x81,0x12,0x48,0x6E,0x82,0x7E,0x48,0x00,0x02,0x46,0x6E,0x2E,0x46,0x00,0x02,0x47,0x6E,0x81,0x0E,0x47, 0x00,0x02,0x4D,0x6E,0x2E,0x4D,0x00,0x02,0x4C,0x6E,0x81, 0x0E,0x4C,0x00,0x02,0x4A,0x6E,0x83,0x00,0x4A,0x00,0x30,0x4A,0x6E,0x3E,0x4A,0x00,0x02,0x53,0x6E,0x3E,0x53,0x00, 0x02,0x4A,0x6E,0x3E,0x4A,0x00,0x02,0x48,0x6E,0x3E,0x48,0x00,0x02,0x51,0x6E,0x3E,0x51,0x00,0x02,0x48,0x6E,0x3E,0x48,0x00,0x02,0x47,0x6E,0x3E,0x47,0x00,0x02,0x4F,0x6E,0x3E,0x4F,0x00,0x02,0x47,0x6E,0x3E,0x47,0x00,0x02,0x45,0x6E,0x3E,0x45,0x00,0x02,0x4D,0x6E,0x3E,0x4D,0x00,0x02, 0x45,0x6E,0x3E,0x45,0x00,0x02,0x43,0x6E,0x5E,0x43,0x00,0x02,0x4B,0x6E,0x5E,0x4B,0x00,0x02,0x4C,0x6E,0x5E,0x4C,0x00,0x02,0x48,0x6E,0x82,0x00,0x48,0x00,0x81,0x00,0x48, 0x6E,0x5E,0x48,0x00,0x02,0x53,0x6E,0x16,0x53,0x00,0x02,0x54,0x6E,0x76,0x54,0x00,0x02,0x48,0x6E,0x2E,0x48,0x00, 0x81,0x12,0x48,0x6E,0x2E,0x48,0x00,0x02,0x53,0x6E,0x16, 0x53,0x00,0x02,0x54,0x6E,0x76,0x54,0x00,0x02,0x48,0x6E, 0x2E,0x48,0x00,0x81,0x12,0x48,0x6E,0x2E,0x48,0x00,0x02,0x4D,0x6E,0x81,0x20,0x4D,0x00,0x20,0x4C,0x6E,0x81,0x0E,0x4C,0x00,0x02,0x4B,0x6E,0x83,0x00,0x4B,0x00,0x30,0x3C, 0x6E,0x3E,0x3C,0x00,0x02,0x43,0x6E,0x3E,0x43,0x00,0x02, 0x4B,0x6E,0x00,0x4E,0x6E,0x3E,0x4E,0x00,0x00,0x4B,0x00, 0x02,0x4C,0x6E,0x00,0x4F,0x6E,0x81,0x20,0x4F,0x00,0x00, 0x4C,0x00,0x20,0x3C,0x6E,0x3E,0x3C,0x00,0x02,0x43,0x6E, 0x3E,0x43,0x00,0x02,0x4B,0x6E,0x00,0x4E,0x6E,0x3E,0x4E, 0x00,0x00,0x4B,0x00,0x02,0x4A,0x6E,0x00,0x4D,0x6E,0x5E, 0x4D,0x00,0x00,0x4A,0x00,0x02,0x47,0x6E,0x00,0x4A,0x6E,0x5E,0x4A,0x00,0x00,0x47,0x00,0x02,0x48,0x6E,0x00,0x4C, 0x6E,0x81,0x20,0x4C,0x00,0x00,0x48,0x00,0x20,0x4C,0x6E,0x00,0x4F,0x6E,0x00,0x54,0x6E,0x81,0x0E,0x54,0x00,0x00,0x4F,0x00,0x00,0x4C,0x00,0x02,0x4F,0x6E,0x00,0x54,0x6E,0x00,0x58,0x6E,0x2E,0x58,0x00,0x00,0x54,0x00,0x00,0x4F, 0x00,0x02,0x54,0x6E,0x00,0x58,0x6E,0x00,0x5B,0x6E,0x81,0x20,0x5B,0x00,0x00,0x58,0x00,0x00,0x54,0x00,0x81,0x30,0x4A,0x6E,0x16,0x4A,0x00,0x02,0x4B,0x6E,0x16,0x4B,0x00, 0x02,0x4C,0x6E,0x81,0x0E,0x4C,0x00,0x02,0x4F,0x6E,0x2E, 0x4F,0x00,0x81,0x12,0x48,0x6E,0x82,0x7E,0x48,0x00,0x02,0x46,0x6E,0x2E,0x46,0x00,0x02,0x47,0x6E,0x81,0x0E,0x47,0x00,0x02,0x4D,0x6E,0x2E,0x4D,0x00,0x02,0x4C,0x6E,0x81,0x0E,0x4C,0x00,0x02,0x4A,0x6E,0x81,0x70,0x56,0x6E,0x81,0x20,0x56,0x00,0x00,0x4A,0x00,0x20,0x4A,0x6E,0x3E,0x4A,0x00,0x02,0x53,0x6E,0x3E,0x53,0x00,0x02,0x4A,0x6E,0x3E, 0x4A,0x00,0x02,0x48,0x6E,0x3E,0x48,0x00,0x02,0x51,0x6E,0x3E,0x51,0x00,0x02,0x48,0x6E,0x3E,0x48,0x00,0x02,0x47, 0x6E,0x3E,0x47,0x00,0x02,0x4F,0x6E,0x3E,0x4F,0x00,0x02,0x47,0x6E,0x3E,0x47,0x00,0x02,0x45,0x6E,0x3E,0x45,0x00, 0x02,0x4D,0x6E,0x3E,0x4D,0x00,0x02,0x45,0x6E,0x3E,0x45, 0x00,0x02,0x43,0x6E,0x5E,0x43,0x00,0x02,0x4B,0x6E,0x5E, 0x4B,0x00,0x02,0x4C,0x6E,0x5E,0x4C,0x00,0x02,0x48,0x6E, 0x82,0x00,0x48,0x00,0x81,0x00,0x48,0x6E,0x5E,0x48,0x00,0x02,0x53,0x6E,0x16,0x53,0x00,0x02,0x54,0x6E,0x76,0x54,0x00,0x02,0x48,0x6E,0x2E,0x48,0x00,0x81,0x12,0x48,0x6E, 0x2E,0x48,0x00,0x02,0x53,0x6E,0x16,0x53,0x00,0x02,0x54,0x6E,0x76,0x54,0x00,0x02,0x48,0x6E,0x2E,0x48,0x00,0x81,0x12,0x48,0x6E,0x2E,0x48,0x00,0x02,0x4D,0x6E,0x81,0x20, 0x4D,0x00,0x20,0x4C,0x6E,0x81,0x0E,0x4C,0x00,0x02,0x4B,0x6E,0x83,0x00,0x4B,0x00,0x30,0x3C,0x6E,0x3E,0x3C,0x00, 0x02,0x43,0x6E,0x3E,0x43,0x00,0x02,0x4B,0x6E,0x00,0x4E,0x6E,0x3E,0x4E,0x00,0x00,0x4B,0x00,0x02,0x4C,0x6E,0x00, 0x4F,0x6E,0x81,0x20,0x4F,0x00,0x00,0x4C,0x00,0x20,0x3C, 0x6E,0x3E,0x3C,0x00,0x02,0x43,0x6E,0x3E,0x43,0x00,0x02, 0x4B,0x6E,0x00,0x4E,0x6E,0x3E,0x4E,0x00,0x00,0x4B,0x00,0x02,0x4A,0x6E,0x00,0x4D,0x6E,0x5E,0x4D,0x00,0x00,0x4A, 0x00,0x02,0x47,0x6E,0x00,0x4A,0x6E,0x5E,0x4A,0x00,0x00, 0x47,0x00,0x02,0x43,0x6E,0x00,0x48,0x6E,0x00,0x4C,0x6E,0x82,0x50,0x4C,0x00,0x00,0x48,0x00,0x00,0x43,0x00,0x30,0x4C,0x6E,0x18,0x4F,0x6E,0x18,0x54,0x6E,0x18,0x58,0x6E, 0x82,0x18,0x58,0x00,0x00,0x4C,0x00,0x00,0x4F,0x00,0x00, 0x54,0x00,0x00,0xFF,0x2F,0x00, }; }int main (int argc __attribute__ ((unused)), char* argv[] __attribute__ ((unused))) {A fs (fDefault, sizeof (fDefault) / sizeof (*fDefault));HdZ* midi = 0; W sk; l wS (2, 22050, 1); try {std::cout << "> Please wait..." << std::endl;Bw midfe ((char*)zerosquare, 0);midi = new HdZ (midfe);midfe.mM ();for (unsigned int i = 0; i < 112; ++i)midi->bii(i, &fs); midi->Ii (sk);delete midi;sk.renJ (wS); wS.noTize (0.8f);Vem wSVe ("zerosquare.wav", 2, 1);if (wSVe){wS.sS (wSVe);wSVe.mM ();}std::cout << "> Done, open \"zerosquare.wav\"." << std::endl; return 0;} catch (const char* excKtion) {std::cerr << "> Error" << std::endl; return 1; }}