feat: duplicate complete tracks with instruments routing and automation
This commit is contained in:
parent
7084e660fe
commit
4c855ee5d7
9 changed files with 65 additions and 5 deletions
|
|
@ -2,6 +2,7 @@
|
|||
#include "xtc/xtc_editing.h"
|
||||
#include "xtc/xtc_mixer.h"
|
||||
#include "xtc/xtc_audio.h"
|
||||
#include "xtc/xtc_plugin.h"
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
|
@ -64,4 +65,21 @@ static void ripple(void)
|
|||
assert(xtc_project_find_clip(p,c,&clip)==XTC_OK && clip.start_tick==0);
|
||||
xtc_project_destroy(p);
|
||||
}
|
||||
int main(void){markers();sections();ripple();puts("Next DAW workflow tests passed.");return 0;}
|
||||
static void duplicate_track(void)
|
||||
{
|
||||
xtc_project *p=NULL;uint64_t t,b,c,n,id=999;xtc_track_info track;xtc_plugin_spec spec,actual;size_t count;
|
||||
assert(xtc_project_create(&p)==XTC_OK && xtc_project_add_track(p,"Keys",&t)==XTC_OK);
|
||||
assert(xtc_project_add_bus(p,"Bus",&b)==XTC_OK && xtc_project_route_track(p,t,b)==XTC_OK);
|
||||
assert(xtc_project_add_midi_clip(p,t,960,1920,&c)==XTC_OK && xtc_project_add_note(p,c,240,120,60,90,1,&n)==XTC_OK);
|
||||
assert(xtc_plugin_probe_format(XTC_PLUGIN_BUILTIN,XTC_BUILTIN_PATH,0,48000,&spec)==XTC_OK && xtc_project_set_instrument(p,t,&spec)==XTC_OK);
|
||||
assert(xtc_project_set_mix(p,t,.5f,-.5f,1,0)==XTC_OK);
|
||||
{xtc_automation_point a={t,960,XTC_AUTOMATION_GAIN,.75f,0};assert(xtc_project_set_automation(p,&a)==XTC_OK);}
|
||||
assert(xtc_project_duplicate_track(p,b,"Bus copy",&id)==XTC_ERR_INVALID_STATE && id==999);
|
||||
assert(xtc_project_duplicate_track(p,t,"Keys copy",&id)==XTC_OK && id!=t);
|
||||
assert(xtc_project_get_track(p,1,&track)==XTC_OK && track.id==id && track.gain==.5f && track.mute && track.bus_id==b);
|
||||
assert(xtc_project_get_instrument(p,id,&actual)==XTC_OK && actual.index==spec.index);
|
||||
assert(xtc_project_note_count(p,&count)==XTC_OK && count==2);
|
||||
assert(xtc_project_automation_count(p,&count)==XTC_OK && count==2);
|
||||
xtc_project_destroy(p);
|
||||
}
|
||||
int main(void){markers();sections();ripple();duplicate_track();puts("Next DAW workflow tests passed.");return 0;}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue