[all pages:] introduction tscore cwn mugraph signal score2sig utilities references file_tscore_umod file_mugraph_umod


go one page back go to start go to start go one page ahead
references bandm models of music file_mugraph_umod

APPENDIX: The umod Model Definition File for the Model Elements of the "Raw" tscore Model Layer



The following text shows the model definition following the umod syntax of the "raw" tscore layer.

MODEL TScore =
  DOC Generic score model for denotating time-based sequences of arbitrary events.
      All tscore packages are intended for, but not restricted, to 
      conventional music notation. 
      <br/>See also the 
      <a href='{@docRoot}/../usage/tscore.html'> user documentation</a>.
  $$

  VISITOR 0 Match  MULTIPHASE ; 
  VISITOR 0 SingleMatch ; 
  VISITOR 0 Dump    IS PRINTER ; 


  EXT location  = eu.bandm.tools.message.Location<eu.bandm.tools.message.XMLDocumentIdentifier>


TOPLEVEL CLASS
  
  Container
    conform           OPT string 
    timeless          string -> string

  | TimeScape 
      tpTops            string -> TpTop
      parts		string <-> Part       ! V 0/0 ; 
      voices            string -> Vox 
      voicesBySource    SEQ Vox

  | Part	
      context	TimeScape               ! C     1/0;
      location    location                ! C     1/1;  
      name   	string                  ! C     1/2; 
      voices	string -> Vox		!         V 0/0 ;
      voicesBySource	SEQ Vox
      tlines      SEQ SEQ TpTop  

      JAVA public static final String timeline_pseudo_voice = "$timeline" ; $$
      JAVA public @eu.bandm.tools.annotations.Opt String getTimeless (final String key){
      ///**/System.err.println(" trying "+key+"  --->"+timeless.get(key));
             if (timeless.containsKey(key))
               return (timeless.get(key));
               ///**/System.err.println(" CONTEXT  --->"+context.timeless.get(key));
             return context.timeless.get(key);
           }$$

  | Vox
      context		TimeScape               ! C 0/0;
      name		string			! C 0/1;
      events		SET Event               !	V 0/0;
      sortedByStart	Tp -> Event
      sortedBySource	SEQ Event
      eventSets		string -> EventSet
      parameterNames	SET string
      JAVA public Event newEvent (final eu.bandm.tools.message.Location
	  <eu.bandm.tools.message.XMLDocumentIdentifier> loc,
                                  final Tp when){
          final Event newEvent = new Event (loc, this, when);
          get_sortedBySource().add(newEvent);
	  get_sortedByStart().put(when, newEvent);
	  get_events().add(newEvent);
	  return newEvent ;
        }$$

  TDivision
    from        Tp			! C 0/0 ;
    upto        Tp             		! C 0/1 ;
    defByEvent	bool			! C 0/2;
    points 	SEQ  TpSub
    
    
    TOSTRING JAVA return ""+from+"=>"+upto+"/"+points.size()+"" ; $$
    JAVA public Tp getTp (int num){
	   if (num==0) return from;
	   final int cnt = points.size();
	   if (num==cnt) return upto;
	   else if (num>0 && num<cnt) return points.get(num);
	   else throw new IllegalArgumentException ("timepoint with index "
  				+num+" not known in "+this);
	 }
         public int get_depth(){
	   return Math.max(from.get_depth(), upto.get_depth()) + 1 ;
	 }
         public int get_count(){
	   return points.size();
	 }
    $$

  Tp ABSTRACT
    divisions	Tp -> (int-> TDivision)   !        V 0 ;
    location    OPT location              ! C 0/0;
    defByEvent ABSTRACT GETTER bool	
    JAVA public TDivision makeDivision(Tp tp, int cnt, boolean defByEvent){
           if (containsKey_divisions(tp,cnt))
	     return divisions.get(tp).get(cnt);
	   TDivision d = new TDivision(this, tp, defByEvent);
	   put_divisions(tp, cnt, d);
	   for ( int i=0;i<cnt;i++)
	     d.points.add(new TpSub((Location<XMLDocumentIdentifier>)null, d,i,defByEvent));
           return d;
         }
	abstract int get_depth();
    $$


  | TpTop  
      absTime_text	string 		! C 0/1;
      defByEvent bool = "false"       
      depth		int = "0" 
      TOSTRING  JAVA return absTime_text; $$
  | TpSub
      division 	TDivision		! C 0/1;
      TOSTRING  JAVA return "(/"+division+"#"+pos+")" ; $$
      pos	int			! C 0/2;
      defByEvent bool			! C 0/3;
      JAVA public int get_depth(){
	     return division.get_depth();
           }
      $$


  Event
    location    location                ! C 0/0;   
    voice       Vox			! C 0/1;
    when        Tp                      ! C 0/2;
    upto        OPT Tp
    containedIn SET EventSet
    params	string -> SEQ (location * string)
    JAVA public static final String main_parameter_name = "$main" ; $$
    JAVA public static final String when_parameter_name = "$when" ; $$


  EventSet
    name        string                          ! C 0/0 1/0 ;
    events     	SET Event
    startText   OPT string                      ! C     1/1 ;
    endText   	OPT string 
    constructionSequence SEQ Event

    
    overlapping OPT bool
    hasgaps	OPT bool
    voices	OPT SET Vox

    TOSTRING JAVA return "{EVENT SET \""+name+"\" ,events = "+ constructionSequence 
    +" start/endText = \""+startText+"\"/\""+endText+"\" }" ; $$

    JAVA public void add (Event ev){
	   events.add(ev);
	   constructionSequence.add(ev);
           ev.containedIn.add(this);
         }$$



END MODEL

 




[all pages:] introduction tscore cwn mugraph signal score2sig utilities references file_tscore_umod file_mugraph_umod


go one page back go to start go to start go one page ahead
references bandm models of music file_mugraph_umod

made    2019-11-13_08h41   by    lepper   on    linux-q699.site        Valid XHTML 1.0 Transitional Valid CSS 2.1

produced with eu.bandm.metatools.d2d    and    XSLT    FYI view page d2d source text