void create_sample_plugin(void){ PR_add_plugin_type(&plugin_type); memcpy((void*)&click_type, (void*)&plugin_type, sizeof(SoundPluginType)); click_type.name = g_click_name; PR_add_plugin_type(&click_type); }
void create_jack_plugins(void){ stereo_in_type.data = g_jack_client; PR_add_plugin_type(&stereo_in_type); stereo_out_type.data = g_jack_client; PR_add_plugin_type(&stereo_out_type); system_in_type.data = g_jack_client; PR_add_plugin_type(&system_in_type); system_out_type.data = g_jack_client; PR_add_plugin_type(&system_out_type); }
void create_jack_plugins(void){ static bool has_inited = false; if (has_inited==false){ init_types(); has_inited = true; } stereo_in_type.data = g_jack_client; PR_add_plugin_type(&stereo_in_type); jack8_in_type.data = g_jack_client; PR_add_plugin_type(&jack8_in_type); stereo_out_type.data = g_jack_client; PR_add_plugin_type(&stereo_out_type); jack8_out_type.data = g_jack_client; PR_add_plugin_type(&jack8_out_type); //PR_add_menu_entry(PluginMenuEntry::separator()); system_in_type.data = g_jack_client; PR_add_plugin_type(&system_in_type); system_in_type8.data = g_jack_client; PR_add_plugin_type(&system_in_type8); system_out_type.data = g_jack_client; PR_add_plugin_type(&system_out_type); system_out_type8.data = g_jack_client; PR_add_plugin_type(&system_out_type8); }
void create_sine_plugin(void){ SoundPluginType *plugin_type = (SoundPluginType*)calloc(1,sizeof(SoundPluginType)); plugin_type->type_name = "CLAP"; plugin_type->name = "Sine Synth"; plugin_type->num_inputs = 0; plugin_type->num_outputs = 1; plugin_type->is_instrument = true; plugin_type->note_handling_is_RT = false; plugin_type->num_effects = 1; plugin_type->get_effect_format = NULL; plugin_type->get_effect_name = get_effect_name; plugin_type->effect_is_RT = NULL; plugin_type->create_plugin_data = create_plugin_data; plugin_type->cleanup_plugin_data = cleanup_plugin_data; plugin_type->RT_process = RT_process; plugin_type->play_note = play_note; plugin_type->set_note_volume = set_note_volume; plugin_type->stop_note = stop_note; plugin_type->set_effect_value = set_effect_value; plugin_type->get_effect_value = get_effect_value; plugin_type->get_display_value_string = get_display_value_string; PR_add_plugin_type(plugin_type); }
void CREATE_NAME (void){ static bool has_inited = false; if (has_inited==false) { fill_type(&faust_type); CLASSNAME::classInit(MIXER_get_sample_rate()); // TODO: Don't do this. Just dispatch during runtime which rt_process to call. // Data *data = (Data*)create_effect_plugin_data(&faust_type, NULL, NULL, MIXER_get_sample_rate(), MIXER_get_buffer_size(), false); faust_type.name = DSP_NAME; faust_type.num_inputs = data->voices[0].dsp_instance->getNumInputs(); faust_type.num_outputs = data->voices[0].dsp_instance->getNumOutputs(); if(data->voices[0].myUI.is_instrument()){ faust_type.is_instrument = true; faust_type.RT_process = RT_process_instrument; faust_type.create_plugin_data = create_instrument_plugin_data; data->voices[0].myUI.remove_instrument_notecontrol_effects(); }else{ faust_type.is_instrument = false; faust_type.RT_process = RT_process_effect; faust_type.create_plugin_data = create_effect_plugin_data; faust_type.play_note = NULL; faust_type.set_note_volume = NULL; faust_type.stop_note = NULL; } faust_type.num_effects = data->voices[0].myUI._num_effects; has_inited = true; } PR_add_plugin_type(&faust_type); }
void create_faust_plugin(void){ SoundPluginType *plugin_type = (SoundPluginType*)V_calloc(1,sizeof(SoundPluginType)); plugin_type->type_name = "Faust Dev"; plugin_type->name = "Faust Dev"; plugin_type->num_inputs = MAX_CHANNELS; plugin_type->num_outputs = MAX_CHANNELS; plugin_type->is_instrument = true; plugin_type->note_handling_is_RT = false; plugin_type->num_effects = MAX_EFFECTS; plugin_type->get_effect_format = dev_get_effect_format; plugin_type->get_effect_name = dev_get_effect_name; plugin_type->effect_is_RT = NULL; plugin_type->create_state = create_state; plugin_type->create_plugin_data = dev_create_plugin_data; plugin_type->cleanup_plugin_data = dev_cleanup_plugin_data; plugin_type->RT_process = dev_RT_process; plugin_type->play_note = dev_play_note; plugin_type->set_note_volume = dev_set_note_volume; plugin_type->set_note_pitch = dev_set_note_pitch; plugin_type->stop_note = dev_stop_note; plugin_type->set_effect_value = dev_set_effect_value; plugin_type->get_effect_value = dev_get_effect_value; plugin_type->get_display_value_string = dev_get_display_value_string; plugin_type->get_effect_description = dev_get_effect_description; plugin_type->effect_is_visible = dev_effect_is_visible; plugin_type->show_gui = dev_show_gui; plugin_type->hide_gui = dev_hide_gui; plugin_type->gui_is_visible = dev_gui_is_visible; //plugin_type->plugin_takes_care_of_savable_values = true; plugin_type->info = "FAUST (Functional Audio Stream) is a functional programming language specifically designed for real-time signal processing and synthesis. FAUST targets high-performance signal processing applications and audio plug-ins for a variety of platforms and standards. More info <A href=\"http://faust.grame.fr\">here</a>." "<p>" "Hints:\n" "<UL>" "<LI> To zoom, either the editor or a diagram, press CTRL while scrolling the mouse wheel." "<LI> Running full size window (by pressing the \"Full\" button) can be very convenient when developing." "</UL" ; PR_add_plugin_type(plugin_type); }
void CREATE_NAME (void){ fill_type(&faust_type); Data *data = (Data*)create_effect_plugin_data(&faust_type, NULL, NULL, MIXER_get_sample_rate(), MIXER_get_buffer_size()); faust_type.data = data; faust_type.name = DSP_NAME; faust_type.num_inputs = data->voices[0].dsp_instance->getNumInputs(); faust_type.num_outputs = data->voices[0].dsp_instance->getNumOutputs(); if(data->voices[0].myUI.is_instrument()){ faust_type.is_instrument = true; faust_type.RT_process = RT_process_instrument; faust_type.create_plugin_data = create_instrument_plugin_data; data->voices[0].myUI.remove_instrument_notecontrol_effects(); }else{ faust_type.is_instrument = false; faust_type.RT_process = RT_process_effect; faust_type.create_plugin_data = create_effect_plugin_data; faust_type.play_note = NULL; faust_type.set_note_volume = NULL; faust_type.stop_note = NULL; } faust_type.num_effects = data->voices[0].myUI._num_effects; PR_add_plugin_type(&faust_type); }
void create_patchbay_plugin(void){ PR_add_plugin_type(&plugin_type); }
void create_bus_plugins(void){ static bool has_inited = false; if (has_inited==false) { bus_type1.type_name = "Bus"; bus_type1.name = "Bus 1"; bus_type1.num_inputs = 2; bus_type1.num_outputs = 2; bus_type1.is_instrument = false; bus_type1.num_effects = 0; bus_type1.create_plugin_data = create_plugin_data; bus_type1.cleanup_plugin_data = cleanup_plugin_data; //bus_type1.RT_process = RT_bus_process; bus_type1.RT_process = RT_pipe_process; bus_type1.data = NULL; } if (has_inited==false) { bus_type2.type_name = "Bus"; bus_type2.name = "Bus 2"; bus_type2.num_inputs = 2; bus_type2.num_outputs = 2; bus_type2.is_instrument = false; bus_type2.num_effects = 0; bus_type2.create_plugin_data = create_plugin_data; bus_type2.cleanup_plugin_data = cleanup_plugin_data; //bus_type2.RT_process = RT_bus_process; bus_type2.RT_process = RT_pipe_process; bus_type2.data = NULL; } if (has_inited==false) { pipe_type.type_name = "Pipe"; pipe_type.name = "Pipe"; pipe_type.info = "A pipe sends the sound through unmodified.\n"; pipe_type.num_inputs = 2; pipe_type.num_outputs = 2; pipe_type.is_instrument = false; pipe_type.num_effects = 0; pipe_type.create_plugin_data = create_plugin_data; pipe_type.cleanup_plugin_data = cleanup_plugin_data; pipe_type.RT_process = RT_pipe_process; pipe_type.data = NULL; } if (has_inited==false) { left_in_type.type_name = "2ch -> 1ch"; left_in_type.name = "Keep Left channel only"; left_in_type.info = "Receives a stereo sound. Sends out the left channel."; left_in_type.num_inputs = 2; left_in_type.num_outputs = 1; left_in_type.is_instrument = false; left_in_type.num_effects = 0; left_in_type.create_plugin_data = create_plugin_data; left_in_type.cleanup_plugin_data = cleanup_plugin_data; left_in_type.RT_process = RT_left_in_process; } if (has_inited==false) { right_in_type.type_name = "2ch -> 1ch"; right_in_type.name = "Keep Right channel only"; right_in_type.info = "Receives a stereo sound. Sends out the right channel."; right_in_type.num_inputs = 2; right_in_type.num_outputs = 1; right_in_type.is_instrument = false; right_in_type.num_effects = 0; right_in_type.create_plugin_data = create_plugin_data; right_in_type.cleanup_plugin_data = cleanup_plugin_data; right_in_type.RT_process = RT_right_in_process; } if (has_inited==false) { left_out_type.type_name = "1ch -> 2ch"; left_out_type.name = "Send Left channel only"; left_out_type.info = "Receives a mono sound.\nSends out a stereo sound where the Right channel is silent\n and the Left channel contains the input sound"; left_out_type.num_inputs = 1; left_out_type.num_outputs = 2; left_out_type.is_instrument = false; left_out_type.num_effects = 0; left_out_type.create_plugin_data = create_plugin_data; left_out_type.cleanup_plugin_data = cleanup_plugin_data; left_out_type.RT_process = RT_left_out_process; } if (has_inited==false) { right_out_type.type_name = "1ch -> 2ch"; right_out_type.name = "Send Right channel only"; right_out_type.info = "Receives a mono sound.\nSends out a stereo sound where the Left channel is silent\n and the Right channel contains the input sound"; right_out_type.num_inputs = 1; right_out_type.num_outputs = 2; right_out_type.is_instrument = false; right_out_type.num_effects = 0; right_out_type.create_plugin_data = create_plugin_data; right_out_type.cleanup_plugin_data = cleanup_plugin_data; right_out_type.RT_process = RT_right_out_process; } has_inited = true; PR_add_plugin_type(&bus_type1); PR_add_plugin_type(&bus_type2); PR_add_plugin_type(&pipe_type); PR_add_plugin_type(&left_in_type); PR_add_plugin_type(&right_in_type); PR_add_plugin_type(&left_out_type); PR_add_plugin_type(&right_out_type); }
void create_fluidsynth_plugin(void){ PR_add_plugin_type(&plugin_type); }