Squeak Class Documentation category index | class index  
 
MovieClipStartMorph
  category: Morphic-Demo
  superclass: MovieFrameSyncMorph
  subclasses: MovieClipEndMorph

This class and its subclasses act to syncronize movie players with the progress of a MIDI score and further background can be found in the comment for MoviePlayerMorph.

MovieClipStartMorphs are used where you have a movie clip player plex. You can create such a plex by opening a midi score, spawning a piano roll (by the button of that name), and then choosing 'add movie clip player' from the piano roll menu. Much simpler, you can open a MoviePlayerMorph as a new morph, and then choose 'make a new movie' from its menu. This plex then serves as a central editable score for composing movie clips.

To add a new movie clip to the score, open a movie from the fileList (or as a new morph followed by 'open a movie'). Play or otherwise position the clip to the desired starting position, and then tear off a thumbnail and drop it into the score at the desired time. The starting thumbnail (MovieClipStartMorph) will appear in the score, tied to an endMorph by a colored stripe. The ending time will be chosen based on the total length of the clip, a default starting clip length (200 frames), and possible interference with other clips that follow it.

To reposition a clip, you can pick up its clipStart with halo black handle, and drop it elsewhere. The rest of the clip will follow as best it can. To delete a clip, delete its clipStart. To change the duration of a clip, play the composition up to some point in that clip, and pause it. Then use the controls on the central movie player to move forward or backward to the desired ending frame, and choose 'end clip here' from the player menu.

instance methods
  access
  endMorph
frameNumber:
movieClipPlayer:
relatedPlayer
scoreEvent

  drawing
  addMorphsTo:pianoRoll:eventTime:betweenTime:and:
colorMargin
colorMorph
delete
soundTrackHeight
soundTrackOnBottom
thumbnailHeight

  events
  encounteredAtTime:inScorePlayer:atIndex:inEventTrack:secsPerTick:
endTime
frameAtTick:
nextSyncEventAfter:inTrack:
resetFrom:
resumeFrom:
startTime

  initialization
  image:frameNumber:
justDroppedInto:event:
movieFileName:soundTrackFileName:image:player:frameNumber:

  private
  buildSoundTrackMorphFor:
setEndFrameNumber:
setEndFrameNumber:tickTime:
setTimeInScore:near:

class methods
  no messages
 

instance methods
  access top  
 

endMorph


 

frameNumber:


 

movieClipPlayer:

For now, these morphs work both as a sync point in a long movie, and
as a cue point for a short clip in a longer score.
To a cue point, this method provides a reference to the clip player.


 

relatedPlayer


 

scoreEvent


  drawing top  
 

addMorphsTo:pianoRoll:eventTime:betweenTime:and:

This code handles both the start and end morphs.


 

colorMargin

How far the clip span color highlight extends outside the starting clip


 

colorMorph


 

delete

Remove the receiver as a submorph of its owner and make its new owner be nil.


 

soundTrackHeight


 

soundTrackOnBottom

a local preference during test


 

thumbnailHeight


  events top  
 

encounteredAtTime:inScorePlayer:atIndex:inEventTrack:secsPerTick:

If being shown as a clip, then tell the clipPlayer to start showing this clip


 

endTime


 

frameAtTick:

Return the frame number corresponding to the given tick time


 

nextSyncEventAfter:inTrack:


 

resetFrom:

subclasses should revert to their initial state


 

resumeFrom:

New movie clip style of use.


 

startTime


  initialization top  
 

image:frameNumber:


 

justDroppedInto:event:

When dropping this morph into a pianoRoll, add a corresponding
event to the score so that it will always appear when played,
in addition to possibly triggering other actions


 

movieFileName:soundTrackFileName:image:player:frameNumber:


  private top  
 

buildSoundTrackMorphFor:


 

setEndFrameNumber:


 

setEndFrameNumber:tickTime:

May be called with either time or frame being nil,
in which case the other will br computed.


 

setTimeInScore:near:

Find a time to place this clip that does not overlap other clips.
So, if I start in the middle of another clip, move me to the end of it,
and if I start very soon after another clip, put me right at the end.
Then, if my end goes beyond the start of another clip, shorten me
so I end right before that clip.


class methods
  no messages top