From 63acd177444b2e780193b4d989cb74bb2936ead5 Mon Sep 17 00:00:00 2001 From: Antiloope Date: Wed, 14 Oct 2020 23:11:48 -0300 Subject: [PATCH] Added all notes --- src/UI/toolbox/toolbox.cpp | 4 +- src/interpreter/context.cpp | 308 +++++++++++++++++++++++++- src/interpreter/languagedefinitions.h | 188 +++++++++++++--- 3 files changed, 460 insertions(+), 40 deletions(-) diff --git a/src/UI/toolbox/toolbox.cpp b/src/UI/toolbox/toolbox.cpp index 17f622d..ca32d51 100644 --- a/src/UI/toolbox/toolbox.cpp +++ b/src/UI/toolbox/toolbox.cpp @@ -28,8 +28,8 @@ ToolBox::ToolBox(QWidget *parent) this->addItem(_soundVisualizer,"Sound Visualizer"); QTextBrowser* documentation = new QTextBrowser(this); - documentation->setSearchPaths({"/home/antiloope/Documents/tesis/ChordScript/doc/html/"}); - documentation->setSource(QUrl("/home/antiloope/Documents/tesis/ChordScript/doc/html/annotated.html"),QTextDocument::HtmlResource); + documentation->setSearchPaths({"./docs/"}); + documentation->setSource(QUrl("./docs/Language-Documentation.html")); documentation->setOpenExternalLinks(true); documentation->setStyleSheet( "QTextBrowser {" diff --git a/src/interpreter/context.cpp b/src/interpreter/context.cpp index a317a9f..bb74b4a 100644 --- a/src/interpreter/context.cpp +++ b/src/interpreter/context.cpp @@ -122,11 +122,313 @@ void Context::load() { value = new SoundLiteralValue(new SoundGenerator(&Functions::square)); _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::squareSound,value); - this->newVariable(Names::a3,DataTypesId::Numeric); + this->newVariable(Names::c0,DataTypesId::Numeric); + this->newVariable(Names::cs0,DataTypesId::Numeric); + this->newVariable(Names::db0,DataTypesId::Numeric); + this->newVariable(Names::d0,DataTypesId::Numeric); + this->newVariable(Names::ds0,DataTypesId::Numeric); + this->newVariable(Names::eb0,DataTypesId::Numeric); + this->newVariable(Names::e0,DataTypesId::Numeric); + this->newVariable(Names::f0,DataTypesId::Numeric); + this->newVariable(Names::fs0,DataTypesId::Numeric); + this->newVariable(Names::gb0,DataTypesId::Numeric); + this->newVariable(Names::g0,DataTypesId::Numeric); + this->newVariable(Names::gs0,DataTypesId::Numeric); + this->newVariable(Names::ab0,DataTypesId::Numeric); + this->newVariable(Names::a0,DataTypesId::Numeric); + this->newVariable(Names::as0,DataTypesId::Numeric); + this->newVariable(Names::bb0,DataTypesId::Numeric); + this->newVariable(Names::b0,DataTypesId::Numeric); + this->newVariable(Names::c1,DataTypesId::Numeric); + this->newVariable(Names::cs1,DataTypesId::Numeric); + this->newVariable(Names::db1,DataTypesId::Numeric); + this->newVariable(Names::d1,DataTypesId::Numeric); + this->newVariable(Names::ds1,DataTypesId::Numeric); + this->newVariable(Names::eb1,DataTypesId::Numeric); + this->newVariable(Names::e1,DataTypesId::Numeric); + this->newVariable(Names::f1,DataTypesId::Numeric); + this->newVariable(Names::fs1,DataTypesId::Numeric); + this->newVariable(Names::gb1,DataTypesId::Numeric); + this->newVariable(Names::g1,DataTypesId::Numeric); + this->newVariable(Names::gs1,DataTypesId::Numeric); + this->newVariable(Names::ab1,DataTypesId::Numeric); + this->newVariable(Names::a1,DataTypesId::Numeric); + this->newVariable(Names::as1,DataTypesId::Numeric); + this->newVariable(Names::bb1,DataTypesId::Numeric); + this->newVariable(Names::b1,DataTypesId::Numeric); + this->newVariable(Names::c2,DataTypesId::Numeric); + this->newVariable(Names::cs2,DataTypesId::Numeric); + this->newVariable(Names::db2,DataTypesId::Numeric); + this->newVariable(Names::d2,DataTypesId::Numeric); + this->newVariable(Names::ds2,DataTypesId::Numeric); + this->newVariable(Names::eb2,DataTypesId::Numeric); + this->newVariable(Names::e2,DataTypesId::Numeric); + this->newVariable(Names::f2,DataTypesId::Numeric); + this->newVariable(Names::fs2,DataTypesId::Numeric); + this->newVariable(Names::gb2,DataTypesId::Numeric); + this->newVariable(Names::g2,DataTypesId::Numeric); + this->newVariable(Names::gs2,DataTypesId::Numeric); + this->newVariable(Names::ab2,DataTypesId::Numeric); + this->newVariable(Names::a2,DataTypesId::Numeric); + this->newVariable(Names::as2,DataTypesId::Numeric); + this->newVariable(Names::bb2,DataTypesId::Numeric); + this->newVariable(Names::b2,DataTypesId::Numeric); this->newVariable(Names::c3,DataTypesId::Numeric); - - _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::a3,new NumberLiteralValue(220)); + this->newVariable(Names::cs3,DataTypesId::Numeric); + this->newVariable(Names::db3,DataTypesId::Numeric); + this->newVariable(Names::d3,DataTypesId::Numeric); + this->newVariable(Names::ds3,DataTypesId::Numeric); + this->newVariable(Names::eb3,DataTypesId::Numeric); + this->newVariable(Names::e3,DataTypesId::Numeric); + this->newVariable(Names::f3,DataTypesId::Numeric); + this->newVariable(Names::fs3,DataTypesId::Numeric); + this->newVariable(Names::gb3,DataTypesId::Numeric); + this->newVariable(Names::g3,DataTypesId::Numeric); + this->newVariable(Names::gs3,DataTypesId::Numeric); + this->newVariable(Names::ab3,DataTypesId::Numeric); + this->newVariable(Names::a3,DataTypesId::Numeric); + this->newVariable(Names::as3,DataTypesId::Numeric); + this->newVariable(Names::bb3,DataTypesId::Numeric); + this->newVariable(Names::b3,DataTypesId::Numeric); + this->newVariable(Names::c4,DataTypesId::Numeric); + this->newVariable(Names::cs4,DataTypesId::Numeric); + this->newVariable(Names::db4,DataTypesId::Numeric); + this->newVariable(Names::d4,DataTypesId::Numeric); + this->newVariable(Names::ds4,DataTypesId::Numeric); + this->newVariable(Names::eb4,DataTypesId::Numeric); + this->newVariable(Names::e4,DataTypesId::Numeric); + this->newVariable(Names::f4,DataTypesId::Numeric); + this->newVariable(Names::fs4,DataTypesId::Numeric); + this->newVariable(Names::gb4,DataTypesId::Numeric); + this->newVariable(Names::g4,DataTypesId::Numeric); + this->newVariable(Names::gs4,DataTypesId::Numeric); + this->newVariable(Names::ab4,DataTypesId::Numeric); + this->newVariable(Names::a4,DataTypesId::Numeric); + this->newVariable(Names::as4,DataTypesId::Numeric); + this->newVariable(Names::bb4,DataTypesId::Numeric); + this->newVariable(Names::b4,DataTypesId::Numeric); + this->newVariable(Names::c5,DataTypesId::Numeric); + this->newVariable(Names::cs5,DataTypesId::Numeric); + this->newVariable(Names::db5,DataTypesId::Numeric); + this->newVariable(Names::d5,DataTypesId::Numeric); + this->newVariable(Names::ds5,DataTypesId::Numeric); + this->newVariable(Names::eb5,DataTypesId::Numeric); + this->newVariable(Names::e5,DataTypesId::Numeric); + this->newVariable(Names::f5,DataTypesId::Numeric); + this->newVariable(Names::fs5,DataTypesId::Numeric); + this->newVariable(Names::gb5,DataTypesId::Numeric); + this->newVariable(Names::g5,DataTypesId::Numeric); + this->newVariable(Names::gs5,DataTypesId::Numeric); + this->newVariable(Names::ab5,DataTypesId::Numeric); + this->newVariable(Names::a5,DataTypesId::Numeric); + this->newVariable(Names::as5,DataTypesId::Numeric); + this->newVariable(Names::bb5,DataTypesId::Numeric); + this->newVariable(Names::b5,DataTypesId::Numeric); + this->newVariable(Names::c6,DataTypesId::Numeric); + this->newVariable(Names::cs6,DataTypesId::Numeric); + this->newVariable(Names::db6,DataTypesId::Numeric); + this->newVariable(Names::d6,DataTypesId::Numeric); + this->newVariable(Names::ds6,DataTypesId::Numeric); + this->newVariable(Names::eb6,DataTypesId::Numeric); + this->newVariable(Names::e6,DataTypesId::Numeric); + this->newVariable(Names::f6,DataTypesId::Numeric); + this->newVariable(Names::fs6,DataTypesId::Numeric); + this->newVariable(Names::gb6,DataTypesId::Numeric); + this->newVariable(Names::g6,DataTypesId::Numeric); + this->newVariable(Names::gs6,DataTypesId::Numeric); + this->newVariable(Names::ab6,DataTypesId::Numeric); + this->newVariable(Names::a6,DataTypesId::Numeric); + this->newVariable(Names::as6,DataTypesId::Numeric); + this->newVariable(Names::bb6,DataTypesId::Numeric); + this->newVariable(Names::b6,DataTypesId::Numeric); + this->newVariable(Names::c7,DataTypesId::Numeric); + this->newVariable(Names::cs7,DataTypesId::Numeric); + this->newVariable(Names::db7,DataTypesId::Numeric); + this->newVariable(Names::d7,DataTypesId::Numeric); + this->newVariable(Names::ds7,DataTypesId::Numeric); + this->newVariable(Names::eb7,DataTypesId::Numeric); + this->newVariable(Names::e7,DataTypesId::Numeric); + this->newVariable(Names::f7,DataTypesId::Numeric); + this->newVariable(Names::fs7,DataTypesId::Numeric); + this->newVariable(Names::gb7,DataTypesId::Numeric); + this->newVariable(Names::g7,DataTypesId::Numeric); + this->newVariable(Names::gs7,DataTypesId::Numeric); + this->newVariable(Names::ab7,DataTypesId::Numeric); + this->newVariable(Names::a7,DataTypesId::Numeric); + this->newVariable(Names::as7,DataTypesId::Numeric); + this->newVariable(Names::bb7,DataTypesId::Numeric); + this->newVariable(Names::b7,DataTypesId::Numeric); + this->newVariable(Names::c8,DataTypesId::Numeric); + this->newVariable(Names::cs8,DataTypesId::Numeric); + this->newVariable(Names::db8,DataTypesId::Numeric); + this->newVariable(Names::d8,DataTypesId::Numeric); + this->newVariable(Names::ds8,DataTypesId::Numeric); + this->newVariable(Names::eb8,DataTypesId::Numeric); + this->newVariable(Names::e8,DataTypesId::Numeric); + this->newVariable(Names::f8,DataTypesId::Numeric); + this->newVariable(Names::fs8,DataTypesId::Numeric); + this->newVariable(Names::gb8,DataTypesId::Numeric); + this->newVariable(Names::g8,DataTypesId::Numeric); + this->newVariable(Names::gs8,DataTypesId::Numeric); + this->newVariable(Names::ab8,DataTypesId::Numeric); + this->newVariable(Names::a8,DataTypesId::Numeric); + this->newVariable(Names::as8,DataTypesId::Numeric); + this->newVariable(Names::bb8,DataTypesId::Numeric); + this->newVariable(Names::b8,DataTypesId::Numeric); + + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::c0,new NumberLiteralValue(16.351)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::cs0,new NumberLiteralValue(17.324)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::db0,new NumberLiteralValue(17.324)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::d0,new NumberLiteralValue(18.354)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::ds0,new NumberLiteralValue(19.445)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::eb0,new NumberLiteralValue(19.445)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::e0,new NumberLiteralValue(20.601)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::f0,new NumberLiteralValue(21.827)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::fs0,new NumberLiteralValue(23.124)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::gb0,new NumberLiteralValue(23.124)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::g0,new NumberLiteralValue(24.499)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::gs0,new NumberLiteralValue(25.956)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::ab0,new NumberLiteralValue(25.956)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::a0,new NumberLiteralValue(27.5)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::as0,new NumberLiteralValue(29.135)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::bb0,new NumberLiteralValue(29.135)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::b0,new NumberLiteralValue(30.868)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::c1,new NumberLiteralValue(32.703)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::cs1,new NumberLiteralValue(34.648)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::db1,new NumberLiteralValue(34.648)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::d1,new NumberLiteralValue(36.708)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::ds1,new NumberLiteralValue(38.891)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::eb1,new NumberLiteralValue(38.891)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::e1,new NumberLiteralValue(41.203)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::f1,new NumberLiteralValue(43.654)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::fs1,new NumberLiteralValue(46.249)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::gb1,new NumberLiteralValue(46.249)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::g1,new NumberLiteralValue(48.999)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::gs1,new NumberLiteralValue(51.913)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::ab1,new NumberLiteralValue(51.913)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::a1,new NumberLiteralValue(55)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::as1,new NumberLiteralValue(58.27)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::bb1,new NumberLiteralValue(58.27)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::b1,new NumberLiteralValue(61.735)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::c2,new NumberLiteralValue(65.406)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::cs2,new NumberLiteralValue(69.296)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::db2,new NumberLiteralValue(69.296)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::d2,new NumberLiteralValue(73.416)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::ds2,new NumberLiteralValue(77.782)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::eb2,new NumberLiteralValue(77.782)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::e2,new NumberLiteralValue(82.407)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::f2,new NumberLiteralValue(87.307)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::fs2,new NumberLiteralValue(92.499)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::gb2,new NumberLiteralValue(92.499)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::g2,new NumberLiteralValue(97.999)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::gs2,new NumberLiteralValue(103.826)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::ab2,new NumberLiteralValue(103.826)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::a2,new NumberLiteralValue(110)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::as2,new NumberLiteralValue(116.541)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::bb2,new NumberLiteralValue(116.541)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::b2,new NumberLiteralValue(123.471)); _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::c3,new NumberLiteralValue(130.813)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::cs3,new NumberLiteralValue(138.591)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::db3,new NumberLiteralValue(138.591)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::d3,new NumberLiteralValue(146.832)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::ds3,new NumberLiteralValue(155.563)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::eb3,new NumberLiteralValue(155.563)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::e3,new NumberLiteralValue(164.814)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::f3,new NumberLiteralValue(174.614)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::fs3,new NumberLiteralValue(184.997)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::gb3,new NumberLiteralValue(184.997)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::g3,new NumberLiteralValue(195.998)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::gs3,new NumberLiteralValue(207.652)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::ab3,new NumberLiteralValue(207.652)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::a3,new NumberLiteralValue(220)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::as3,new NumberLiteralValue(233.082)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::bb3,new NumberLiteralValue(233.082)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::b3,new NumberLiteralValue(246.942)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::c4,new NumberLiteralValue(261.626)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::cs4,new NumberLiteralValue(277.183)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::db4,new NumberLiteralValue(277.183)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::d4,new NumberLiteralValue(293.665)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::ds4,new NumberLiteralValue(311.127)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::eb4,new NumberLiteralValue(311.127)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::e4,new NumberLiteralValue(329.628)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::f4,new NumberLiteralValue(349.228)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::fs4,new NumberLiteralValue(369.994)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::gb4,new NumberLiteralValue(369.994)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::g4,new NumberLiteralValue(391.995)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::gs4,new NumberLiteralValue(415.305)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::ab4,new NumberLiteralValue(415.305)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::a4,new NumberLiteralValue(440)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::as4,new NumberLiteralValue(466.164)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::bb4,new NumberLiteralValue(466.164)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::b4,new NumberLiteralValue(493.883)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::c5,new NumberLiteralValue(523.251)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::cs5,new NumberLiteralValue(554.365)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::db5,new NumberLiteralValue(554.365)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::d5,new NumberLiteralValue(587.33)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::ds5,new NumberLiteralValue(622.254)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::eb5,new NumberLiteralValue(622.254)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::e5,new NumberLiteralValue(659.255)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::f5,new NumberLiteralValue(698.456)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::fs5,new NumberLiteralValue(739.989)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::gb5,new NumberLiteralValue(739.989)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::g5,new NumberLiteralValue(783.991)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::gs5,new NumberLiteralValue(830.609)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::ab5,new NumberLiteralValue(830.609)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::a5,new NumberLiteralValue(880)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::as5,new NumberLiteralValue(932.328)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::bb5,new NumberLiteralValue(932.328)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::b5,new NumberLiteralValue(987.767)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::c6,new NumberLiteralValue(1046.502)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::cs6,new NumberLiteralValue(1108.731)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::db6,new NumberLiteralValue(1108.731)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::d6,new NumberLiteralValue(1174.659)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::ds6,new NumberLiteralValue(1244.508)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::eb6,new NumberLiteralValue(1244.508)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::e6,new NumberLiteralValue(1318.51)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::f6,new NumberLiteralValue(1396.913)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::fs6,new NumberLiteralValue(1479.978)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::gb6,new NumberLiteralValue(1479.978)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::g6,new NumberLiteralValue(1567.982)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::gs6,new NumberLiteralValue(1661.219)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::ab6,new NumberLiteralValue(1661.219)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::a6,new NumberLiteralValue(1760)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::as6,new NumberLiteralValue(1864.655)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::bb6,new NumberLiteralValue(1864.655)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::b6,new NumberLiteralValue(1975.533)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::c7,new NumberLiteralValue(2093.005)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::cs7,new NumberLiteralValue(2217.461)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::db7,new NumberLiteralValue(2217.461)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::d7,new NumberLiteralValue(2349.318)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::ds7,new NumberLiteralValue(2489.016)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::eb7,new NumberLiteralValue(2489.016)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::e7,new NumberLiteralValue(2637.021)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::f7,new NumberLiteralValue(2793.826)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::fs7,new NumberLiteralValue(2959.955)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::gb7,new NumberLiteralValue(2959.955)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::g7,new NumberLiteralValue(3135.964)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::gs7,new NumberLiteralValue(3322.438)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::ab7,new NumberLiteralValue(3322.438)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::a7,new NumberLiteralValue(3520)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::as7,new NumberLiteralValue(3729.31)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::bb7,new NumberLiteralValue(3729.31)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::b7,new NumberLiteralValue(3951.066)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::c8,new NumberLiteralValue(4186.009)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::cs8,new NumberLiteralValue(4434.922)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::db8,new NumberLiteralValue(4434.922)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::d8,new NumberLiteralValue(4698.636)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::ds8,new NumberLiteralValue(4978.032)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::eb8,new NumberLiteralValue(4978.032)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::e8,new NumberLiteralValue(5274.042)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::f8,new NumberLiteralValue(5587.652)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::fs8,new NumberLiteralValue(5919.91)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::gb8,new NumberLiteralValue(5919.91)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::g8,new NumberLiteralValue(6271.928)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::gs8,new NumberLiteralValue(6644.876)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::ab8,new NumberLiteralValue(6644.876)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::a8,new NumberLiteralValue(7040)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::as8,new NumberLiteralValue(7458.62)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::bb8,new NumberLiteralValue(7458.62)); + _scopes.find(GLOBAL_SCOPE)->second.setVariableValue(Names::b8,new NumberLiteralValue(7902.132)); BaseFunction* func = new BaseFunction(); func->load({{DataTypesId::String,"fileName"}},&Functions::sample); diff --git a/src/interpreter/languagedefinitions.h b/src/interpreter/languagedefinitions.h index 672d399..3534fa1 100644 --- a/src/interpreter/languagedefinitions.h +++ b/src/interpreter/languagedefinitions.h @@ -10,41 +10,159 @@ namespace CS { */ namespace Names { -const std::string c1 = "N_C1"; -const std::string d1 = "N_D1"; -const std::string e1 = "N_E1"; -const std::string f1 = "N_F1"; -const std::string g1 = "N_G1"; -const std::string a1 = "N_A1"; -const std::string b1 = "N_B1"; -const std::string c2 = "N_C2"; -const std::string d2 = "N_D2"; -const std::string e2 = "N_E2"; -const std::string f2 = "N_F2"; -const std::string g2 = "N_G2"; -const std::string a2 = "N_A2"; -const std::string b2 = "N_B2"; -const std::string c3 = "N_C3"; -const std::string d3 = "N_D3"; -const std::string e3 = "N_E3"; -const std::string f3 = "N_F3"; -const std::string g3 = "N_G3"; -const std::string a3 = "N_A3"; -const std::string b3 = "N_B3"; -const std::string c4 = "N_C4"; -const std::string d4 = "N_D4"; -const std::string e4 = "N_E4"; -const std::string f4 = "N_F4"; -const std::string g4 = "N_G4"; -const std::string a4 = "N_A4"; -const std::string b4 = "N_B4"; -const std::string c5 = "N_C5"; -const std::string d5 = "N_D5"; -const std::string e5 = "N_E5"; -const std::string f5 = "N_F5"; -const std::string g5 = "N_G5"; -const std::string a5 = "N_A5"; -const std::string b5 = "N_B5"; +const std::string c0 = "C0"; +const std::string cs0 = "Cs0"; +const std::string db0 = "Db0"; +const std::string d0 = "D0"; +const std::string ds0 = "Ds0"; +const std::string eb0 = "Eb0"; +const std::string e0 = "E0"; +const std::string f0 = "F0"; +const std::string fs0 = "Fs0"; +const std::string gb0 = "Gb0"; +const std::string g0 = "G0"; +const std::string gs0 = "Gs0"; +const std::string ab0 = "Ab0"; +const std::string a0 = "A0"; +const std::string as0 = "As0"; +const std::string bb0 = "Bb0"; +const std::string b0 = "B0"; +const std::string c1 = "C1"; +const std::string cs1 = "Cs1"; +const std::string db1 = "Db1"; +const std::string d1 = "D1"; +const std::string ds1 = "Ds1"; +const std::string eb1 = "Eb1"; +const std::string e1 = "E1"; +const std::string f1 = "F1"; +const std::string fs1 = "Fs1"; +const std::string gb1 = "Gb1"; +const std::string g1 = "G1"; +const std::string gs1 = "Gs1"; +const std::string ab1 = "Ab1"; +const std::string a1 = "A1"; +const std::string as1 = "As1"; +const std::string bb1 = "Bb1"; +const std::string b1 = "B1"; +const std::string c2 = "C2"; +const std::string cs2 = "Cs2"; +const std::string db2 = "Db2"; +const std::string d2 = "D2"; +const std::string ds2 = "Ds2"; +const std::string eb2 = "Eb2"; +const std::string e2 = "E2"; +const std::string f2 = "F2"; +const std::string fs2 = "Fs2"; +const std::string gb2 = "Gb2"; +const std::string g2 = "G2"; +const std::string gs2 = "Gs2"; +const std::string ab2 = "Ab2"; +const std::string a2 = "A2"; +const std::string as2 = "As2"; +const std::string bb2 = "Bb2"; +const std::string b2 = "B2"; +const std::string c3 = "C3"; +const std::string cs3 = "Cs3"; +const std::string db3 = "Db3"; +const std::string d3 = "D3"; +const std::string ds3 = "Ds3"; +const std::string eb3 = "Eb3"; +const std::string e3 = "E3"; +const std::string f3 = "F3"; +const std::string fs3 = "Fs3"; +const std::string gb3 = "Gb3"; +const std::string g3 = "G3"; +const std::string gs3 = "Gs3"; +const std::string ab3 = "Ab3"; +const std::string a3 = "A3"; +const std::string as3 = "As3"; +const std::string bb3 = "Bb3"; +const std::string b3 = "B3"; +const std::string c4 = "C4"; +const std::string cs4 = "Cs4"; +const std::string db4 = "Db4"; +const std::string d4 = "D4"; +const std::string ds4 = "Ds4"; +const std::string eb4 = "Eb4"; +const std::string e4 = "E4"; +const std::string f4 = "F4"; +const std::string fs4 = "Fs4"; +const std::string gb4 = "Gb4"; +const std::string g4 = "G4"; +const std::string gs4 = "Gs4"; +const std::string ab4 = "Ab4"; +const std::string a4 = "A4"; +const std::string as4 = "As4"; +const std::string bb4 = "Bb4"; +const std::string b4 = "B4"; +const std::string c5 = "C5"; +const std::string cs5 = "Cs5"; +const std::string db5 = "Db5"; +const std::string d5 = "D5"; +const std::string ds5 = "Ds5"; +const std::string eb5 = "Eb5"; +const std::string e5 = "E5"; +const std::string f5 = "F5"; +const std::string fs5 = "Fs5"; +const std::string gb5 = "Gb5"; +const std::string g5 = "G5"; +const std::string gs5 = "Gs5"; +const std::string ab5 = "Ab5"; +const std::string a5 = "A5"; +const std::string as5 = "As5"; +const std::string bb5 = "Bb5"; +const std::string b5 = "B5"; +const std::string c6 = "C6"; +const std::string cs6 = "Cs6"; +const std::string db6 = "Db6"; +const std::string d6 = "D6"; +const std::string ds6 = "Ds6"; +const std::string eb6 = "Eb6"; +const std::string e6 = "E6"; +const std::string f6 = "F6"; +const std::string fs6 = "Fs6"; +const std::string gb6 = "Gb6"; +const std::string g6 = "G6"; +const std::string gs6 = "Gs6"; +const std::string ab6 = "Ab6"; +const std::string a6 = "A6"; +const std::string as6 = "As6"; +const std::string bb6 = "Bb6"; +const std::string b6 = "B6"; +const std::string c7 = "C7"; +const std::string cs7 = "Cs7"; +const std::string db7 = "Db7"; +const std::string d7 = "D7"; +const std::string ds7 = "Ds7"; +const std::string eb7 = "Eb7"; +const std::string e7 = "E7"; +const std::string f7 = "F7"; +const std::string fs7 = "Fs7"; +const std::string gb7 = "Gb7"; +const std::string g7 = "G7"; +const std::string gs7 = "Gs7"; +const std::string ab7 = "Ab7"; +const std::string a7 = "A7"; +const std::string as7 = "As7"; +const std::string bb7 = "Bb7"; +const std::string b7 = "B7"; +const std::string c8 = "C8"; +const std::string cs8 = "Cs8"; +const std::string db8 = "Db8"; +const std::string d8 = "D8"; +const std::string ds8 = "Ds8"; +const std::string eb8 = "Eb8"; +const std::string e8 = "E8"; +const std::string f8 = "F8"; +const std::string fs8 = "Fs8"; +const std::string gb8 = "Gb8"; +const std::string g8 = "G8"; +const std::string gs8 = "Gs8"; +const std::string ab8 = "Ab8"; +const std::string a8 = "A8"; +const std::string as8 = "As8"; +const std::string bb8 = "Bb8"; +const std::string b8 = "B8"; const std::string sinSound = "S_SIN"; const std::string squareSound = "S_SQUARE";