Skip to content

Commit 101c0ce

Browse files
committed
Add SC-55 v1.10 ROM set support
1 parent 7a11830 commit 101c0ce

File tree

3 files changed

+74
-1
lines changed

3 files changed

+74
-1
lines changed

src/nuked_sc55.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ bool NukedSc55::Init(const clap_plugin* _plugin_instance)
182182

183183
switch (model) {
184184
case Model::Sc55_v1_00: rom_path /= "SC-55-v1.00"; break;
185+
case Model::Sc55_v1_10: rom_path /= "SC-55-v1.10"; break;
185186
case Model::Sc55_v1_20: rom_path /= "SC-55-v1.20"; break;
186187
case Model::Sc55_v1_21: rom_path /= "SC-55-v1.21"; break;
187188
case Model::Sc55_v2_00: rom_path /= "SC-55-v2.00"; break;

src/nuked_sc55.h

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,14 @@
1111

1212
class NukedSc55 {
1313
public:
14-
enum class Model { Sc55_v1_00, Sc55_v1_20, Sc55_v1_21, Sc55_v2_00, Sc55mk2_v1_01 };
14+
enum class Model {
15+
Sc55_v1_00,
16+
Sc55_v1_10,
17+
Sc55_v1_20,
18+
Sc55_v1_21,
19+
Sc55_v2_00,
20+
Sc55mk2_v1_01
21+
};
1522

1623
// Init/shutdown
1724
NukedSc55(const clap_plugin_t plugin_class, const clap_host_t* host,

src/plugin.cpp

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,18 @@ static const clap_plugin_descriptor_t plugin_descriptor_sc55_v1_00 = {
3232
.description = "Roland SC-55 v1.00 MIDI sound module emulation",
3333
.features = Features};
3434

35+
static const clap_plugin_descriptor_t plugin_descriptor_sc55_v1_10 = {
36+
.clap_version = CLAP_VERSION_INIT,
37+
.id = "net.johnnovak.nuked_sc55_clap.sc55_v1_10",
38+
.name = "Nuked SC-55 — Roland SC-55 v1.10",
39+
.vendor = Vendor,
40+
.url = Url,
41+
.manual_url = Url,
42+
.support_url = Url,
43+
.version = Version,
44+
.description = "Roland SC-55 v1.10 MIDI sound module emulation",
45+
.features = Features};
46+
3547
static const clap_plugin_descriptor_t plugin_descriptor_sc55_v1_20 = {
3648
.clap_version = CLAP_VERSION_INIT,
3749
.id = "net.johnnovak.nuked_sc55_clap.sc55_v1_20",
@@ -207,6 +219,54 @@ static const clap_plugin_t my_plugin_class_sc55_v1_00 = {
207219

208220
.on_main_thread = [](const clap_plugin* plugin) {}};
209221

222+
//----------------------------------------------------------------------------
223+
// SC-55 v1.10
224+
//----------------------------------------------------------------------------
225+
static const clap_plugin_t my_plugin_class_sc55_v1_10 = {
226+
227+
.desc = &plugin_descriptor_sc55_v1_10,
228+
229+
.plugin_data = nullptr,
230+
231+
.init = [](const clap_plugin* plugin) -> bool {
232+
auto the_plugin = (NukedSc55*)plugin->plugin_data;
233+
return the_plugin->Init(plugin);
234+
},
235+
236+
.destroy =
237+
[](const clap_plugin* plugin) {
238+
auto the_plugin = (NukedSc55*)plugin->plugin_data;
239+
the_plugin->Shutdown();
240+
delete the_plugin;
241+
},
242+
243+
.activate = [](const clap_plugin* plugin, double sample_rate,
244+
uint32_t min_frame_count, uint32_t max_frame_count) -> bool {
245+
auto the_plugin = (NukedSc55*)plugin->plugin_data;
246+
return the_plugin->Activate(sample_rate, min_frame_count, max_frame_count);
247+
},
248+
249+
.deactivate = [](const clap_plugin* plugin) {},
250+
251+
.start_processing = [](const clap_plugin* plugin) -> bool { return true; },
252+
253+
.stop_processing = [](const clap_plugin* plugin) {},
254+
255+
.reset = [](const clap_plugin* plugin) {},
256+
257+
.process = [](const clap_plugin* plugin,
258+
const clap_process_t* process) -> clap_process_status {
259+
auto the_plugin = (NukedSc55*)plugin->plugin_data;
260+
return the_plugin->Process(process);
261+
},
262+
263+
.get_extension = [](const clap_plugin* plugin, const char* id) -> const void* {
264+
return get_extension(plugin, id);
265+
},
266+
267+
.on_main_thread = [](const clap_plugin* plugin) {}};
268+
269+
210270
//----------------------------------------------------------------------------
211271
// SC-55 v1.20
212272
//----------------------------------------------------------------------------
@@ -440,6 +500,11 @@ static const clap_plugin_factory_t plugin_factory = {
440500
host,
441501
NukedSc55::Model::Sc55_v1_00);
442502

503+
} else if (strcmp(plugin_id, plugin_descriptor_sc55_v1_10.id) == 0) {
504+
the_plugin = new NukedSc55(my_plugin_class_sc55_v1_10,
505+
host,
506+
NukedSc55::Model::Sc55_v1_10);
507+
443508
} else if (strcmp(plugin_id, plugin_descriptor_sc55_v1_20.id) == 0) {
444509
the_plugin = new NukedSc55(my_plugin_class_sc55_v1_20,
445510
host,

0 commit comments

Comments
 (0)