fluid-tech IRC Logs-2013-07-19

fluid-tech IRC Logs-2013-07-19

[09:43:06 CDT(-0500)] <nanook_> hey colinclark

[09:43:17 CDT(-0500)] <colinclark> hey, how's it going?

[09:43:49 CDT(-0500)] <nanook_> good. working on that synth-controller API.

[09:44:01 CDT(-0500)] <nanook_> are you free to talk now?

[09:44:18 CDT(-0500)] <nanook_> or anytime today?

[09:45:18 CDT(-0500)] <colinclark> Now's good, yes

[09:45:25 CDT(-0500)] <colinclark> It might be easier for me to type, though

[09:45:31 CDT(-0500)] <colinclark> if that isn't a huge inconvenience

[09:45:43 CDT(-0500)] <colinclark> is that ok with you

[09:45:43 CDT(-0500)] <colinclark> ?

[09:45:46 CDT(-0500)] <nanook_> sure.. typing is better for me too

[09:45:49 CDT(-0500)] <colinclark> great

[09:45:50 CDT(-0500)] <colinclark> fire away!

[09:46:20 CDT(-0500)] <nanook_> cool. let me just show you what i've been doing

[09:47:36 CDT(-0500)] <nanook_> colinclark: http://204.236.239.107/flocking-playground/

[09:47:51 CDT(-0500)] <nanook_> icons, gradients, shadows etc will come soon

[09:48:20 CDT(-0500)] <colinclark> ooh, looks great

[09:48:30 CDT(-0500)] <nanook_> haha.. i don't think so

[09:48:54 CDT(-0500)] <nanook_> there's still a couple of small bugs i need to fix

[09:49:08 CDT(-0500)] <nanook_> https://github.com/roshanvid/flocking-playground/blob/master/js/codewindow.js

[09:49:13 CDT(-0500)] <nanook_> that's the code window component

[09:50:45 CDT(-0500)] <nanook_> anyway, i've got a bunch of ideas for the synth-controller API. tell me what i'm doing is not crazy

[09:50:57 CDT(-0500)] <nanook_> if*

[09:53:25 CDT(-0500)] <nanook_> colinclark: this is what writing controllers could look like: https://github.com/roshanvid/flocking-playground/blob/master/js/controllers.js

[09:54:13 CDT(-0500)] <colinclark> i'll look

[09:54:57 CDT(-0500)] <colinclark> nice use of an autoInit Infusion component with the code window

[09:55:06 CDT(-0500)] <nanook_> each component implements a bind method. I haven't pushed that stuff yet.

[09:56:06 CDT(-0500)] <colinclark> I think most of this kind of logic can be done declaratively now: https://github.com/roshanvid/flocking-playground/blob/master/js/codewindow.js#L68-L102

[09:56:25 CDT(-0500)] <colinclark> I'm a bit "behind the times" as Bosmon would say, but I think yzen could probably point you to an example

[09:56:30 CDT(-0500)] <nanook_> colinclark: yup! i heard about it from Bosmon

[09:56:38 CDT(-0500)] <colinclark> ah, great

[09:56:56 CDT(-0500)] <colinclark> just having a look at the controllers now

[09:57:22 CDT(-0500)] <nanook_> just glance through it.. I'm still working on it

[10:00:35 CDT(-0500)] <colinclark> As a sketch, it looks really good

[10:00:40 CDT(-0500)] <colinclark> you've got nice clear models for each of the components

[10:01:16 CDT(-0500)] <colinclark> "viewComponent" should be "fluid.viewComponent," I think

[10:01:29 CDT(-0500)] <nanook_> colinclark: ahh.. yes

[10:01:36 CDT(-0500)] <colinclark> I think for things like width and height, it would be great to allow those sorts of things to be settable using CSS

[10:01:45 CDT(-0500)] <nanook_> I haven't pushed recent code i've been working on

[10:01:47 CDT(-0500)] <colinclark> and if you want to provide a "quick and easy" way, too, that seems fine

[10:02:14 CDT(-0500)] <colinclark> But I think one of the places where we can really show how we're different is if we make really flexible components that take advantage of responsive design and CSS and the like

[10:02:23 CDT(-0500)] <colinclark> one thing at a time, of course

[10:02:58 CDT(-0500)] <nanook_> true. what I thought was - we could have some sensible defaults, which users could override if they wanted

[10:04:11 CDT(-0500)] <nanook_> like if they wanted a really large piano component, they could add it into the model obj.

[10:05:04 CDT(-0500)] <nanook_> so this is how i've thought about implementing the whole thing -

