Added modgui.

Some fixes... T&E.
pull/1/head
Holger Wirtz 8 years ago
parent bf05154a7f
commit 53d9be423f
  1. 2
      src/Makefile
  2. 641
      src/dexed.cpp.msfa
  3. 2
      src/dexed.h
  4. 34
      src/manifest.ttl
  5. 49
      src/modgui/icon-dexed.html
  6. BIN
      src/modgui/knobs/japanese/racing.png
  7. BIN
      src/modgui/pedals/japanese/black.png
  8. BIN
      src/modgui/screenshot-dexed.png
  9. 283
      src/modgui/stylesheet-dexed.css
  10. BIN
      src/modgui/thumbnail-dexed.png

@ -61,7 +61,7 @@ $(BUNDLE): manifest.ttl Dexed.ttl dexed.so
rm -rf $(BUNDLE)
mkdir $(BUNDLE)
cp $^ $(BUNDLE)
# cp -R modgui $(BUNDLE)
cp -R modgui $(BUNDLE)
dexed.so: $(OBJ) dexed.o
$(CXX) $(CXXFLAGS) -shared dexed.o $(OBJ) $(LDFLAGS) -o dexed.so

@ -1,641 +0,0 @@
// from: http://ll-plugins.nongnu.org/lv2pftci/#A_synth
#include <lvtk/synth.hpp>
#include "dexed.peg"
#include "dexed.h"
#include "EngineMkI.h"
#include "EngineOpl.h"
#include "msfa/exp2.h"
#include "msfa/sin.h"
#include "msfa/freqlut.h"
#include "msfa/controllers.h"
#include "msfa/ringbuffer.h"
#include "PluginFx.h"
#include <string.h>
Dexed::Dexed(double rate) : lvtk::Synth<DexedVoice, Dexed>(p_n_ports, p_midi_in)
{
TRACE("Hi");
bufsize_=256;
outbuf16_=new int16_t[bufsize_];
Exp2::init();
Tanh::init();
Sin::init();
lastStateSave = 0;
currentNote = -1;
engineType = -1;
monoMode = 0;
normalizeDxVelocity = false;
memset(&voiceStatus, 0, sizeof(VoiceStatus));
setEngineType(DEXED_ENGINE_MARKI);
Freqlut::init(rate);
Lfo::init(rate);
PitchEnv::init(rate);
Env::init_sr(rate);
fx.init(rate);
for (int note = 0; note < MAX_ACTIVE_NOTES; ++note) {
voices[note].dx7_note = new Dx7Note;
voices[note].keydown = false;
voices[note].sustained = false;
voices[note].live = false;
}
currentNote = 0;
controllers.values_[kControllerPitch] = 0x2000;
controllers.modwheel_cc = 0;
controllers.foot_cc = 0;
controllers.breath_cc = 0;
controllers.aftertouch_cc = 0;
sustain = false;
lfo.reset(data + 137);
add_voices(new DexedVoice(rate));
add_audio_outputs(p_audio_out);
TRACE("Bye");
}
Dexed::~Dexed()
{
TRACE("Hi");
delete [] outbuf16_;
currentNote = -1;
for (int note = 0; note < MAX_ACTIVE_NOTES; ++note) {
if ( voices[note].dx7_note != NULL ) {
delete voices[note].dx7_note;
voices[note].dx7_note = NULL;
}
voices[note].keydown = false;
voices[note].sustained = false;
voices[note].live = false;
}
TRACE("Bye");
}
void Dexed::set_params(void)
{
TRACE("Hi");
refreshVoice=true;
// Dexed-Filter
fx.uiCutoff=*p(p_cutoff);
fx.uiReso=*p(p_resonance);
fx.uiGain=*p(p_output);
// OP6
onParam(0,static_cast<char>(*p(p_op6_eg_rate_1)));
onParam(1,static_cast<char>(*p(p_op6_eg_rate_2)));
onParam(2,static_cast<char>(*p(p_op6_eg_rate_3)));
onParam(3,static_cast<char>(*p(p_op6_eg_rate_4)));
onParam(4,static_cast<char>(*p(p_op6_eg_level_1)));
onParam(5,static_cast<char>(*p(p_op6_eg_level_2)));
onParam(6,static_cast<char>(*p(p_op6_eg_level_3)));
onParam(7,static_cast<char>(*p(p_op6_eg_level_4)));
onParam(8,static_cast<char>(*p(p_op6_kbd_lev_scl_brk_pt)));
onParam(9,static_cast<char>(*p(p_op6_kbd_lev_scl_lft_depth)));
onParam(10,static_cast<char>(*p(p_op6_kbd_lev_scl_rht_depth)));
onParam(11,static_cast<char>(*p(p_op6_kbd_lev_scl_lft_curve)));
onParam(12,static_cast<char>(*p(p_op6_kbd_lev_scl_rht_curve)));
onParam(13,static_cast<char>(*p(p_op6_kbd_rate_scaling)));
onParam(14,static_cast<char>(*p(p_op6_amp_mod_sensitivity)));
onParam(15,static_cast<char>(*p(p_op6_key_vel_sensitivity)));
onParam(16,static_cast<char>(*p(p_op6_operator_output_level)));
onParam(17,static_cast<char>(*p(p_op6_osc_mode)));
onParam(18,static_cast<char>(*p(p_op6_osc_freq_coarse)));
onParam(19,static_cast<char>(*p(p_op6_osc_freq_fine)));
onParam(20,static_cast<char>(*p(p_op6_osc_detune)+7));
// OP5
onParam(21,static_cast<char>(*p(p_op5_eg_rate_1)));
onParam(22,static_cast<char>(*p(p_op5_eg_rate_2)));
onParam(23,static_cast<char>(*p(p_op5_eg_rate_3)));
onParam(24,static_cast<char>(*p(p_op5_eg_rate_4)));
onParam(25,static_cast<char>(*p(p_op5_eg_level_1)));
onParam(26,static_cast<char>(*p(p_op5_eg_level_2)));
onParam(27,static_cast<char>(*p(p_op5_eg_level_3)));
onParam(28,static_cast<char>(*p(p_op5_eg_level_4)));
onParam(29,static_cast<char>(*p(p_op5_kbd_lev_scl_brk_pt)));
onParam(30,static_cast<char>(*p(p_op5_kbd_lev_scl_lft_depth)));
onParam(31,static_cast<char>(*p(p_op5_kbd_lev_scl_rht_depth)));
onParam(32,static_cast<char>(*p(p_op5_kbd_lev_scl_lft_curve)));
onParam(33,static_cast<char>(*p(p_op5_kbd_lev_scl_rht_curve)));
onParam(34,static_cast<char>(*p(p_op5_kbd_rate_scaling)));
onParam(35,static_cast<char>(*p(p_op5_amp_mod_sensitivity)));
onParam(36,static_cast<char>(*p(p_op5_key_vel_sensitivity)));
onParam(37,static_cast<char>(*p(p_op5_operator_output_level)));
onParam(38,static_cast<char>(*p(p_op5_osc_mode)));
onParam(39,static_cast<char>(*p(p_op5_osc_freq_coarse)));
onParam(40,static_cast<char>(*p(p_op5_osc_freq_fine)));
onParam(41,static_cast<char>(*p(p_op5_osc_detune)+7));
// OP4
onParam(42,static_cast<char>(*p(p_op4_eg_rate_1)));
onParam(43,static_cast<char>(*p(p_op4_eg_rate_2)));
onParam(44,static_cast<char>(*p(p_op4_eg_rate_3)));
onParam(45,static_cast<char>(*p(p_op4_eg_rate_4)));
onParam(46,static_cast<char>(*p(p_op4_eg_level_1)));
onParam(47,static_cast<char>(*p(p_op4_eg_level_2)));
onParam(48,static_cast<char>(*p(p_op4_eg_level_3)));
onParam(49,static_cast<char>(*p(p_op4_eg_level_4)));
onParam(50,static_cast<char>(*p(p_op4_kbd_lev_scl_brk_pt)));
onParam(51,static_cast<char>(*p(p_op4_kbd_lev_scl_lft_depth)));
onParam(52,static_cast<char>(*p(p_op4_kbd_lev_scl_rht_depth)));
onParam(53,static_cast<char>(*p(p_op4_kbd_lev_scl_lft_curve)));
onParam(54,static_cast<char>(*p(p_op4_kbd_lev_scl_rht_curve)));
onParam(55,static_cast<char>(*p(p_op4_kbd_rate_scaling)));
onParam(56,static_cast<char>(*p(p_op4_amp_mod_sensitivity)));
onParam(57,static_cast<char>(*p(p_op4_key_vel_sensitivity)));
onParam(58,static_cast<char>(*p(p_op4_operator_output_level)));
onParam(59,static_cast<char>(*p(p_op4_osc_mode)));
onParam(60,static_cast<char>(*p(p_op4_osc_freq_coarse)));
onParam(61,static_cast<char>(*p(p_op4_osc_freq_fine)));
onParam(62,static_cast<char>(*p(p_op4_osc_detune)+7));
// OP3
onParam(63,static_cast<char>(*p(p_op3_eg_rate_1)));
onParam(64,static_cast<char>(*p(p_op3_eg_rate_2)));
onParam(65,static_cast<char>(*p(p_op3_eg_rate_3)));
onParam(66,static_cast<char>(*p(p_op3_eg_rate_4)));
onParam(67,static_cast<char>(*p(p_op3_eg_level_1)));
onParam(68,static_cast<char>(*p(p_op3_eg_level_2)));
onParam(69,static_cast<char>(*p(p_op3_eg_level_3)));
onParam(70,static_cast<char>(*p(p_op3_eg_level_4)));
onParam(71,static_cast<char>(*p(p_op3_kbd_lev_scl_brk_pt)));
onParam(72,static_cast<char>(*p(p_op3_kbd_lev_scl_lft_depth)));
onParam(73,static_cast<char>(*p(p_op3_kbd_lev_scl_rht_depth)));
onParam(74,static_cast<char>(*p(p_op3_kbd_lev_scl_lft_curve)));
onParam(75,static_cast<char>(*p(p_op3_kbd_lev_scl_rht_curve)));
onParam(76,static_cast<char>(*p(p_op3_kbd_rate_scaling)));
onParam(77,static_cast<char>(*p(p_op3_amp_mod_sensitivity)));
onParam(78,static_cast<char>(*p(p_op3_key_vel_sensitivity)));
onParam(79,static_cast<char>(*p(p_op3_operator_output_level)));
onParam(80,static_cast<char>(*p(p_op3_osc_mode)));
onParam(81,static_cast<char>(*p(p_op3_osc_freq_coarse)));
onParam(82,static_cast<char>(*p(p_op3_osc_freq_fine)));
onParam(83,static_cast<char>(*p(p_op3_osc_detune)+7));
// OP2
onParam(84,static_cast<char>(*p(p_op2_eg_rate_1)));
onParam(85,static_cast<char>(*p(p_op2_eg_rate_2)));
onParam(86,static_cast<char>(*p(p_op2_eg_rate_3)));
onParam(87,static_cast<char>(*p(p_op2_eg_rate_4)));
onParam(88,static_cast<char>(*p(p_op2_eg_level_1)));
onParam(89,static_cast<char>(*p(p_op2_eg_level_2)));
onParam(90,static_cast<char>(*p(p_op2_eg_level_3)));
onParam(91,static_cast<char>(*p(p_op2_eg_level_4)));
onParam(92,static_cast<char>(*p(p_op2_kbd_lev_scl_brk_pt)));
onParam(93,static_cast<char>(*p(p_op2_kbd_lev_scl_lft_depth)));
onParam(94,static_cast<char>(*p(p_op2_kbd_lev_scl_rht_depth)));
onParam(95,static_cast<char>(*p(p_op2_kbd_lev_scl_lft_curve)));
onParam(96,static_cast<char>(*p(p_op2_kbd_lev_scl_rht_curve)));
onParam(97,static_cast<char>(*p(p_op2_kbd_rate_scaling)));
onParam(98,static_cast<char>(*p(p_op2_amp_mod_sensitivity)));
onParam(99,static_cast<char>(*p(p_op2_key_vel_sensitivity)));
onParam(100,static_cast<char>(*p(p_op2_operator_output_level)));
onParam(101,static_cast<char>(*p(p_op2_osc_mode)));
onParam(102,static_cast<char>(*p(p_op2_osc_freq_coarse)));
onParam(103,static_cast<char>(*p(p_op2_osc_freq_fine)));
onParam(104,static_cast<char>(*p(p_op2_osc_detune)+7));
// OP1
onParam(105,static_cast<char>(*p(p_op1_eg_rate_1)));
onParam(106,static_cast<char>(*p(p_op1_eg_rate_2)));
onParam(107,static_cast<char>(*p(p_op1_eg_rate_3)));
onParam(108,static_cast<char>(*p(p_op1_eg_rate_4)));
onParam(109,static_cast<char>(*p(p_op1_eg_level_1)));
onParam(110,static_cast<char>(*p(p_op1_eg_level_2)));
onParam(111,static_cast<char>(*p(p_op1_eg_level_3)));
onParam(112,static_cast<char>(*p(p_op1_eg_level_4)));
onParam(113,static_cast<char>(*p(p_op1_kbd_lev_scl_brk_pt)));
onParam(114,static_cast<char>(*p(p_op1_kbd_lev_scl_lft_depth)));
onParam(115,static_cast<char>(*p(p_op1_kbd_lev_scl_rht_depth)));
onParam(116,static_cast<char>(*p(p_op1_kbd_lev_scl_lft_curve)));
onParam(117,static_cast<char>(*p(p_op1_kbd_lev_scl_rht_curve)));
onParam(118,static_cast<char>(*p(p_op1_kbd_rate_scaling)));
onParam(119,static_cast<char>(*p(p_op1_amp_mod_sensitivity)));
onParam(120,static_cast<char>(*p(p_op1_key_vel_sensitivity)));
onParam(121,static_cast<char>(*p(p_op1_operator_output_level)));
onParam(122,static_cast<char>(*p(p_op1_osc_mode)));
onParam(123,static_cast<char>(*p(p_op1_osc_freq_coarse)));
onParam(124,static_cast<char>(*p(p_op1_osc_freq_fine)));
onParam(125,static_cast<char>(*p(p_op1_osc_detune)+7));
// Global for all OPs
onParam(126,static_cast<char>(*p(p_pitch_eg_rate_1)));
onParam(127,static_cast<char>(*p(p_pitch_eg_rate_2)));
onParam(128,static_cast<char>(*p(p_pitch_eg_rate_3)));
onParam(129,static_cast<char>(*p(p_pitch_eg_rate_4)));
onParam(130,static_cast<char>(*p(p_pitch_eg_level_1)));
onParam(131,static_cast<char>(*p(p_pitch_eg_level_2)));
onParam(132,static_cast<char>(*p(p_pitch_eg_level_3)));
onParam(133,static_cast<char>(*p(p_pitch_eg_level_4)));
onParam(134,static_cast<char>(*p(p_algorithm_num)-1));
onParam(135,static_cast<char>(*p(p_feedback)));
onParam(136,static_cast<char>(*p(p_oscillator_sync)));
onParam(137,static_cast<char>(*p(p_lfo_speed)));
onParam(138,static_cast<char>(*p(p_lfo_delay)));
onParam(139,static_cast<char>(*p(p_lfo_pitch_mod_depth)));
onParam(140,static_cast<char>(*p(p_lfo_amp_mod_depth)));
onParam(141,static_cast<char>(*p(p_lfo_sync)));
onParam(142,static_cast<char>(*p(p_lfo_waveform)));
onParam(143,static_cast<char>(*p(p_pitch_mod_sensitivity)));
onParam(144,static_cast<char>(*p(p_transpose)));
// 10 bytes (145-154) are the name of the patch
onParam(155,0x3f); // operator on/off => All OPs on
TRACE("Bye");
}
// override the run() method
void Dexed::run (uint32_t sample_count)
{
const LV2_Atom_Sequence* seq = p<LV2_Atom_Sequence> (p_midi_in);
float* output = p(p_audio_out);
uint32_t last_frame = 0, num_this_time = 0;
for (LV2_Atom_Event* ev = lv2_atom_sequence_begin (&seq->body);
!lv2_atom_sequence_is_end(&seq->body, seq->atom.size, ev);
ev = lv2_atom_sequence_next (ev))
{
num_this_time = ev->time.frames - last_frame;
// If it's midi, send it to the engine
if (ev->body.type == m_midi_type)
{
set_params(); // pre_process: copy actual voice params
ring_buffer_.Write ((uint8_t*) LV2_ATOM_BODY (&ev->body), ev->body.size);
#ifdef DEBUG
for(uint i=0;i<ev->body.size;i++)
{
TRACE("midi msg %d: %d\n",i,((uint8_t*)LV2_ATOM_BODY(&ev->body))[i]);
}
#endif
}
// render audio from the last frame until the timestamp of this event
GetSamples (num_this_time, outbuf16_);
// i is the index of the engine's buf, which always starts at 0 (i think)
// j is the index of the plugin's float output buffer which will be the timestamp
// of the last processed atom event.
for (uint32_t i = 0, j = last_frame; i < num_this_time; ++i, ++j)
//output[j] = (static_cast<float> (outbuf16_[i])) * *p(p_output);
output[j] = (static_cast<float> (outbuf16_[i]));
last_frame = ev->time.frames;
}
// render remaining samples if any left
if (last_frame < sample_count)
{
// do the same thing as above except from last frame until the end of
// the processing cycles last sample. at this point, all events have
// already been handled.
num_this_time = sample_count - last_frame;
GetSamples (num_this_time, outbuf16_);
for (uint32_t i = 0, j = last_frame; i < num_this_time; ++i, ++j)
//output[j] = (static_cast<float> (outbuf16_[i])) * *p(p_output);
output[j] = (static_cast<float> (outbuf16_[i]));
}
fx.process(output, sample_count);
}
void Dexed::GetSamples(int n_samples, int16_t *buffer)
{
size_t input_offset;
TransferInput();
for (input_offset = 0; input_offset < input_buffer_index_; ) {
int bytes_available = input_buffer_index_ - input_offset;
int bytes_consumed = ProcessMidiMessage(input_buffer_ + input_offset, bytes_available);
if (bytes_consumed == 0) {
break;
}
input_offset += bytes_consumed;
}
ConsumeInput(input_offset);
int i;
if ( refreshVoice ) {
for(i=0;i < MAX_ACTIVE_NOTES;i++) {
if ( voices[i].live )
voices[i].dx7_note->update(data, voices[i].midi_note, feedback_bitdepth);
}
lfo.reset(data + 137);
refreshVoice = false;
}
// flush first events
for (i=0; i < n_samples && i < extra_buf_size_; i++) {
buffer[i] = extra_buf_[i];
}
// remaining buffer is still to be processed
if (extra_buf_size_ > n_samples) {
for (int j = 0; j < extra_buf_size_ - n_samples; j++) {
extra_buf_[j] = extra_buf_[j + n_samples];
}
extra_buf_size_ -= n_samples;
}
else
{
for (; i < n_samples; i += N) {
AlignedBuf<int32_t, N> audiobuf;
for (int j = 0; j < N; ++j) {
audiobuf.get()[j] = 0;
}
int32_t lfovalue = lfo.getsample();
int32_t lfodelay = lfo.getdelay();
for (int note = 0; note < MAX_ACTIVE_NOTES; ++note) {
if (voices[note].live) {
voices[note].dx7_note->compute(audiobuf.get(), lfovalue, lfodelay, &controllers);
int jmax = n_samples - i;
for (int j = 0; j < N; ++j) {
int32_t val = audiobuf.get()[j] >> 4;
int clip_val = val < -(1 << 24) ? 0x8000 : val >= (1 << 24) ? 0x7fff : val >> 9;
// TODO: maybe some dithering?
if (j < jmax) {
buffer[i + j] = clip_val;
} else {
extra_buf_[j - jmax] = clip_val;
}
}
}
}
}
}
extra_buf_size_ = i - n_samples;
}
//void Dexed::processMidiMessage(const MidiMessage *msg) {
int Dexed::ProcessMidiMessage(const uint8_t *buf, int buf_size) {
uint8_t cmd = buf[0];
switch(cmd & 0xf0) {
case 0x80 :
keyup(buf[1]);
return(3);
case 0x90 :
keydown(buf[1], buf[2]);
return(3);
case 0xb0 : {
int ctrl = buf[1];
int value = buf[2];
switch(ctrl) {
case 1:
controllers.modwheel_cc = value;
controllers.refresh();
break;
case 2:
controllers.breath_cc = value;
controllers.refresh();
break;
case 4:
controllers.foot_cc = value;
controllers.refresh();
break;
case 64:
sustain = value > 63;
if (!sustain) {
for (int note = 0; note < MAX_ACTIVE_NOTES; note++) {
if (voices[note].sustained && !voices[note].keydown) {
voices[note].dx7_note->keyup();
voices[note].sustained = false;
}
}
}
break;
}
}
return(3);
case 0xc0 :
//setCurrentProgram(buf[1]);
return(3);
// aftertouch
case 0xd0 :
controllers.aftertouch_cc = buf[1];
controllers.refresh();
return(3);
}
switch (cmd) {
case 0xe0 :
controllers.values_[kControllerPitch] = buf[1] | (buf[2] << 7);
return(3);
break;
}
return(3);
}
void Dexed::TransferInput() {
size_t bytes_available = ring_buffer_.BytesAvailable();
int bytes_to_read = min(bytes_available,
sizeof(input_buffer_) - input_buffer_index_);
if (bytes_to_read > 0) {
ring_buffer_.Read(bytes_to_read, input_buffer_ + input_buffer_index_);
input_buffer_index_ += bytes_to_read;
}
}
void Dexed::ConsumeInput(size_t n_input_bytes) {
if (n_input_bytes < input_buffer_index_) {
memmove(input_buffer_, input_buffer_ + n_input_bytes,
input_buffer_index_ - n_input_bytes);
}
input_buffer_index_ -= n_input_bytes;
}
void Dexed::keydown(uint8_t pitch, uint8_t velo) {
TRACE("Hi");
TRACE("pitch=%d, velo=%d\n",pitch,velo);
if ( velo == 0 ) {
keyup(pitch);
return;
}
pitch += data[144] - 24;
if ( normalizeDxVelocity ) {
velo = ((float)velo) * 0.7874015; // 100/127
}
int note = currentNote;
for (int i=0; i<MAX_ACTIVE_NOTES; i++) {
if (!voices[note].keydown) {
currentNote = (note + 1) % MAX_ACTIVE_NOTES;
lfo.keydown(); // TODO: should only do this if # keys down was 0
voices[note].midi_note = pitch;
voices[note].sustained = sustain;
voices[note].keydown = true;
voices[note].dx7_note->init(data, pitch, velo, feedback_bitdepth);
if ( data[136] )
voices[note].dx7_note->oscSync();
break;
}
note = (note + 1) % MAX_ACTIVE_NOTES;
}
if ( monoMode ) {
for(int i=0; i<MAX_ACTIVE_NOTES; i++) {
if ( voices[i].live ) {
// all keys are up, only transfert signal
if ( ! voices[i].keydown ) {
voices[i].live = false;
voices[note].dx7_note->transferSignal(*voices[i].dx7_note);
break;
}
if ( voices[i].midi_note < pitch ) {
voices[i].live = false;
voices[note].dx7_note->transferState(*voices[i].dx7_note);
break;
}
return;
}
}
}
voices[note].live = true;
TRACE("Bye");
}
void Dexed::keyup(uint8_t pitch) {
TRACE("Hi");
TRACE("pitch=%d\n",pitch);
pitch += data[144] - 24;
int note;
for (note=0; note<MAX_ACTIVE_NOTES; ++note) {
if ( voices[note].midi_note == pitch && voices[note].keydown ) {
voices[note].keydown = false;
break;
}
}
// note not found ?
if ( note >= MAX_ACTIVE_NOTES ) {
TRACE("note-off not found???");
return;
}
if ( monoMode ) {
int highNote = -1;
int target = 0;
for (int i=0; i<MAX_ACTIVE_NOTES;i++) {
if ( voices[i].keydown && voices[i].midi_note > highNote ) {
target = i;
highNote = voices[i].midi_note;
}
}
if ( highNote != -1 ) {
voices[note].live = false;
voices[target].live = true;
voices[target].dx7_note->transferState(*voices[note].dx7_note);
}
}
if ( sustain ) {
voices[note].sustained = true;
} else {
voices[note].dx7_note->keyup();
}
TRACE("Bye");
}
void Dexed::onParam(int param_num,int param_val)
{
data[param_num]=param_val;
}
int Dexed::getEngineType() {
return engineType;
}
void Dexed::setEngineType(int tp) {
TRACE("settings engine %d", tp);
switch (tp) {
case DEXED_ENGINE_MARKI:
controllers.core = &engineMkI;
feedback_bitdepth = 11;
break;
case DEXED_ENGINE_OPL:
controllers.core = &engineOpl;
feedback_bitdepth = 11;
break;
default:
controllers.core = &engineMsfa;
feedback_bitdepth = 8;
break;
}
engineType = tp;
}
void Dexed::setMonoMode(bool mode) {
monoMode = mode;
}
//==============================================================================
DexedVoice::DexedVoice(double rate) : m_key(lvtk::INVALID_KEY), m_rate(rate)
{
TRACE("Hi");
TRACE("Bye");
}
DexedVoice::~DexedVoice()
{
TRACE("Hi");
TRACE("Bye");
}
void DexedVoice::on(unsigned char key, unsigned char velocity)
{
TRACE("Hi");
m_key = key;
TRACE("Bye");
}
void DexedVoice::off(unsigned char velocity)
{
TRACE("Hi");
m_key = lvtk::INVALID_KEY;
TRACE("Bye");
}
unsigned char DexedVoice::get_key(void) const
{
TRACE("Hi");
return m_key;
TRACE("Bye");
}
static int _ = Dexed::register_class(p_uri);

