Commit 7a95f400 authored by Jonathan Wilkes's avatar Jonathan Wilkes
Browse files

fuzzy port 1f2828f1f7620ded82263e4f9f920df4b31a388b from Pd-l2ork: we just...

fuzzy port 1f2828f1f7620ded82263e4f9f920df4b31a388b from Pd-l2ork: we just copied from pd-l2ork HEAD for main.cpp here
parent 99ee0190
......@@ -55,6 +55,7 @@ class fluid:
AddInAnything(); // slurp anything
AddOutSignal(2); // 2 audio out [ == AddOutSignal(2) ]
fluid::fluid_init(argc, argv);
settings = NULL;
} // end of constructor
~fluid()
......@@ -117,7 +118,7 @@ class fluid:
private:
fluid_synth_t *synth;
fluid_settings_t * settings = NULL;
fluid_settings_t * settings;
FLEXT_CALLBACK_V(fluid_load)
void fluid_load(int argc, t_atom *argv);
......@@ -265,42 +266,48 @@ void fluid::fluid_init(int argc, t_atom *argv)
//fluid_settings_t * settings = NULL;
settings = new_fluid_settings();
// fluid_settings_setstr(settings, "audio.driver", "float");
// settings:
fluid_settings_setnum(settings, "synth.midi-channels", 16);
fluid_settings_setnum(settings, "synth.polyphony", 256);
fluid_settings_setnum(settings, "synth.gain", 0.600000);
fluid_settings_setnum(settings, "synth.sample-rate", 44100.000000);
fluid_settings_setstr(settings, "synth.chorus.active", "no");
fluid_settings_setstr(settings, "synth.reverb.active", "no");
fluid_settings_setstr(settings, "synth.ladspa.active", "no");
if (sr != 0)
if ( settings == NULL )
{
fluid_settings_setnum(settings, "synth.sample-rate", sr);
post("fluid~: couldn't create synth settings\n");
}
else
{
// fluid_settings_setstr(settings, "audio.driver", "float");
// settings:
fluid_settings_setnum(settings, "synth.midi-channels", 16);
fluid_settings_setnum(settings, "synth.polyphony", 256);
fluid_settings_setnum(settings, "synth.gain", 0.600000);
fluid_settings_setnum(settings, "synth.sample-rate", 44100.000000);
fluid_settings_setstr(settings, "synth.chorus.active", "no");
fluid_settings_setstr(settings, "synth.reverb.active", "no");
fluid_settings_setstr(settings, "synth.ladspa.active", "no");
if (sr != 0)
{
fluid_settings_setnum(settings, "synth.sample-rate", sr);
}
// Create fluidsynth instance:
synth = new_fluid_synth(settings);
if ( synth == NULL )
{
post("fluid~: couldn't create synth\n");
}
// try to load argument as soundfont
fluid_load(argc, argv);
// Create fluidsynth instance:
synth = new_fluid_synth(settings);
if ( synth == NULL )
{
post("fluid~: couldn't create synth\n");
}
// try to load argument as soundfont
fluid_load(argc, argv);
//if (settings != NULL )
// delete_fluid_settings(settings);
// We're done constructing:
if (synth)
post("-- fluid~ with flext ---");
//if (settings != NULL )
// delete_fluid_settings(settings);
// We're done constructing:
if (synth)
post("-- fluid~ with flext ---");
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment