restart
plucked
midi
fugue
1
2
3
4
5
6
// changed at Wed Nov 20 2013 23:25:38 GMT-0600 (CST) by Dan  
this.addScript(function tracksRemove(trk) {
    if (!this.activeTracks) this.activeTracks = [];
    var ix = this.activeTracks.indexOf(trk);
    if (ix >= 0) this.activeTracks.splice(ix,1);
}).tag([]);
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
patchMenuItems
pianoKeyDown
pianoKeyUp
playerProcessStep
playerStart
playerStop
playSound
reset
resumePlaying
setPatch
tracksAdd
tracksRemove
yetToDo

Scripts
-- ALL --




Connections
+
+
-
-
<lively.morphic.Box#0AD05... - PianoKeyboard>
Tag:
all
run
save
Tests

ObjectEditor
X

Menu

this TrackMorph

aboutMe aboutMe

addMorph addMorph

cachedBounds Rectangle

cursor Box16

derivationIds [...]

distanceToDragEvent Point

droppingEnabled true

eventHandler EventHandler

halos []

halosEnabled true

id B711AA5E-6C64-49A1-928B-67C3EAE8...

isBeingDragged false

loopIndex 318

loopSize 436

moved true

nBeats 4

name TrackMorph

owner Rectangle

partTests {}

partsBinMetaInfo PartsBinMetaInfo

playing true

registeredForMouseEvents true

resetLoop resetLoop

scripts []

shape Rectangle

showsHalos false

stepOnPlayer stepOnPlayer

submorphs [...]

test test

togglePlaying togglePlaying

track [...]

trackIndex null

yetToDo yetToDo

inherited from lively.morphic.Box.prototype
Filter:
this.track,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,<lively.morphic.Morph#EC37C... - Ellipse4>,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Bind 'this' to selection
lively.morphic.Box Inspector
X

Menu
Workspace
X

Menu
var player = $morph('PianoKeyboard');
var patch = player.patchSound;
var sound = patch.copy().setPitchDurLoudness(440, 10, 0.5);
player.playSound(sound);
Things I've changed: 
    playerStart step by 10 ms
drop
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Track Editor
X

Menu

this Ellipse4

cachedBounds Rectangle

derivationIds [...]

droppingEnabled true

eventHandler EventHandler

halos []

halosEnabled true

id 354CC37A-E1DF-4DB1-9212-4A26108A...

isBeingDragged false

layout {}

name Ellipse4

owner TrackMorph

partsBinMetaInfo PartsBinMetaInfo

scripts []

shape Ellipse

showsHalos false

sound PluckedSound

submorphs []

inherited from lively.morphic.Morph.prototype
Filter:
a lively.Sound.PluckedSound
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Bind 'this' to selection
lively.morphic.Morph Inspector
X

Menu

this TrackMorph

aboutMe aboutMe

addMorph addMorph

cachedBounds Rectangle

cursor Box16

derivationIds [...]

distanceToDragEvent Point

droppingEnabled true

eventHandler EventHandler

halos []

halosEnabled true

id B711AA5E-6C64-49A1-928B-67C3EAE8...

isBeingDragged false

loopIndex 71

loopSize 436

moved true

nBeats 4

name TrackMorph

owner Rectangle

partTests {}

partsBinMetaInfo PartsBinMetaInfo

playing true

registeredForMouseEvents true

resetLoop resetLoop

scripts []

shape Rectangle

showsHalos false

stepOnPlayer stepOnPlayer

submorphs [...]

test test

togglePlaying togglePlaying

track [...]

0..99

100..199

200..299

300..399

400..435

inherited from Array.prototype

trackIndex null

yetToDo yetToDo

inherited from lively.morphic.Box.prototype
Filter:
this.track,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Bind 'this' to selection
lively.morphic.Box Inspector
X

Menu
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// changed at Thu Nov 21 2013 01:02:20 GMT-0600 (CST) by Dan  
this.addScript(function resetLoop() { // this.resetLoop()
    // this.loopIndex
    this.removeAllMorphs();
    this.nBeats = 4;
    this.loopIndex = 0;
    this.loopSize = Math.floor((this.nBeats/55)*60*100);  // roughly 55 bpm 
at 10ms
    this.track = new Array(this.loopSize);
    var beatLine = lively.morphic.Morph.makeRectangle(this.innerBounds
().withWidth(1));
    beatLine.applyStyle({borderWidth: 0, fill: Color.gray});
    for (var i=0; i<4*this.nBeats; i++) {
        var beat = this.addMorph(beatLine.copy());
        beat.setPosition(pt((i/(4*this.nBeats))*this.innerBounds().width, 0
));
        if (i%4 == 0) beat.setFill(Color.black);
    }
    this.cursor = this.addMorph(beatLine.copy());
    this.cursor.setFill(Color.red);
}).tag([]);
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
-- ALL --
aboutMe
addMorph
resetLoop
stepOnPlayer
test
togglePlaying
yetToDo
Scripts
-- ALL --




Connections
+
+
-
-
<lively.morphic.Box#B711A... - TrackMorph>
Tag:
all
run
save
Tests

ObjectEditor
X

Menu
on