[10:05:20 CDT(-0500)] <nanook_> There's 2 parts - playground.controllers and playground.connections

[10:06:10 CDT(-0500)] <nanook_> So anybody wanting to write a controller would use the playground.controller grade, implement a bind method etc

[10:07:11 CDT(-0500)] <nanook_> connections might look more like this: https://gist.github.com/roshanvid/c70ba825f29568ca1cd9

[10:08:41 CDT(-0500)] <nanook_> each connection plugs a synth input to a controller variable

[10:09:13 CDT(-0500)] <colinclark> ah, interesting

[10:09:19 CDT(-0500)] <colinclark> this looks great

[10:10:07 CDT(-0500)] <colinclark> So I guess, in practice, a "connection" would serve as a rely between ChangeApplier events in the controllers and set() calls to change the parameters of a synth's inputs, right?

[10:10:31 CDT(-0500)] <nanook_> so one would use it like so: playground.connection({

[10:10:32 CDT(-0500)] <nanook_> synth: "synth1"

[10:10:32 CDT(-0500)] <nanook_> path: "carrier.freq"

[10:10:32 CDT(-0500)] <nanook_> controller: "slider1"

[10:10:32 CDT(-0500)] <nanook_> })

[10:10:41 CDT(-0500)] <colinclark> right

[10:10:51 CDT(-0500)] <colinclark> that seems very cool

[10:11:15 CDT(-0500)] <colinclark> Eventually Flocking will embrace a ChangeApplier-style, and these connections might not even be necessary

[10:11:19 CDT(-0500)] <colinclark> but definitely not within the next month or so

[10:11:21 CDT(-0500)] <nanook_> yup!

[10:11:26 CDT(-0500)] <colinclark> this is great

[10:11:35 CDT(-0500)] <colinclark> I think you're on the right track!

[10:11:42 CDT(-0500)] <nanook_> great! thanks

[10:12:08 CDT(-0500)] <nanook_> So i've been thinking about a way to make connections graphically as well as in code

[10:12:15 CDT(-0500)] <colinclark> I was just going to say!

[10:12:18 CDT(-0500)] <nanook_> It might just be possible with this

[10:12:23 CDT(-0500)] <colinclark> it looks like your approach is very amenable to exactly that

[10:12:34 CDT(-0500)] <colinclark> since the graphical tool would simply have to create the JSON for the connections

[10:12:40 CDT(-0500)] <colinclark> as the user connects stuff up

[10:12:46 CDT(-0500)] <nanook_> exactly

[10:13:55 CDT(-0500)] <nanook_> i could render the synthDef object in divs and let the user drag a controller onto it

[10:16:02 CDT(-0500)] <nanook_> (for assignment)

[10:18:06 CDT(-0500)] <colinclark> yup

[10:19:17 CDT(-0500)] <nanook_> colinclark: another thing: I'm thinking about using the layout reorderer for the the third pane

[10:19:25 CDT(-0500)] <colinclark> ah, that seems reasonable

[10:19:45 CDT(-0500)] <nanook_> except.. the demo doesn't work very well on the iPad now

[10:20:23 CDT(-0500)] <nanook_> I think I need to handle the touch events in a better way

[10:21:06 CDT(-0500)] <nanook_> colinclark: any changes you think I should make?

[10:22:09 CDT(-0500)] <colinclark> ah, yes

[10:22:29 CDT(-0500)] <colinclark> most of the Infusion components aren't very touch-friendly at the moment, which pains

[10:22:30 CDT(-0500)] <colinclark> me

[10:22:46 CDT(-0500)] <colinclark> It might be fairly straightforward to add touch events to it, though

[10:23:00 CDT(-0500)] <colinclark> I'm pretty sure Bosmon would be willing to lend a hand with that effort, since he is deeply familiar with the code base

[10:23:34 CDT(-0500)] <nanook_> Ahh.. cool. I'll talk to him if I need anything

[10:23:59 CDT(-0500)] <nanook_> colinclark: any other changes to the API?

[10:24:21 CDT(-0500)] <colinclark> I'm just looking

[10:24:40 CDT(-0500)] <nanook_> let me know if you think there's a better way to do it.

[10:24:51 CDT(-0500)] <nanook_> I think it'll be easier for you to say if I show you some code

[10:27:04 CDT(-0500)] <nanook_> give me a couple of days to add in the details

[10:28:59 CDT(-0500)] <colinclark> yeah, i'd love to see more code

[10:29:04 CDT(-0500)] <colinclark> I think this looks really good so far

[10:29:22 CDT(-0500)] <nanook_> cool!