hi! is someone one this coffeecollider-users list?
well i spent the end of last year
trying to figure out how to keep the instrument-page.html clean
by calling the external.coffee files from episode.js
things getting imported by and to the episode.html are:
coffee-script.js, coffee-collider.js <- as the base of coffeecollidings
and
episode.js <- functions that will twist the attributes that a SynthDef in the external.coffee carries
i also have:
<div id="coffee" data-cc="./coffee/noiz/
2014010204.coffee">
<img id="nip01" onClick="zero_thang()" src="../oil/pngs/dotb.png" />
<img id="nip02" onClick="two_thang()" src="../oil/pngs/dotb.png" />
<img id="nip03" onClick="three_thang()" src="../oil/pngs/dotb.png" />
<img id="nip04" onClick="four_thang()" src="../oil/pngs/dotb.png" />
<img id="nip05" onClick="five_thang()" src="../oil/pngs/dotb.png" />
<img id="nip06" onClick="six_thang()" src="../oil/pngs/dotb.png" />
<img id="nip07" onClick="seven_thang()" src="../oil/pngs/dotb.png" />
</div>
in the episode.html
so that the episode.js can call the external.coffee this way:
cc.play().load(document.getElementById("coffee").getAttributeNode("data-cc").value, function(code){
cc.run(code);
});
this is the core of "how not to livecode coffeecollider but build browser instruments with it"
the latest episode of my podcast:
http://sarigama.namaste.jp/nipples/2014010204.html
is also an example of my early .coffee codings
so for more info .. just peek into the src uploaded for the page
happy coffeecollidings!
--
'2+
http://sarigama.namaste.jp/