Prototyping 16 April 2013: Difference between revisions

From XPUB & Lens-Based wiki
No edit summary
No edit summary
Line 18: Line 18:


[http://www.audioh.com/projects/triphonic.html Tri-phonic record player]
[http://www.audioh.com/projects/triphonic.html Tri-phonic record player]
== Audio tag ==
So what's the "materiality" of digital audio in the browser?
[[Audio (HTML tag)]]
== A Script (Performance) ==
=== The Audio Tag ===
When asked to "load":
    Say: "loaded" and then a few seconds later "durationchange"
When asked your "currentTime":
    Report the number you're standing closest to.
When asked to set your "currentTime":
    Move to the number requested
When asked to "play":
    start moving towards higher numbers
When moving and you cross a new number:
    Say: "timeupdate"
=== Callback 1 ===
When AUDIO says "durationchange":
    Tell AUDIO: "Set currentTime to 60" and then (after a few seconds) "play"
=== Callback 2 ===
When AUDIO says "timeupdate":
    Ask AUDIO: What is your "currentTime"
    If it's response is 63 or bigger:
        Tell AUDIO: "pause"
=== Javascript ===
Javascript version of the above.
<source lang="javascript">
$(audio).bind("durationchange", function () {
    audio.currentTime = 60;
    audio.play();
}).bind("timeupdate", function () {
    if (audio.currentTime >= 63) {
        audio.pause();
    }
});
</source>

Revision as of 10:21, 16 April 2013

t a p e s and javascript

a range of interpretations of cassettes from nostaligic recreation and high tech over-determined design, through to contemporary music practices with tapes and turntables. What is the materiality of digital audio?

http://www.schillmania.com/projects/soundmanager2/demo/cassette-tape/

news_louvre_2.jpg

Andrew Prior: https://soundcloud.com/geckohooks/tapeoperations

HavblikAudio: http://www.myspace.com/havblikaudio/photos/albums/berlin/846774

Janek Schaefer

http://vimeo.com/23554437

http://vimeo.com/23556662

Tri-phonic record player

Audio tag

So what's the "materiality" of digital audio in the browser?

Audio (HTML tag)

A Script (Performance)

The Audio Tag

When asked to "load":
    Say: "loaded" and then a few seconds later "durationchange"
When asked your "currentTime":
   Report the number you're standing closest to.
When asked to set your "currentTime":
   Move to the number requested
When asked to "play":
    start moving towards higher numbers
When moving and you cross a new number:
    Say: "timeupdate"

Callback 1

When AUDIO says "durationchange":
    Tell AUDIO: "Set currentTime to 60" and then (after a few seconds) "play"

Callback 2

When AUDIO says "timeupdate":
    Ask AUDIO: What is your "currentTime"
    If it's response is 63 or bigger:
        Tell AUDIO: "pause"

Javascript

Javascript version of the above.

$(audio).bind("durationchange", function () {
    audio.currentTime = 60;
    audio.play();
}).bind("timeupdate", function () {
    if (audio.currentTime >= 63) {
        audio.pause();
    }
});