Added factory presets.

pull/1/head
Holger Wirtz 8 years ago
parent 79b8540855
commit 2f09d42b12
  1. 166
      src/Dexed.ttl
  2. 2
      src/Makefile
  3. 22
      src/dexed.cpp
  4. 2
      src/dexed.mh
  5. 14595
      src/presets.ttl

@ -10,6 +10,7 @@
@prefix urid: <http://lv2plug.in/ns/ext/urid#>. @prefix urid: <http://lv2plug.in/ns/ext/urid#>.
@prefix epp: <http://lv2plug.in/ns/dev/extportinfo#>. @prefix epp: <http://lv2plug.in/ns/dev/extportinfo#>.
@prefix pprops: <http://lv2plug.in/ns/ext/port-props#>. @prefix pprops: <http://lv2plug.in/ns/ext/port-props#>.
@prefix pset: <http://lv2plug.in/ns/ext/presets#> .
<https://github.com/dcoredump/dexed.lv2> <https://github.com/dcoredump/dexed.lv2>
a lv2:InstrumentPlugin, lv2:Plugin ; a lv2:InstrumentPlugin, lv2:Plugin ;
@ -66,8 +67,8 @@
lv2:symbol "engine" ; lv2:symbol "engine" ;
lv2:name "ENGINE" ; lv2:name "ENGINE" ;
lv2:default 1 ; lv2:default 1 ;
lv2:minimum 1 ; lv2:minimum 0 ;
lv2:maximum 3 ; lv2:maximum 2 ;
lv2:portProperty lv2:enumeration, lv2:integer ; lv2:portProperty lv2:enumeration, lv2:integer ;
lv2:scalePoint [ lv2:scalePoint [
rdf:value 1 ; rdf:value 1 ;
@ -78,7 +79,7 @@
rdfs:label "OPL" ; rdfs:label "OPL" ;
rdfs:comment "Engine OPL" ; rdfs:comment "Engine OPL" ;
], [ ], [
rdf:value 3 ; rdf:value 0 ;
rdfs:label "MSFA" ; rdfs:label "MSFA" ;
rdfs:comment "Engine MSFA" ; rdfs:comment "Engine MSFA" ;
]; ];
@ -1547,3 +1548,162 @@
doap:name "Dexed" ; doap:name "Dexed" ;
doap:maintainer [ foaf:name "dcoredump" ] . doap:maintainer [ foaf:name "dcoredump" ] .
<https://github.com/dcoredump/dexed.lv2/presets#BRASS____1>
a pset:Preset ;
lv2:appliesTo <https://github.com/dcoredump/dexed.lv2> ;
rdfs:seeAlso <presets.ttl> .
<https://github.com/dcoredump/dexed.lv2/presets#BRASS____2>
a pset:Preset ;
lv2:appliesTo <https://github.com/dcoredump/dexed.lv2> ;
rdfs:seeAlso <presets.ttl> .
<https://github.com/dcoredump/dexed.lv2/presets#BRASS___3>
a pset:Preset ;
lv2:appliesTo <https://github.com/dcoredump/dexed.lv2> ;
rdfs:seeAlso <presets.ttl> .
<https://github.com/dcoredump/dexed.lv2/presets#STRINGS_1>
a pset:Preset ;
lv2:appliesTo <https://github.com/dcoredump/dexed.lv2> ;
rdfs:seeAlso <presets.ttl> .
<https://github.com/dcoredump/dexed.lv2/presets#STRINGS_2>
a pset:Preset ;
lv2:appliesTo <https://github.com/dcoredump/dexed.lv2> ;
rdfs:seeAlso <presets.ttl> .
<https://github.com/dcoredump/dexed.lv2/presets#STRINGS_3>
a pset:Preset ;
lv2:appliesTo <https://github.com/dcoredump/dexed.lv2> ;
rdfs:seeAlso <presets.ttl> .
<https://github.com/dcoredump/dexed.lv2/presets#ORCHESTRA>
a pset:Preset ;
lv2:appliesTo <https://github.com/dcoredump/dexed.lv2> ;
rdfs:seeAlso <presets.ttl> .
<https://github.com/dcoredump/dexed.lv2/presets#PIANO___1>
a pset:Preset ;
lv2:appliesTo <https://github.com/dcoredump/dexed.lv2> ;
rdfs:seeAlso <presets.ttl> .
<https://github.com/dcoredump/dexed.lv2/presets#PIANO___2>
a pset:Preset ;
lv2:appliesTo <https://github.com/dcoredump/dexed.lv2> ;
rdfs:seeAlso <presets.ttl> .
<https://github.com/dcoredump/dexed.lv2/presets#PIANO___3>
a pset:Preset ;
lv2:appliesTo <https://github.com/dcoredump/dexed.lv2> ;
rdfs:seeAlso <presets.ttl> .
<https://github.com/dcoredump/dexed.lv2/presets#E.PIANO_1>
a pset:Preset ;
lv2:appliesTo <https://github.com/dcoredump/dexed.lv2> ;
rdfs:seeAlso <presets.ttl> .
<https://github.com/dcoredump/dexed.lv2/presets#GUITAR__1>
a pset:Preset ;
lv2:appliesTo <https://github.com/dcoredump/dexed.lv2> ;
rdfs:seeAlso <presets.ttl> .
<https://github.com/dcoredump/dexed.lv2/presets#GUITAR__2>
a pset:Preset ;
lv2:appliesTo <https://github.com/dcoredump/dexed.lv2> ;
rdfs:seeAlso <presets.ttl> .
<https://github.com/dcoredump/dexed.lv2/presets#SYN_LEAD_1>
a pset:Preset ;
lv2:appliesTo <https://github.com/dcoredump/dexed.lv2> ;
rdfs:seeAlso <presets.ttl> .
<https://github.com/dcoredump/dexed.lv2/presets#BASS____1>
a pset:Preset ;
lv2:appliesTo <https://github.com/dcoredump/dexed.lv2> ;
rdfs:seeAlso <presets.ttl> .
<https://github.com/dcoredump/dexed.lv2/presets#BASS____2>
a pset:Preset ;
lv2:appliesTo <https://github.com/dcoredump/dexed.lv2> ;
rdfs:seeAlso <presets.ttl> .
<https://github.com/dcoredump/dexed.lv2/presets#E.ORGAN_1>
a pset:Preset ;
lv2:appliesTo <https://github.com/dcoredump/dexed.lv2> ;
rdfs:seeAlso <presets.ttl> .
<https://github.com/dcoredump/dexed.lv2/presets#PIPES___1>
a pset:Preset ;
lv2:appliesTo <https://github.com/dcoredump/dexed.lv2> ;
rdfs:seeAlso <presets.ttl> .
<https://github.com/dcoredump/dexed.lv2/presets#HARPSICH_1>
a pset:Preset ;
lv2:appliesTo <https://github.com/dcoredump/dexed.lv2> ;
rdfs:seeAlso <presets.ttl> .
<https://github.com/dcoredump/dexed.lv2/presets#CLAV____1>
a pset:Preset ;
lv2:appliesTo <https://github.com/dcoredump/dexed.lv2> ;
rdfs:seeAlso <presets.ttl> .
<https://github.com/dcoredump/dexed.lv2/presets#VIBE____1>
a pset:Preset ;
lv2:appliesTo <https://github.com/dcoredump/dexed.lv2> ;
rdfs:seeAlso <presets.ttl> .
<https://github.com/dcoredump/dexed.lv2/presets#MARIMBA>
a pset:Preset ;
lv2:appliesTo <https://github.com/dcoredump/dexed.lv2> ;
rdfs:seeAlso <presets.ttl> .
<https://github.com/dcoredump/dexed.lv2/presets#KOTO>
a pset:Preset ;
lv2:appliesTo <https://github.com/dcoredump/dexed.lv2> ;
rdfs:seeAlso <presets.ttl> .
<https://github.com/dcoredump/dexed.lv2/presets#FLUTE___1>
a pset:Preset ;
lv2:appliesTo <https://github.com/dcoredump/dexed.lv2> ;
rdfs:seeAlso <presets.ttl> .
<https://github.com/dcoredump/dexed.lv2/presets#ORCH_CHIME>
a pset:Preset ;
lv2:appliesTo <https://github.com/dcoredump/dexed.lv2> ;
rdfs:seeAlso <presets.ttl> .
<https://github.com/dcoredump/dexed.lv2/presets#TUB_BELLS>
a pset:Preset ;
lv2:appliesTo <https://github.com/dcoredump/dexed.lv2> ;
rdfs:seeAlso <presets.ttl> .
<https://github.com/dcoredump/dexed.lv2/presets#STEEL_DRUM>
a pset:Preset ;
lv2:appliesTo <https://github.com/dcoredump/dexed.lv2> ;
rdfs:seeAlso <presets.ttl> .
<https://github.com/dcoredump/dexed.lv2/presets#TIMPANI>
a pset:Preset ;
lv2:appliesTo <https://github.com/dcoredump/dexed.lv2> ;
rdfs:seeAlso <presets.ttl> .
<https://github.com/dcoredump/dexed.lv2/presets#REFS_WHISL>
a pset:Preset ;
lv2:appliesTo <https://github.com/dcoredump/dexed.lv2> ;
rdfs:seeAlso <presets.ttl> .
<https://github.com/dcoredump/dexed.lv2/presets#VOICE___1>
a pset:Preset ;
lv2:appliesTo <https://github.com/dcoredump/dexed.lv2> ;
rdfs:seeAlso <presets.ttl> .
<https://github.com/dcoredump/dexed.lv2/presets#TRAIN>
a pset:Preset ;
lv2:appliesTo <https://github.com/dcoredump/dexed.lv2> ;
rdfs:seeAlso <presets.ttl> .
<https://github.com/dcoredump/dexed.lv2/presets#TAKE_OFF>
a pset:Preset ;
lv2:appliesTo <https://github.com/dcoredump/dexed.lv2> ;
rdfs:seeAlso <presets.ttl> .

