Hello
with the SDK V2 i succeed to create an output signal but now with v3 version i have some difficulties
i tried this
for (kk = 0;kk < 128;kk++){
pMultiLooper->SetEvtArrayData(pMultiLooper->paudioout,kk,sin(2*3.1415*kk/128));
}
but it doesn't work (no output sound)
am i using the good fonction ?
thanks
create an output audio signal
-
martignasse
- Site Admin
- Posts: 611
- Location: Lyon, FRANCE
- Contact:
yep, it's the good function...
maybe you forget to set the paudioout event size, the InitModule is a good place for that :
and you should clean your code 
and ideally put out all constant operations from the for loop
maybe you forget to set the paudioout event size, the InitModule is a good place for that :
Code: Select all
void InitModule (void* pModule, TMasterInfo* pMasterInfo, TModuleInfo* pModuleInfo) {
TMultiLooper* pMultiLooper = ((TMultiLooper*)pModule);
// remember, it's up to us to initialise the pMasterInfo poimnter herited from TUserModule
pMultiLooper->SetMasterInfo(pMasterInfo);
pMultiLooper->SetEvtSize( pMultiLooper->paudioout, pMultiLooper->GetBlocSize() );
}Code: Select all
// local variable used in for loop
int i;
int blocksize = pMultiLooper->GetBlocSize();
for (i = 0; i < blocksize; i++){
pMultiLooper->SetEvtArrayData(pMultiLooper->paudioout, i,sin(2*3.1415*i/128));
}Code: Select all
// local variable used in for loop
int i;
int blocksize = pMultiLooper->GetBlocSize();
float sampleoperator = 2*3.1415/(float)blocksize ;
for (i = 0; i < blocksize; i++){
pMultiLooper->SetEvtArrayData(pMultiLooper->paudioout1, i,sin(sampleoperator *i));
}Martin FLEURENT - Usine Developer - SDK maintainer
Who is online
Users browsing this forum: No registered users and 24 guests
