예제 #1
0
static void Scroll_play_down3(
                      struct WBlocks *wblock,
                      const Place *p1,
                      const Place *p2
){
  struct Tracks *track = wblock->block->tracks;

  while(track != NULL){
    struct Patch *patch=track->patch;
    if (patch != NULL){
      struct Notes *note = track->notes;
      while(note != NULL){
        if (PlaceIsBetween2(&note->l.p, p1, p2))
          PATCH_play_note(patch, note->note, note->id, VELOCITY_get(note->velocity), TRACK_get_pan(track));
        
        if (PlaceIsBetween2(&note->end, p1, p2))
          PATCH_stop_note(patch, note->note, note->id);
        
        note = NextNote(note);
      }
    }
    
    track = NextTrack(track);
  }
}
예제 #2
0
static void Scroll_play_down3(
                      struct WBlocks *wblock,
                      const Place *p1,
                      const Place *p2
){
  struct Tracks *track = wblock->block->tracks;

  while(track != NULL){
    
    if (track->onoff==1){
      
      struct Patch *patch=track->patch;
      
      if (patch != NULL){
        
        struct Notes *note = track->notes;
        
        while(note != NULL){
          if (PlaceIsBetween2(&note->l.p, p1, p2))
            PATCH_play_note(patch, 
                            create_note_t(NULL,
                                          note->id,
                                          note->note,
                                          VELOCITY_get(note->velocity),
                                          TRACK_get_pan(track),
                                          ATOMIC_GET(track->midi_channel),
                                          0)
                            );
          
          if (PlaceIsBetween2(&note->end, p1, p2))
            PATCH_stop_note(patch,
                            create_note_t(NULL,
                                          note->id,
                                          note->note,
                                          0,
                                          TRACK_get_pan(track),
                                          ATOMIC_GET(track->midi_channel),
                                          0
                                          )
                            );
          
          note = NextNote(note);
        }
      }
    }
    
    track = NextTrack(track);
  }
}
예제 #3
0
void Glissando_CurrPos(struct Tracker_Windows *window){
	struct WBlocks *wblock=window->wblock;
	struct WTracks *wtrack=wblock->wtrack;
	struct Notes *note=wtrack->track->notes;
	struct Notes *nextnote;
        int realline = wblock->curr_realline;
	const Place *p=&wblock->reallines[realline]->l.p;

        while(note!=NULL){
          nextnote=NextNote(note);
          if(nextnote==NULL) return;
          
          if(PlaceIsBetween2(p,&note->l.p,&nextnote->l.p)){
            ADD_UNDO(Notes(window, wblock->block, wtrack->track, realline));
            Glissando(wblock,wtrack,note);
            /*
            UpdateAndClearSomeTrackReallinesAndGfxWTracks(
                                                          window,
                                                          wblock,
                                                          wtrack->l.num,
                                                          wtrack->l.num
                                                          );
            */
            return;
          }
          note=nextnote;
        }

}
예제 #4
0
struct Notes *FindNote(
                       struct Tracks *track,
                       Place *placement
                       )
{
  struct Notes *note = track->notes;
  while(note != NULL) {
    if (PlaceIsBetween2(placement, &note->l.p, &note->end))
      break;
    note = NextNote(note);
  }
  return note;
}
예제 #5
0
파일: list.c 프로젝트: jakobvonrotz/radium
/*****************************************************************************
  FUNCTION
    Removes all elements in a list that is greater or equal to p1, and
    less than p2.
******************************************************************************/
void ListRemoveElements3(
	void *voidlistroot,
	Place *p1,
	Place *p2
){
	struct ListHeaderPointer3 *listroot=voidlistroot;
	struct ListHeader3 *l=listroot->root;
	struct ListHeader3 *temp;

	while(l!=NULL){
		temp=l->next;
		if(PlaceIsBetween2(&l->p,p1,p2)){
			ListRemoveElement3(voidlistroot,l);
		}
		l=temp;
	}
}
예제 #6
0
struct Notes *FindNoteOnSubTrack(
                                 const struct WTracks *wtrack,
                                 int subtrack,
                                 Place *placement
){
        SetNotePolyphonyAttributes(wtrack->track);
  
        struct Notes *note = wtrack->track->notes;
        
        while (note != NULL) {
          if(PlaceIsBetween2(placement,&note->l.p,&note->end))
            if (NOTE_subtrack(wtrack, note)==subtrack)
              return note;
          
          note = NextNote(note);
        }

        return NULL;
}