-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintcache
1 lines (1 loc) · 6.84 KB
/
.eslintcache
1
[{"/home/kishan/code/web_developement/front_end/codetunes/src/SourceCode.js":"1","/home/kishan/code/web_developement/front_end/codetunes/src/App.js":"2","/home/kishan/code/web_developement/front_end/codetunes/src/Play.js":"3","/home/kishan/code/web_developement/front_end/codetunes/src/Piano.js":"4","/home/kishan/code/web_developement/front_end/codetunes/src/Guitar.js":"5","/home/kishan/code/web_developement/front_end/codetunes/src/CodeTunes.js":"6","/home/kishan/code/web_developement/front_end/codetunes/src/Example.js":"7","/home/kishan/code/web_developement/front_end/codetunes/src/index.js":"8","/home/kishan/code/web_developement/front_end/codetunes/src/reportWebVitals.js":"9","/home/kishan/code/web_developement/front_end/codetunes/src/Program.js":"10"},{"size":5813,"mtime":1613472669782,"results":"11","hashOfConfig":"12"},{"size":452,"mtime":1612782358188,"results":"13","hashOfConfig":"12"},{"size":3795,"mtime":1613383882250,"results":"14","hashOfConfig":"12"},{"size":1870,"mtime":1612644336834,"results":"15","hashOfConfig":"12"},{"size":4702,"mtime":1612645018820,"results":"16","hashOfConfig":"12"},{"size":3100,"mtime":1613386472649,"results":"17","hashOfConfig":"12"},{"size":750,"mtime":1612353357566,"results":"18","hashOfConfig":"12"},{"size":500,"mtime":1612036269237,"results":"19","hashOfConfig":"12"},{"size":362,"mtime":1612034968786,"results":"20","hashOfConfig":"12"},{"size":2219,"mtime":1613472520650,"results":"21","hashOfConfig":"12"},{"filePath":"22","messages":"23","errorCount":0,"warningCount":3,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},"1usz296",{"filePath":"24","messages":"25","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"26","messages":"27","errorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"28","messages":"29","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"30"},{"filePath":"31","messages":"32","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"33","messages":"34","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"35","messages":"36","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"37","messages":"38","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"39","messages":"40","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"41","messages":"42","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/home/kishan/code/web_developement/front_end/codetunes/src/SourceCode.js",["43","44","45"],"/home/kishan/code/web_developement/front_end/codetunes/src/App.js",["46"],"/home/kishan/code/web_developement/front_end/codetunes/src/Play.js",["47","48"],"/home/kishan/code/web_developement/front_end/codetunes/src/Piano.js",["49"],"import {React, Component} from 'react'\n\nconst AudioContext = window.AudioContext || window.webkitAudioContext\n/* Frequency of Pinao keys in Hz */\nconst FrequencyBindings = [261.6, 392, 440, 523.3, 659.3, 739.99, \n 830.61, 1046.50, 1479.98, 1760.00, 2093.00, 2793.83]\n\nclass Piano extends Component {\n \n constructor(props) {\n super(props)\n this.playSound = false\n this.index = 0\n this.freqIndex = 0\n this.oscillatorWaveFromType = \"sine\"\n this.songFrequency = FrequencyBindings\n this.numFreqBands = this.songFrequency.length\n this.beatsPerMilliSecond = 1000 / 4\n this.timeChange = 0.4\n\n /* audio context manager for the getting oscillators */\n this.ctx = new AudioContext()\n \n this.createOscillator = this.createOscillator.bind(this)\n this.play = this.play.bind(this)\n }\n \n /* will create sound for the paritcular frequency for some constant time */\n createOscillator(freq, time) {\n let oscillator = this.ctx.createOscillator()\n let gainNode = this.ctx.createGain();\n oscillator.connect(gainNode);\n gainNode.connect(this.ctx.destination);\n \n oscillator.frequency.value = freq\n oscillator.type = this.oscillatorWaveFromType\n \n oscillator.start(time)\n gainNode.gain.exponentialRampToValueAtTime(0.001, time + this.timeChange)\n oscillator.stop(time + this.timeChange) \n }\n \n play(number) {\n /* logic to map given number to particular frequency */\n this.index = number\n this.index = this.index % this.numFreqBands\n let currFreq = this.songFrequency[this.index]\n let time = this.ctx.currentTime;\n this.createOscillator(currFreq, time)\n }\n}\n\nexport default Piano\n","/home/kishan/code/web_developement/front_end/codetunes/src/Guitar.js",[],"/home/kishan/code/web_developement/front_end/codetunes/src/CodeTunes.js",["50"],"/home/kishan/code/web_developement/front_end/codetunes/src/Example.js",[],"/home/kishan/code/web_developement/front_end/codetunes/src/index.js",[],"/home/kishan/code/web_developement/front_end/codetunes/src/reportWebVitals.js",[],"/home/kishan/code/web_developement/front_end/codetunes/src/Program.js",[],{"ruleId":"51","severity":1,"message":"52","line":4,"column":8,"nodeType":"53","messageId":"54","endLine":4,"endColumn":17},{"ruleId":"51","severity":1,"message":"55","line":5,"column":8,"nodeType":"53","messageId":"54","endLine":5,"endColumn":11},{"ruleId":"51","severity":1,"message":"56","line":6,"column":8,"nodeType":"53","messageId":"54","endLine":6,"endColumn":11},{"ruleId":"51","severity":1,"message":"57","line":4,"column":8,"nodeType":"53","messageId":"54","endLine":4,"endColumn":14},{"ruleId":"58","severity":1,"message":"59","line":23,"column":17,"nodeType":"53","messageId":"60","endLine":23,"endColumn":34},{"ruleId":"61","severity":1,"message":"62","line":99,"column":52,"nodeType":"63","messageId":"64","endLine":99,"endColumn":54},{"ruleId":"51","severity":1,"message":"65","line":1,"column":9,"nodeType":"53","messageId":"54","endLine":1,"endColumn":14},{"ruleId":"66","severity":1,"message":"67","line":35,"column":24,"nodeType":"68","endLine":35,"endColumn":39},"no-unused-vars","'Container' is defined but never used.","Identifier","unusedVar","'Row' is defined but never used.","'Col' is defined but never used.","'Guitar' is defined but never used.","no-redeclare","'source_code_lines' is already defined.","redeclared","array-callback-return","Array.prototype.map() expects a value to be returned at the end of arrow function.","ArrowFunctionExpression","expectedAtEnd","'React' is defined but never used.","react/jsx-no-target-blank","Using target=\"_blank\" without rel=\"noreferrer\" is a security risk: see https://html.spec.whatwg.org/multipage/links.html#link-type-noopener","JSXAttribute"]