@ -55,7 +55,7 @@ enum DexedEngineResolution {
class DexedVoice : public lvtk::Voice
{
public:
DexedVoice(double rate);
explicit DexedVoice(double rate);
~DexedVoice();
void on(unsigned char key, unsigned char velocity);
void off(unsigned char velocity);

@ -5,8 +5,42 @@
@prefix mdap: <http://moddevices.com/plugins/mda/presets#> .
@prefix pset: <http://lv2plug.in/ns/ext/presets#> .
@prefix doap: <http://usefulinc.com/ns/doap#> .
@prefix modgui: <http://moddevices.com/ns/modgui#> .
<https://github.com/dcoredump/dexed.lv2>
a lv2:Plugin ;
doap:name "Dexed";
rdfs:seeAlso <Dexed.ttl> .
<https://github.com/dcoredump/dexed.lv2>
modgui:gui [
modgui:resourcesDirectory <modgui> ;
modgui:iconTemplate <modgui/icon-dexed.html> ;
modgui:stylesheet <modgui/stylesheet-dexed.css> ;
modgui:screenshot <modgui/screenshot-dexed.png> ;
modgui:thumbnail <modgui/thumbnail-dexed.png> ;
modgui:brand "dcoredump" ;
modgui:label "Dexed" ;
modgui:model "japanese" ;
modgui:panel "4-knobs" ;
modgui:color "black" ;
modgui:knob "racing" ;
modgui:port [
lv2:index 0 ;
lv2:symbol "output" ;
lv2:name "Output" ;
] , [
lv2:index 1 ;
lv2:symbol "engine" ;
lv2:name "Engine" ;
] , [
lv2:index 2 ;
lv2:symbol "cutoff" ;
lv2:name "Cutoff" ;
] , [
lv2:index 3 ;
lv2:symbol "resonance" ;
lv2:name "Resonance" ;
] ;
] .

@ -0,0 +1,49 @@
<div class="mod-pedal mod-pedal-japanese{{{cns}}} mod-four-knobs mod-{{color}} {{color}}">
<div mod-role="drag-handle" class="mod-drag-handle"></div>
<div class="mod-plugin-brand"><h1>{{brand}}</h1></div>
<div class="mod-plugin-name"><h1>{{label}}</h1></div>
<div class="mod-light on" mod-role="bypass-light"></div>
<div class="mod-control-group mod-{{knob}} clearfix">
{{#controls}}
<div class="mod-knob" title="{{comment}}">
<div class="mod-knob-image" mod-role="input-control-port" mod-port-symbol="{{symbol}}"></div>
<span class="mod-knob-title">{{name}}</span>
</div>
{{/controls}}
</div>
<div class="mod-footswitch" mod-role="bypass"></div>
<div class="mod-pedal-input">
{{#effect.ports.audio.input}}
<div class="mod-input mod-input-disconnected" title="{{name}}" mod-role="input-audio-port" mod-port-symbol="{{symbol}}">
<div class="mod-pedal-input-image"></div>
</div>
{{/effect.ports.audio.input}}
{{#effect.ports.midi.input}}
<div class="mod-input mod-input-disconnected" title="{{name}}" mod-role="input-midi-port" mod-port-symbol="{{symbol}}">
<div class="mod-pedal-input-image"></div>
</div>
{{/effect.ports.midi.input}}
{{#effect.ports.cv.input}}
<div class="mod-input mod-input-disconnected" title="{{name}}" mod-role="input-cv-port" mod-port-symbol="{{symbol}}">
<div class="mod-pedal-input-image"></div>
</div>
{{/effect.ports.cv.input}}
</div>
<div class="mod-pedal-output">
{{#effect.ports.audio.output}}
<div class="mod-output mod-output-disconnected" title="{{name}}" mod-role="output-audio-port" mod-port-symbol="{{symbol}}">
<div class="mod-pedal-output-image"></div>
</div>
{{/effect.ports.audio.output}}
{{#effect.ports.midi.output}}
<div class="mod-output mod-output-disconnected" title="{{name}}" mod-role="output-midi-port" mod-port-symbol="{{symbol}}">
<div class="mod-pedal-output-image"></div>
</div>
{{/effect.ports.midi.output}}
{{#effect.ports.cv.output}}
<div class="mod-output mod-output-disconnected" title="{{name}}" mod-role="output-cv-port" mod-port-symbol="{{symbol}}">
<div class="mod-pedal-output-image"></div>
</div>
{{/effect.ports.cv.output}}
</div>
</div>

Binary file not shown.

After

Width:  |  Height:  |  Size: 214 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 187 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 192 KiB

@ -0,0 +1,283 @@
/* STYLES FOR THE JAPANESE PEDAL */
@import url(/fonts/epf/stylesheet.css);
@import url(/fonts/nexa/stylesheet.css);
@import url(/fonts/pirulen/stylesheet.css);
@import url(/fonts/questrial/stylesheet.css);
/* = CONTAINER
================================================ */
.mod-pedal-japanese{{{cns}}} {
background-position:center center;
background-repeat:no-repeat;
height:530px;
position:absolute;
width:274px;
border-radius: 18px;
}
/* PORTS
================================================ */
.mod-pedal-japanese{{{cns}}}.mod-pedal .mod-pedal-input,
.mod-pedal-japanese{{{cns}}}.mod-pedal .mod-pedal-output {
top: 186px;
}
/* = PLUGIN'S AUTHOR
================================================ */
.mod-pedal-japanese{{{cns}}} .mod-plugin-brand {
bottom:95px;
left:30px;
position:absolute;
right:30px;
text-align:center;
text-transform:uppercase;
}
.mod-pedal-japanese{{{cns}}} .mod-plugin-brand h1 {
color:#292d31;
font-family:"Nexa";
font-size:32px;
text-shadow:1px 2px 2px rgba(0,0,0,.5),2px 4px 5px rgba(0,0,0,.5),0px 0px 8px rgba(0,0,0,.5), -1px -1px 1px rgba(255,255,255,.2);
}
/* = PLUGIN'S NAME
================================================ */
.mod-pedal-japanese{{{cns}}} .mod-plugin-name {
bottom:210px;
left:30px;
overflow:hidden;
position:absolute;
right:30px;
text-align:right;
top:230px;
}
.mod-pedal-japanese{{{cns}}} .mod-plugin-name h1 {
font-family:"Questrial";
font-size:24px;
line-height:1;
}
/* = LIGHT ON/OFF
================================================ */
.mod-pedal-japanese{{{cns}}} .mod-light {
height:32px;
left:121px;
position:absolute;
top:197px;
width:32px;
}
/* = FOOTSWITCH
================================================ */
.mod-pedal-japanese{{{cns}}} .mod-footswitch {
bottom:46px;
cursor:pointer;
height:155px;
left:13px;
position:absolute;
right:13px;
}
/* = BACKGROUND IMAGES - Colour of the pedal
================================================ */
.mod-pedal-japanese{{{cns}}}.mod-blue { background-image:url(/resources/pedals/japanese/blue.png{{{ns}}}); }
.mod-pedal-japanese{{{cns}}}.mod-brown { background-image:url(/resources/pedals/japanese/brown.png{{{ns}}}); }
.mod-pedal-japanese{{{cns}}}.mod-none { background-image:url(/resources/pedals/japanese/none.png{{{ns}}}); }
.mod-pedal-japanese{{{cns}}}.mod-gray { background-image:url(/resources/pedals/japanese/gray.png{{{ns}}}); }
.mod-pedal-japanese{{{cns}}}.mod-darkblue { background-image:url(/resources/pedals/japanese/darkblue.png{{{ns}}}); }
.mod-pedal-japanese{{{cns}}}.mod-purple { background-image:url(/resources/pedals/japanese/purple.png{{{ns}}}); }
.mod-pedal-japanese{{{cns}}}.mod-green { background-image:url(/resources/pedals/japanese/green.png{{{ns}}}); }
.mod-pedal-japanese{{{cns}}}.mod-yellow { background-image:url(/resources/pedals/japanese/yellow.png{{{ns}}}); }
.mod-pedal-japanese{{{cns}}}.mod-petrol { background-image:url(/resources/pedals/japanese/petrol.png{{{ns}}}); }
.mod-pedal-japanese{{{cns}}}.mod-pink { background-image:url(/resources/pedals/japanese/pink.png{{{ns}}}); }
.mod-pedal-japanese{{{cns}}}.mod-black { background-image:url(/resources/pedals/japanese/black.png{{{ns}}}); }
.mod-pedal-japanese{{{cns}}}.mod-orange { background-image:url(/resources/pedals/japanese/orange.png{{{ns}}}); }
.mod-pedal-japanese{{{cns}}}.mod-cyan { background-image:url(/resources/pedals/japanese/cyan.png{{{ns}}}); }
.mod-pedal-japanese{{{cns}}}.mod-white { background-image:url(/resources/pedals/japanese/white.png{{{ns}}}); }
.mod-pedal-japanese{{{cns}}}.mod-racing { background-image:url(/resources/pedals/japanese/racing.png{{{ns}}}); }
.mod-pedal-japanese{{{cns}}}.mod-red { background-image:url(/resources/pedals/japanese/red.png{{{ns}}}); }
.mod-pedal-japanese{{{cns}}}.mod-cream { background-image:url(/resources/pedals/japanese/cream.png{{{ns}}}); }
.mod-pedal-japanese{{{cns}}}.mod-blue .mod-enumerated,
.mod-pedal-japanese{{{cns}}}.mod-brown .mod-enumerated,
.mod-pedal-japanese{{{cns}}}.mod-none .mod-enumerated,
.mod-pedal-japanese{{{cns}}}.mod-gray .mod-enumerated,
.mod-pedal-japanese{{{cns}}}.mod-darkblue .mod-enumerated,
.mod-pedal-japanese{{{cns}}}.mod-purple .mod-enumerated,
.mod-pedal-japanese{{{cns}}}.mod-green .mod-enumerated,
.mod-pedal-japanese{{{cns}}}.mod-yellow .mod-enumerated,
.mod-pedal-japanese{{{cns}}}.mod-petrol .mod-enumerated,
.mod-pedal-japanese{{{cns}}}.mod-pink .mod-enumerated,
.mod-pedal-japanese{{{cns}}}.mod-black .mod-enumerated,
.mod-pedal-japanese{{{cns}}}.mod-orange .mod-enumerated,
.mod-pedal-japanese{{{cns}}}.mod-cyan .mod-enumerated,
.mod-pedal-japanese{{{cns}}}.mod-racing .mod-enumerated,
.mod-pedal-japanese{{{cns}}}.mod-red .mod-enumerated,
.mod-pedal-japanese{{{cns}}}.mod-cream .mod-enumerated
{
background-image:url(/resources/utils/dropdown-arrow-white.png{{{ns}}});
}
.mod-pedal-japanese{{{cns}}}.mod-white .mod-enumerated
{
background-image:url(/resources/utils/dropdown-arrow-white.png{{{ns}}});
}
.mod-pedal-japanese{{{cns}}}.mod-blue .mod-plugin-name h1,
.mod-pedal-japanese{{{cns}}}.mod-blue .mod-enumerated,
.mod-pedal-japanese{{{cns}}}.mod-blue .mod-control-group .mod-knob > span.mod-knob-title,
.mod-pedal-japanese{{{cns}}}.mod-brown .mod-plugin-name h1,
.mod-pedal-japanese{{{cns}}}.mod-brown .mod-enumerated,
.mod-pedal-japanese{{{cns}}}.mod-brown .mod-control-group .mod-knob > span.mod-knob-title,
.mod-pedal-japanese{{{cns}}}.mod-none .mod-plugin-name h1,
.mod-pedal-japanese{{{cns}}}.mod-none .mod-enumerated,
.mod-pedal-japanese{{{cns}}}.mod-none .mod-control-group .mod-knob > span.mod-knob-title,
.mod-pedal-japanese{{{cns}}}.mod-gray .mod-plugin-name h1,
.mod-pedal-japanese{{{cns}}}.mod-gray .mod-enumerated,
.mod-pedal-japanese{{{cns}}}.mod-gray .mod-control-group .mod-knob > span.mod-knob-title,
.mod-pedal-japanese{{{cns}}}.mod-darkblue .mod-plugin-name h1,
.mod-pedal-japanese{{{cns}}}.mod-darkblue .mod-enumerated,
.mod-pedal-japanese{{{cns}}}.mod-darkblue .mod-control-group .mod-knob > span.mod-knob-title,
.mod-pedal-japanese{{{cns}}}.mod-purple .mod-plugin-name h1,
.mod-pedal-japanese{{{cns}}}.mod-purple .mod-enumerated,
.mod-pedal-japanese{{{cns}}}.mod-purple .mod-control-group .mod-knob > span.mod-knob-title,
.mod-pedal-japanese{{{cns}}}.mod-green .mod-plugin-name h1,
.mod-pedal-japanese{{{cns}}}.mod-green .mod-enumerated,
.mod-pedal-japanese{{{cns}}}.mod-green .mod-control-group .mod-knob > span.mod-knob-title,
.mod-pedal-japanese{{{cns}}}.mod-yellow .mod-plugin-name h1,
.mod-pedal-japanese{{{cns}}}.mod-yellow .mod-enumerated,
.mod-pedal-japanese{{{cns}}}.mod-yellow .mod-control-group .mod-knob > span.mod-knob-title,
.mod-pedal-japanese{{{cns}}}.mod-petrol .mod-plugin-name h1,
.mod-pedal-japanese{{{cns}}}.mod-petrol .mod-enumerated,
.mod-pedal-japanese{{{cns}}}.mod-petrol .mod-control-group .mod-knob > span.mod-knob-title,
.mod-pedal-japanese{{{cns}}}.mod-pink .mod-plugin-name h1,
.mod-pedal-japanese{{{cns}}}.mod-pink .mod-enumerated,
.mod-pedal-japanese{{{cns}}}.mod-pink .mod-control-group .mod-knob > span.mod-knob-title,
.mod-pedal-japanese{{{cns}}}.mod-black .mod-plugin-name h1,
.mod-pedal-japanese{{{cns}}}.mod-black .mod-enumerated,
.mod-pedal-japanese{{{cns}}}.mod-black .mod-control-group .mod-knob > span.mod-knob-title,
.mod-pedal-japanese{{{cns}}}.mod-orange .mod-plugin-name h1,
.mod-pedal-japanese{{{cns}}}.mod-orange .mod-enumerated,
.mod-pedal-japanese{{{cns}}}.mod-orange .mod-control-group .mod-knob > span.mod-knob-title,
.mod-pedal-japanese{{{cns}}}.mod-cyan .mod-plugin-name h1,
.mod-pedal-japanese{{{cns}}}.mod-cyan .mod-enumerated,
.mod-pedal-japanese{{{cns}}}.mod-cyan .mod-control-group .mod-knob > span.mod-knob-title,
.mod-pedal-japanese{{{cns}}}.mod-racing .mod-plugin-name h1,
.mod-pedal-japanese{{{cns}}}.mod-racing .mod-enumerated,
.mod-pedal-japanese{{{cns}}}.mod-racing .mod-control-group .mod-knob > span.mod-knob-title,
.mod-pedal-japanese{{{cns}}}.mod-red .mod-plugin-name h1,
.mod-pedal-japanese{{{cns}}}.mod-red .mod-enumerated,
.mod-pedal-japanese{{{cns}}}.mod-red .mod-control-group .mod-knob > span.mod-knob-title,
.mod-pedal-japanese{{{cns}}}.mod-cream .mod-plugin-name h1,
.mod-pedal-japanese{{{cns}}}.mod-cream .mod-enumerated,
.mod-pedal-japanese{{{cns}}}.mod-cream .mod-control-group .mod-knob > span.mod-knob-title
{
color:white;
}
.mod-pedal-japanese{{{cns}}}.mod-white .mod-plugin-name h1,
.mod-pedal-japanese{{{cns}}}.mod-white .mod-enumerated,
.mod-pedal-japanese{{{cns}}}.mod-white .mod-control-group .mod-knob > span.mod-knob-title
{
color:#7F7F7F;
}
/* STYLES FOR THE JAPANESE KNOB */
/* = KNOBS
================================================ */
.mod-pedal-japanese{{{cns}}} .mod-control-group.mod-blue .mod-knob .mod-knob-image {
background-image:url(/resources/knobs/japanese/blue.png{{{ns}}});
}.mod-pedal-japanese{{{cns}}} .mod-control-group.mod-brown .mod-knob .mod-knob-image {
background-image:url(/resources/knobs/japanese/brown.png{{{ns}}});
}.mod-pedal-japanese{{{cns}}} .mod-control-group.mod-none .mod-knob .mod-knob-image {
background-image:url(/resources/knobs/japanese/none.png{{{ns}}});
}.mod-pedal-japanese{{{cns}}} .mod-control-group.mod-gray .mod-knob .mod-knob-image {
background-image:url(/resources/knobs/japanese/gray.png{{{ns}}});
}.mod-pedal-japanese{{{cns}}} .mod-control-group.mod-darkblue .mod-knob .mod-knob-image {
background-image:url(/resources/knobs/japanese/darkblue.png{{{ns}}});
}.mod-pedal-japanese{{{cns}}} .mod-control-group.mod-purple .mod-knob .mod-knob-image {
background-image:url(/resources/knobs/japanese/purple.png{{{ns}}});
}.mod-pedal-japanese{{{cns}}} .mod-control-group.mod-green .mod-knob .mod-knob-image {
background-image:url(/resources/knobs/japanese/green.png{{{ns}}});
}.mod-pedal-japanese{{{cns}}} .mod-control-group.mod-yellow .mod-knob .mod-knob-image {
background-image:url(/resources/knobs/japanese/yellow.png{{{ns}}});
}.mod-pedal-japanese{{{cns}}} .mod-control-group.mod-petrol .mod-knob .mod-knob-image {
background-image:url(/resources/knobs/japanese/petrol.png{{{ns}}});
}.mod-pedal-japanese{{{cns}}} .mod-control-group.mod-pink .mod-knob .mod-knob-image {
background-image:url(/resources/knobs/japanese/pink.png{{{ns}}});
}.mod-pedal-japanese{{{cns}}} .mod-control-group.mod-black .mod-knob .mod-knob-image {
background-image:url(/resources/knobs/japanese/black.png{{{ns}}});
}.mod-pedal-japanese{{{cns}}} .mod-control-group.mod-orange .mod-knob .mod-knob-image {
background-image:url(/resources/knobs/japanese/orange.png{{{ns}}});
}.mod-pedal-japanese{{{cns}}} .mod-control-group.mod-cyan .mod-knob .mod-knob-image {
background-image:url(/resources/knobs/japanese/cyan.png{{{ns}}});
}.mod-pedal-japanese{{{cns}}} .mod-control-group.mod-white .mod-knob .mod-knob-image {
background-image:url(/resources/knobs/japanese/white.png{{{ns}}});
}.mod-pedal-japanese{{{cns}}} .mod-control-group.mod-racing .mod-knob .mod-knob-image {
background-image:url(/resources/knobs/japanese/racing.png{{{ns}}});
}.mod-pedal-japanese{{{cns}}} .mod-control-group.mod-red .mod-knob .mod-knob-image {
background-image:url(/resources/knobs/japanese/red.png{{{ns}}});
}.mod-pedal-japanese{{{cns}}} .mod-control-group.mod-cream .mod-knob .mod-knob-image {
background-image:url(/resources/knobs/japanese/cream.png{{{ns}}});
}
.mod-pedal-japanese{{{cns}}} .mod-control-group {
height:141px;
left:17px;
position:absolute;
right:17px;
top:18px;
}
.mod-pedal-japanese{{{cns}}} .mod-control-group .mod-knob {
height:70px;
float:left;
overflow:hidden;
position:relative;
text-align:center;
width:60px;
}
.mod-pedal-japanese{{{cns}}} .mod-control-group .mod-knob > span.mod-knob-title {
color:white;
display:block;
font-size:10px;
font-weight:bold;
height:11px;
line-height:1;
margin:0;
padding:0;
position:relative;
overflow:hidden;
text-transform:uppercase;
}
.mod-pedal-japanese{{{cns}}} .mod-control-group .mod-knob .mod-knob-image {
background-position:left center;
background-repeat:no-repeat;
background-size:auto 52px;
height:52px;
margin:0 auto;
position:relative;
overflow:hidden;
width:52px;
}
/* 4 KNOBS */
.mod-pedal-japanese{{{cns}}}.mod-four-knobs .mod-control-group {
height:70px;
top:49px;
}
/* 7 KNOBS - OPTION 1 */
.mod-pedal-japanese{{{cns}}}.mod-seven-a-knobs .mod-control-group .mod-knob:first-child {
margin-left:30px;
}
/* 7 KNOBS - OPTION 2 */
.mod-pedal-japanese{{{cns}}}.mod-seven-b-knobs .mod-control-group .mod-knob:first-child {
margin:0 30px;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Loading…
Cancel
Save