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(¬e->l.p, p1, p2)) PATCH_play_note(patch, note->note, note->id, VELOCITY_get(note->velocity), TRACK_get_pan(track)); if (PlaceIsBetween2(¬e->end, p1, p2)) PATCH_stop_note(patch, note->note, note->id); note = NextNote(note); } } track = NextTrack(track); } }
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(¬e->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(¬e->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); } }
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,¬e->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; } }
struct Notes *FindNote( struct Tracks *track, Place *placement ) { struct Notes *note = track->notes; while(note != NULL) { if (PlaceIsBetween2(placement, ¬e->l.p, ¬e->end)) break; note = NextNote(note); } return note; }
/***************************************************************************** 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; } }
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,¬e->l.p,¬e->end)) if (NOTE_subtrack(wtrack, note)==subtrack) return note; note = NextNote(note); } return NULL; }