@ -57,7 +57,7 @@ install: $(BUNDLE)
rm -rf ${HOME}/.lv2/$(BUNDLE) rm -rf ${HOME}/.lv2/$(BUNDLE)
cp -R $(BUNDLE) $(INSTALL_DIR) cp -R $(BUNDLE) $(INSTALL_DIR)
$(BUNDLE): manifest.ttl Dexed.ttl dexed.so $(BUNDLE): manifest.ttl Dexed.ttl presets.ttl dexed.so
rm -rf $(BUNDLE) rm -rf $(BUNDLE)
mkdir $(BUNDLE) mkdir $(BUNDLE)
cp $^ $(BUNDLE) cp $^ $(BUNDLE)

@ -76,9 +76,9 @@ void Dexed::set_params(void)
setMonoMode(bool(*p(p_unisono))); setMonoMode(bool(*p(p_unisono)));
// Dexed-Engine // Dexed-Engine
if(controllers.core==NULL || getEngineType()!=uint8_t(*p(p_engine))-1) if(controllers.core==NULL || getEngineType()!=uint8_t(*p(p_engine)))
{ {
setEngineType(uint8_t(*p(p_engine))-1); setEngineType(uint8_t(*p(p_engine)));
refreshVoice=true; refreshVoice=true;
} }
@ -360,7 +360,7 @@ void Dexed::GetSamples(uint32_t n_samples, float* buffer)
int32_t val = audiobuf.get()[j]; int32_t val = audiobuf.get()[j];
val = val >> 4; val = val >> 4;
int32_t clip_val = val < -(1 << 24) ? 0x8000 : val >= (1 << 24) ? 0x7fff : val >> 9; int32_t clip_val = val < -(1 << 24) ? 0x8000 : val >= (1 << 24) ? 0x7fff : val >> 9;
float f = float(clip_val) / float(0x8000); float f = static_cast<float>(clip_val) / float(0x8000);
if(f>1.0) if(f>1.0)
f=1.0; f=1.0;
if(f<-1.0) if(f<-1.0)
@ -413,9 +413,11 @@ void Dexed::ProcessMidiMessage(const uint8_t *buf, uint32_t buf_size) {
switch(cmd & 0xf0) { switch(cmd & 0xf0) {
case 0x80 : case 0x80 :
keyup(buf[1]); keyup(buf[1]);
return;
break; break;
case 0x90 : case 0x90 :
keydown(buf[1], buf[2]); keydown(buf[1], buf[2]);
return;
break; break;
case 0xb0 : { case 0xb0 : {
uint8_t ctrl = buf[1]; uint8_t ctrl = buf[1];
@ -425,14 +427,17 @@ void Dexed::ProcessMidiMessage(const uint8_t *buf, uint32_t buf_size) {
case 1: case 1:
controllers.modwheel_cc = value; controllers.modwheel_cc = value;
controllers.refresh(); controllers.refresh();
return;
break; break;
case 2: case 2:
controllers.breath_cc = value; controllers.breath_cc = value;
controllers.refresh(); controllers.refresh();
return;
break; break;
case 4: case 4:
controllers.foot_cc = value; controllers.foot_cc = value;
controllers.refresh(); controllers.refresh();
return;
break; break;
case 64: case 64:
sustain = value > 63; sustain = value > 63;
@ -444,6 +449,7 @@ void Dexed::ProcessMidiMessage(const uint8_t *buf, uint32_t buf_size) {
} }
} }
} }
return;
break; break;
} }
break; break;
@ -451,17 +457,20 @@ void Dexed::ProcessMidiMessage(const uint8_t *buf, uint32_t buf_size) {
case 0xc0 : case 0xc0 :
//setCurrentProgram(buf[1]); //setCurrentProgram(buf[1]);
return;
break; break;
// aftertouch // aftertouch
case 0xd0 : case 0xd0 :
controllers.aftertouch_cc = buf[1]; controllers.aftertouch_cc = buf[1];
controllers.refresh(); controllers.refresh();
return;
break; break;
} }
switch (cmd) { switch (cmd) {
case 0xe0 : case 0xe0 :
controllers.values_[kControllerPitch] = buf[1] | (buf[2] << 7); controllers.values_[kControllerPitch] = buf[1] | (buf[2] << 7);
return;
break; break;
} }
@ -592,14 +601,17 @@ void Dexed::setEngineType(uint8_t tp) {
panic(); panic();
switch (tp) { switch (tp) {
case DEXED_ENGINE_MARKI: case DEXED_ENGINE_MARKI:
TRACE("DEXED_ENGINE_MARKI:%d",DEXED_ENGINE_MARKI);
controllers.core = &engineMkI; controllers.core = &engineMkI;
feedback_bitdepth = 11; feedback_bitdepth = 11;
break; break;
case DEXED_ENGINE_OPL: case DEXED_ENGINE_OPL:
TRACE("DEXED_ENGINE_OPL:%d",DEXED_ENGINE_OPL);
controllers.core = &engineOpl; controllers.core = &engineOpl;
feedback_bitdepth = 11; feedback_bitdepth = 11;
break; break;
default: default:
TRACE("DEXED_ENGINE_MODERN:%d",DEXED_ENGINE_MODERN);
controllers.core = &engineMsfa; controllers.core = &engineMsfa;
feedback_bitdepth = 8; feedback_bitdepth = 8;
break; break;
@ -665,7 +677,9 @@ void Dexed::init(double rate)
controllers.breath_cc = 0; controllers.breath_cc = 0;
controllers.aftertouch_cc = 0; controllers.aftertouch_cc = 0;
//setEngineType(DEXED_ENGINE_MARKI); engineType=0xff;
setEngineType(DEXED_ENGINE_MARKI);
setMonoMode(false); setMonoMode(false);
sustain = false; sustain = false;

@ -1,5 +1,7 @@
add https://github.com/dcoredump/dexed.lv2 0 add https://github.com/dcoredump/dexed.lv2 0
add http://gareus.org/oss/lv2/stepseq#s8n8 1 add http://gareus.org/oss/lv2/stepseq#s8n8 1
add http://gareus.org/oss/lv2/modmeter 2
connect effect_0:audio_out effect_2:in
connect effect_1:midiout effect_0:midi_in connect effect_1:midiout effect_0:midi_in
connect effect_0:audio_out system:playback_1 connect effect_0:audio_out system:playback_1
connect effect_0:audio_out system:playback_2 connect effect_0:audio_out system:playback_2

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save