use VBR V0 for mp3 export
parent
a0e9fe0093
commit
707a6169a2
6
notes
6
notes
|
@ -34,8 +34,12 @@ TODO {
|
|||
immediate frontburner {
|
||||
spacer rows on top/bottom of pattern editor (keep centered)
|
||||
make ctrl+pgup/dn jump to the next *actual pattern*, looping around if necessary
|
||||
project-relative export
|
||||
|
||||
global pan (PXX) for InstrumentCore? *default* pan
|
||||
distortion effect
|
||||
single-selection sampler
|
||||
|
||||
global (default) pan (PXX) for InstrumentCore
|
||||
|
||||
- node function to release unneeded old data when stopping playback
|
||||
...
|
||||
|
|
|
@ -236,7 +236,8 @@ void AudioEngine::render(std::shared_ptr<Project> p, QString filename) {
|
|||
param << "-y" << "-f" << "s16le" << "-ac" << "2" << "-ar" << QString::number(sampleRate) << "-i" << "pipe:";
|
||||
if (!project->title.isEmpty()) param << "-metadata" << qs("title=%1").arg(project->title);
|
||||
if (!project->artist.isEmpty()) param << "-metadata" << qs("artist=%1").arg(project->artist);
|
||||
param << "-f" << "mp3" << filename;
|
||||
param << "-f" << "mp3" << "-codec:a" << "libmp3lame"<< "-q:a" << "0"; // specify mp3, vbr v0
|
||||
param << filename;
|
||||
|
||||
enc.start("ffmpeg", param);
|
||||
enc.waitForStarted();
|
||||
|
|
|
@ -82,10 +82,6 @@ namespace {
|
|||
Thicc::Thicc() { }
|
||||
|
||||
void Thicc::init() {
|
||||
double avg = 0;
|
||||
for (int i = 0; i < 4096; i++) avg += std::abs(std::fmod(static_cast<double>(i) / 4096.0, 1.0) * 2.0 - 1.0);
|
||||
qDebug() << "average of" << (avg / 4096.0);
|
||||
|
||||
addPort(Port::Input, Port::Command, 0);
|
||||
addPort(Port::Output, Port::Audio, 0);
|
||||
|
||||
|
@ -95,10 +91,10 @@ void Thicc::init() {
|
|||
note.scratch[0] = static_cast<double>(QRandomGenerator::global()->generate() % 573000);
|
||||
};
|
||||
|
||||
core.globalParam['Q'] = [](const ParamReader& pr) {
|
||||
/*core.globalParam['Q'] = [](const ParamReader& pr) {
|
||||
qDebug() << "global recieved" << pr.param() << pr.val();
|
||||
return true;
|
||||
};
|
||||
};*/
|
||||
|
||||
core.processNote = [this](Note& note, AudioPort* p) {
|
||||
double freq;
|
||||
|
@ -118,8 +114,6 @@ void Thicc::init() {
|
|||
double delta = smpTime * freq;
|
||||
note.scratch[0] += delta;
|
||||
|
||||
// s
|
||||
|
||||
double o = 0;
|
||||
for (int i = 0; i < vc; i++) {
|
||||
auto ii = static_cast<double>(i);
|
||||
|
@ -134,12 +128,7 @@ void Thicc::init() {
|
|||
|
||||
o /= 1.0 + ((vf - 1.0)/3.0);
|
||||
|
||||
// e
|
||||
|
||||
note.scratch[3] += /*(smpTime / (1.0/20000.0))*/0.5 * (o - note.scratch[3]); // simple low pass;
|
||||
if (note.scratch[3] != note.scratch[3]) note.scratch[3] = 0; // nan!? WHY
|
||||
AudioFrame out = o;//note.scratch[3];
|
||||
|
||||
AudioFrame out = o;
|
||||
(*p)[i] += out.gainBalance(0, note.pan) * note.ampMult();
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue