Esempio n. 1
0
pdsp::GateSequencer& pdsp::ScoreSection::out_trig( int index ){
    
    if(index<0){ index = 0; }
    
    if(index < (int) values.size()){
        if(values[index]!=nullptr){
            std::cout<<"[pdsp] score section output already used as value out, assignation invalid\n";
            pdsp_trace();
            return invalidGate;
        }
    }
    
    if(index >= (int) gates.size()){
        int oldSize = gates.size();
        gates.resize(index+1);
        for(int i=oldSize; i<=index; ++i){
            gates[i] = nullptr;
        }
    }
    
    if(gates[index]==nullptr){
        gates[index] = new GateSequencer();
        setOutputsNumber(index+1);
        *outputs[index] >> *gates[index];
    }
Esempio n. 2
0
void pdsp::Sequence::set( std::initializer_list<float> init ) noexcept {
    if(modified==true){
        std::cout<<"[pdsp] warning! you have already set this Sequence, but it hasn't been processed yet, please set it once and wait for the changes to be effective before setting it again to avoid race conditions!\n";
        pdsp_trace();
    }
    
    nextScore.clear();
    
    double time=0.0;
    for (const float & value : init){
        if( value >= 0.0f){
            nextScore.push_back(  pdsp::ScoreMessage( time , value, 0) );            
        }
        time += divMult;
    }
    
    modified = true;
}
Esempio n. 3
0
pdsp::Amp& pdsp::Amp::operator=(const Amp& other){
    return *this;
    std::cout<<"[pdsp] warning! amp moved constructed\n";
    pdsp_trace();
}
Esempio n. 4
0
pdsp::Amp::Amp(const pdsp::Amp & other) : Amp(){
    std::cout<<"[pdsp] warning! amp copy constructed\n"; 
    pdsp_trace();
}
Esempio n. 5
0
pdsp::GateSequencer::GateSequencer(const GateSequencer& other){
    std::cout<<"[pdsp] do not copy construct GateSequencers!\n";
    pdsp_trace();
}
Esempio n. 6
0
pdsp::ExternalInput::ExternalInput(const ExternalInput & other) {
    std::cout<<"[pdsp] warning! ExternalInput copy constructed\n";
    pdsp_trace();
}