Example #1
0
void YSE::DSP::MODULES::bandPassFilter::process(MULTICHANNELBUFFER & buffer) {
  createIfNeeded();
  (*bp).set(parmFrequency, parmQ);

  for (UInt i = 0; i < buffer.size(); i++) {
    buffer[i] = (*bp)(buffer[i]);
  }
}
Example #2
0
void PlaylistModel::insert(Mlt::Producer* producer, int row)
{
    createIfNeeded();
    beginInsertRows(QModelIndex(), row, row);
    m_playlist->insert(*producer, row, producer->get_in(), producer->get_out());
    endInsertRows();
    emit modified();
}
Example #3
0
void PlaylistModel::insertBlank(int frames, int row)
{
    createIfNeeded();
    beginInsertRows(QModelIndex(), row, row);
    m_playlist->insert_blank(row, frames - 1);
    endInsertRows();
    emit modified();
}
Example #4
0
void PlaylistModel::appendBlank(int frames)
{
    createIfNeeded();
    int count = m_playlist->count();
    beginInsertRows(QModelIndex(), count, count);
    m_playlist->blank(frames - 1);
    endInsertRows();
    emit modified();
}
Example #5
0
void PlaylistModel::append(Mlt::Producer* producer)
{
    createIfNeeded();
    int count = m_playlist->count();
    beginInsertRows(QModelIndex(), count, count);
    m_playlist->append(*producer, producer->get_in(), producer->get_out());
    endInsertRows();
    emit modified();
}
Example #6
0
void YSE::DSP::MODULES::highPassFilter::process(MULTICHANNELBUFFER & buffer) {
  createIfNeeded();

  if (buffer[0].getLength() != result->getLength()) {
    result->resize(buffer[0].getLength());
  }

  (*hp).setFrequency(parmFrequency);
  (*result) = (*hp)(buffer[0]);
  
  calculateImpact(buffer[0], (*result));
}
Example #7
0
void YSE::DSP::MODULES::sweepFilter::process(MULTICHANNELBUFFER & buffer) {
  createIfNeeded();

  if (buffer[0].getLength() != result->getLength()) {
    result->resize(buffer[0].getLength());
  }

  (*result) = (*osc)(parmSpeed, buffer[0].getLength());
  (*result) *= (float)parmDepth;
  (*result) += (float)parmFrequency;
  DSP::buffer & interpolated = (*interpolator)(*result);
  (*result) = (*filter)(buffer[0], interpolated, (*result));

  calculateImpact(buffer[0], (*result));
}
Example #8
0
void YSE::DSP::MODULES::basicDelay::process(MULTICHANNELBUFFER & buffer) {
  createIfNeeded();

  if (buffer[0].getLength() != result->getLength()) {
    result->resize(buffer[0].getLength());
    reader->resize(buffer[0].getLength());
  }

  (*result) = buffer[0];
  applyPreFilter(buffer[0]);

  delayBuffer->process(buffer[0]);
  Int delayCount = 1; // the original signal

  // add delays to signal
  if (gain0 > 0) {
    delayBuffer->read(*reader, time0);
    (*reader) *= gain0;
    (*result) += (*reader);
    delayCount++;
  }

  if (gain1 > 0) {
    delayBuffer->read(*reader, time1);
    (*reader) *= gain1;
    (*result) += (*reader);
    delayCount++;
  }

  if (gain2 > 0) {
    delayBuffer->read(*reader, time2);
    (*reader) *= gain2;
    (*result) += (*reader);
    delayCount++;
  }

  // adjust total gain
  (*result) *= (1.f / delayCount);
  calculateImpact(buffer[0], (*result));
}