VoiceViewers
VoiceViewerInfoList: TYPE = LIST OF VoiceViewerInfo;
VoiceViewerInfo: TYPE = REF VoiceViewerInfoRec;
VoiceViewerInfoRec:
TYPE =
RECORD [
-- the data structure underpinning all voice viewers
viewer: ViewerClasses.Viewer,
viewerNumber: INT,
ropeInterval: VoiceRopeInterval, -- the rope interval represented by the viewer
soundList: SoundList, -- a list of the sound/silence intervals in that rope interval
remnant: INT, -- the display shows the rope interval using characters representing a fixed amount of time: this is samplesInRope MOD lengthOfACharacterInSamples
charMarkList: LIST OF INT ← NIL, -- an ordered list of the characters which have character marks on them
textMarkList: LIST OF TextMarkEntry ← NIL, -- see below: list is again ordered
ageList: LIST OF IntPair ← NIL, -- see below: each age lasts until the next element in the list, otherwise until the end of the viewer
color: BOOL ← FALSE, -- is the viewer currently on the color display?
edited: BOOL ← FALSE, -- the true indication whether the voice has been edited: at times may not agree with the viewer's 'edited' flags
editInProgress: BOOL ← TRUE, -- set if an initiated edit has yet to complete: this includes all cut/paste operations; input to the viewer; alteration of markers and redrawing operations, since none of these is allowed to occur simultaneously in this implementation. It is created TRUE and only set FALSE once the viewer's contents are valid
destroyEvent: ViewerEvents.EventRegistration,
changeColumnEvent: ViewerEvents.EventRegistration,
parentViewer: ViewerClasses.Viewer ← NIL, -- trace of where the SourceMarker for the viewer is, NIL if no parent
positionInParent: TiogaOpsDefs.Location -- ditto: invalid if parentViewer = NIL. HINT ONLY!
];
Textual markers are held as a list of the following elements as part of the VoiceViewerInfo; see VoiceMarkersImpl and TextInVoiceImpl for more details
TextMarkEntry: TYPE = REF TextMarkRec;
TextMarkRec:
TYPE =
RECORD [
position: INT, -- the number of the character to which the text is attached
text: Rope.ROPE, -- the text itself
displayChars: INT, -- how much of the text can be displayed [without running into the next TextMarkEntry], in characters
width: INT -- how much space this display will take, measured in voice character widths
aging markers in VoiceViewerInfo are held as a list the following records
IntPair:
TYPE =
RECORD [
position: INT,
age: INT
];
These constants define how a voice rope maps onto a graphical representation (in fact a rope of characters in special font, collectively producing the capillary display.)
soundRopeCharsPerSecond: NAT = 4;
bytesPerChirp: CARD = 8000; -- TYPE = Jukebox.bytesPerChirp (tsk tsk)
soundRopeCharLength:
NAT = bytesPerChirp/soundRopeCharsPerSecond;
Jukebox.BytesPerChirp is the measure of voice samples per second
soundRopeCharDivisions: NAT = 4; -- number of stripes per character;
soundRopeResolution:
NAT = soundRopeCharLength/soundRopeCharDivisions;
voiceViewerMenu: Menus.Menu;
The menu for all voice viewers
voiceViewerInfoList: VoiceViewerInfo; -- now private to VoiceViewersImpl
The list of all currently existing voice edit windows.
Data structures used in editing voice.
VoiceRopeInterval:
TYPE = VoiceRope.VoiceRopeInterval;
RECORD [ropeID: Rope.ROPE, start: INT, length: INT]
Selection: TYPE = REF SelectionRec;
SelectionRec:
TYPE =
RECORD [
Specification of where to insert voice into a slab: if ropeInterval.length # nil then selection is to be deleted first.
viewer: ViewerClasses.Viewer,
voiceViewerInfo: VoiceViewerInfo,
ropeInterval: VoiceRopeInterval,
displayNode: TiogaOpsDefs.Ref
];
The purpose of the next data object is to keep track of voice which is to be moved to some part of some slab—both a VoiceRopeInterval and a cache of the SoundList, charMarkList and textMarkList which correspond to it.
SoundInterval: TYPE = REF SoundIntervalRec;
SoundIntervalRec:
TYPE =
RECORD [
ropeInterval: VoiceRopeInterval,
soundList: SoundList ← NIL,
charMarkList: LIST OF INT ← NIL,
textMarkList: LIST OF TextMarkEntry ← NIL
];
SoundList: TYPE = LIST OF Sound;
Sound:
TYPE =
RECORD [
silence: INT, -- a Sound element simply consists of a length of silence
sound: INT -- Followed by a length of sound - either may legally be zero
];