Coder Social home page Coder Social logo

Comments (3)

chriskiefer avatar chriskiefer commented on September 27, 2024

yes, looks like a scope issue

DEBUG:treeToCode
logger.js:60 () => {let q=this.newq(); 
							q.b0u41 = () => {
								let lq = {};
								 lq.b0u40On = this.createMIDISender(0x90);lq.b0u40Off = this.createMIDISender(0x80);;
								return (t, mem) => {
									return 
		lq.b0u40On.play(t, 1, 9, 43, this.MIDIUmap(127), this.getCurrentTime());
		lq.b0u40Off.play(1.0 -t, 1, 9, 43, 0, this.getCurrentTime())
		
								}
							}
						 q.b0u42 = new Module.maxiOsc();
                      q.b0u42.phaseReset(0);;; return q;}
logger.js:60 (q, inputs, mem) => {(mem[0] = q.b0u41);(
								((
									(() => {
										if (q.b0u43 == undefined) {
											q.b0u43 = (mem[0] != undefined ? mem[0] : 0)();
										}
										return q.b0u43(q.b0u42.square(1), mem);
									})
									()
								))
								)
							;}
logger.js:70 
brute:(t:@{t:, 1, 9, 43, 127}moNote);
{{1}sqr}brute:;

from sema.

chriskiefer avatar chriskiefer commented on September 27, 2024

{}MIDIInfo;
brute:(t:@{{t:,1,9,43,127}moNote}poll);
{{1}imp}brute:;

//{{1}sqr, 1, 9, 43, 127}moNote;

this works only when the poll is in place, which must force the function to get evaluated

	((()=>{
		${o}On.play(${p[0].loop}, ${p[1].loop}, ${p[2].loop}, ${p[3].loop}, this.MIDIUmap(${p[4].loop}), this.getCurrentTime());
		${o}Off.play(1.0 -${p[0].loop}, ${p[1].loop}, ${p[2].loop}, ${p[3].loop}, 0, this.getCurrentTime());
		return ${p[0].loop};
	})())

so, some sort of explicit evaluation is needed = apply or call?

from sema.

chriskiefer avatar chriskiefer commented on September 27, 2024

solved - issue was a newline at start of loop definition. when put after return, the closure returned undefined

from sema.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.