@@ -38,7 +38,7 @@ KeyboardPluginGUI::KeyboardPluginGUI(int w, int h,KeyboardPlugin *o,ChannelHandl | |||
SpiralPluginGUI(w,h,o,ch), | |||
m_Last(-1), | |||
m_Oct(4) | |||
{ | |||
{ | |||
Fl_Scroll *Scroll = new Fl_Scroll(2,20,w-4,h-20); | |||
Fl_Group *Group = new Fl_Group(0,20,500,h-40); | |||
Group->box(FL_FLAT_BOX); | |||
@@ -50,18 +50,18 @@ m_Oct(4) | |||
for (int n=0; n<NUM_KEYS; n++) | |||
{ | |||
m_Num[n]=n; | |||
Note = n%12; | |||
if (Note!=1 && Note!=3 && Note!=6 && Note!=8 && Note!=10) | |||
if (Note!=1 && Note!=3 && Note!=6 && Note!=8 && Note!=10) | |||
{ | |||
Count++; | |||
Pos=Count*KeyWidth; | |||
Count++; | |||
m_Key[n] = new Fl_Button(Pos,20,KeyWidth,50,""); | |||
m_Key[n]->box(FL_THIN_UP_BOX); | |||
m_Key[n]->labelsize(10); | |||
m_Key[n]->when(FL_WHEN_CHANGED); | |||
if (Note==0) | |||
if (Note==0) | |||
{ | |||
int Num=n/12; | |||
sprintf(m_Label[n],"%d",Num); | |||
@@ -72,14 +72,14 @@ m_Oct(4) | |||
m_Key[n]->selection_color(FL_WHITE); | |||
m_Key[n]->callback((Fl_Callback*)cb_Key, &m_Num[n]); | |||
Group->add(m_Key[n]); | |||
} | |||
} | |||
} | |||
Count=0; | |||
for (int n=0; n<NUM_KEYS; n++) | |||
{ | |||
Note = n%12; | |||
if (Note==1 || Note==3 || Note==6 || Note==8 || Note==10) | |||
if (Note==1 || Note==3 || Note==6 || Note==8 || Note==10) | |||
{ | |||
m_Key[n] = new Fl_Button(Pos+5,20,KeyWidth,30,""); | |||
m_Key[n]->box(FL_THIN_UP_BOX); | |||
@@ -92,40 +92,40 @@ m_Oct(4) | |||
} | |||
else | |||
{ | |||
Count++; | |||
Pos=Count*KeyWidth; | |||
Count++; | |||
} | |||
} | |||
Group->position(-100,20); | |||
Group->end(); | |||
Scroll->end(); | |||
} | |||
void KeyboardPluginGUI::Update() | |||
{ | |||
{ | |||
int Volume=0,Note=0,EventDevice=0; | |||
if (Fl::event_key(FL_F+1)) m_Oct=0; | |||
if (Fl::event_key(FL_F+2)) m_Oct=1; | |||
if (Fl::event_key(FL_F+3)) m_Oct=2; | |||
if (Fl::event_key(FL_F+4)) m_Oct=3; | |||
if (Fl::event_key(FL_F+5)) m_Oct=4; | |||
if (Fl::event_key(FL_F+6)) m_Oct=5; | |||
if (Fl::event_key(FL_F+7)) m_Oct=6; | |||
if (Fl::event_key(FL_F+8)) m_Oct=7; | |||
if (Fl::event_key(FL_F+9)) m_Oct=8; | |||
if (Fl::event_key(FL_F+10)) m_Oct=9; | |||
if (Fl::event_key(FL_F+11)) m_Oct=10; | |||
if (Fl::event_key(FL_F+1)) m_Oct=0; | |||
if (Fl::event_key(FL_F+2)) m_Oct=1; | |||
if (Fl::event_key(FL_F+3)) m_Oct=2; | |||
if (Fl::event_key(FL_F+4)) m_Oct=3; | |||
if (Fl::event_key(FL_F+5)) m_Oct=4; | |||
if (Fl::event_key(FL_F+6)) m_Oct=5; | |||
if (Fl::event_key(FL_F+7)) m_Oct=6; | |||
if (Fl::event_key(FL_F+8)) m_Oct=7; | |||
if (Fl::event_key(FL_F+9)) m_Oct=8; | |||
if (Fl::event_key(FL_F+10)) m_Oct=9; | |||
if (Fl::event_key(FL_F+11)) m_Oct=10; | |||
int note=0; | |||
char KeyChar=0; | |||
bool KeyPressed=false; | |||
for (int key=0; key<NKEYS; key++) | |||
{ | |||
{ | |||
KeyChar=KEYMAP[key]; | |||
// check if a key's been pressed | |||
if (Fl::event_key(KeyChar)) | |||
if (Fl::event_key(KeyChar)) | |||
{ | |||
KeyPressed=true; | |||
@@ -133,34 +133,34 @@ void KeyboardPluginGUI::Update() | |||
Note=(m_Oct*12)+note; | |||
if (m_Last!=Note) | |||
{ | |||
if (m_Last!=-1) | |||
{ | |||
if (m_Last!=-1) | |||
{ | |||
// turn off the old one | |||
m_Key[m_Last]->value(0); | |||
m_Key[m_Last]->parent()->redraw(); | |||
m_GUICH->SetCommand(KeyboardPlugin::NOTE_OFF); | |||
m_GUICH->SetCommand(KeyboardPlugin::NOTE_OFF); | |||
m_GUICH->Wait(); | |||
} | |||
m_Last = Note; | |||
m_GUICH->Set("Note",Note); | |||
m_GUICH->SetCommand(KeyboardPlugin::NOTE_ON); | |||
m_GUICH->SetCommand(KeyboardPlugin::NOTE_ON); | |||
m_Key[Note]->value(1); | |||
m_Key[m_Last]->parent()->redraw(); | |||
} | |||
} | |||
else // it's not pressed down | |||
else // it's not pressed down | |||
{ | |||
//see if the note was pressed down last time | |||
//see if the note was pressed down last time | |||
Note=(m_Oct*12)+note; | |||
if (m_Last==Note) | |||
{ | |||
m_Key[m_Last]->value(0); | |||
m_Key[m_Last]->parent()->redraw(); | |||
m_GUICH->SetCommand(KeyboardPlugin::NOTE_OFF); | |||
m_GUICH->SetCommand(KeyboardPlugin::NOTE_OFF); | |||
m_Last=-1; | |||
} | |||
} | |||
} | |||
note++; | |||
} | |||
@@ -21,13 +21,13 @@ | |||
#include <FL/Fl_Group.H> | |||
#include <FL/Fl_Button.H> | |||
#include "../Widgets/Fl_Knob.H" | |||
//#include "../Widgets/Fl_Knob.H" | |||
#include "../Widgets/Fl_DragBar.H" | |||
#include "NoteSnapPlugin.h" | |||
#include "../SpiralPluginGUI.h" | |||
#ifndef SplitterGUI | |||
#define SplitterGUI | |||
#ifndef NoteSnapGUI | |||
#define NoteSnapGUI | |||
static const int NUM_KEYS = 12; | |||
class NoteSnapPluginGUI : public SpiralPluginGUI | |||
@@ -26,8 +26,8 @@ | |||
#include "SmoothPlugin.h" | |||
#include "../SpiralPluginGUI.h" | |||
#ifndef SplitterGUI | |||
#define SplitterGUI | |||
#ifndef SmoothGUI | |||
#define SmoothGUI | |||
class SmoothPluginGUI : public SpiralPluginGUI | |||
@@ -122,7 +122,7 @@ protected: | |||
void SetOutputPitch(int n,int p, float s) | |||
{ if (m_Output[n]) m_Output[n]->Set(p,(s/MAX_FREQ*2)-1.0f); } | |||
float GetInputPitch(int n,int p) | |||
float GetInputPitch(int n,int p) | |||
{ if (m_Input[n]) return ((*m_Input[n])[p]+1.0f)*MAX_FREQ/2; else return 0.0; } | |||
void MixOutput(int n,int p, float s) | |||
@@ -335,10 +335,10 @@ SpiralWindowType *SynthModular::CreateWindow() | |||
m_TopWindow->resizable(m_CanvasScroll); | |||
m_Canvas = new Fl_Canvas(-5000, -5000, 10000, 10000, ""); | |||
m_Canvas->type(1); | |||
m_Canvas->type(1); | |||
m_Canvas->box(FL_FLAT_BOX); | |||
m_Canvas->labeltype(FL_ENGRAVED_LABEL); | |||
m_Canvas->align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE); | |||
m_Canvas->labeltype(FL_ENGRAVED_LABEL); | |||
m_Canvas->align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE); | |||
m_Canvas->color(SpiralSynthModularInfo::GUICOL_Canvas); | |||
m_Canvas->user_data((void*)(this)); | |||
m_Canvas->SetConnectionCallback((Fl_Callback*)cb_Connection); | |||
@@ -472,7 +472,7 @@ void SynthModular::LoadPlugins(string pluginPath) | |||
if (ID!=PluginError) | |||
{ | |||
#ifdef DEBUG_PLUGINS | |||
cerr<<"Plugin ["<<*i<<"] = "<<ID<<endl; | |||
cerr << ID << " = Plugin [" << *i << "]" << endl; | |||
#endif | |||
Fl_Button *NewButton = new Fl_Button(0,0,Width,Height,""); | |||
@@ -47,7 +47,7 @@ if test $ac_arg_jack = "Y" ; then | |||
AnotherFilterPlugin OperatorPlugin CounterPlugin FlipflopPlugin SwitchPlugin \ | |||
BeatMatchPlugin NoisePlugin LogicPlugin SplitSwitchPlugin \ | |||
MixSwitchPlugin MeterPlugin WaveShaperPlugin TrigPlugin SpiralLoopPlugin \ | |||
MasherPlugin JackPlugin" | |||
MasherPlugin TransposePlugin JackPlugin" | |||
else | |||
PLUGINLIST="AmpPlugin ControllerPlugin DelayPlugin EchoPlugin EnvFollowerPlugin \ | |||
EnvelopePlugin FilterPlugin MatrixPlugin MidiPlugin MixerPlugin MoogFilterPlugin \ | |||
@@ -58,8 +58,8 @@ else | |||
AnotherFilterPlugin OperatorPlugin CounterPlugin FlipflopPlugin SwitchPlugin \ | |||
BeatMatchPlugin NoisePlugin LogicPlugin SplitSwitchPlugin \ | |||
MixSwitchPlugin MeterPlugin WaveShaperPlugin TrigPlugin SpiralLoopPlugin \ | |||
MasherPlugin" | |||
MasherPlugin TransposePlugin" | |||
fi | |||
echo "$PLUGINLIST" > SpiralSound/PluginList.txt | |||
@@ -126,10 +126,10 @@ AC_SUBST(PLUGINLIST) | |||
dnl Modify the output files. | |||
AC_OUTPUT( | |||
SpiralSound/Plugins/AmpPlugin/Makefile | |||
SpiralSound/Plugins/AnotherFilterPlugin/Makefile | |||
SpiralSound/Plugins/ControllerPlugin/Makefile | |||
SpiralSound/Plugins/DelayPlugin/Makefile | |||
SpiralSound/Plugins/AmpPlugin/Makefile | |||
SpiralSound/Plugins/AnotherFilterPlugin/Makefile | |||
SpiralSound/Plugins/ControllerPlugin/Makefile | |||
SpiralSound/Plugins/DelayPlugin/Makefile | |||
SpiralSound/Plugins/DiskWriterPlugin/Makefile | |||
SpiralSound/Plugins/DistributorPlugin/Makefile | |||
SpiralSound/Plugins/EchoPlugin/Makefile | |||
@@ -174,6 +174,7 @@ SpiralSound/Plugins/MixSwitchPlugin/Makefile | |||
SpiralSound/Plugins/TrigPlugin/Makefile | |||
SpiralSound/Plugins/SpiralLoopPlugin/Makefile | |||
SpiralSound/Plugins/MasherPlugin/Makefile | |||
SpiralSound/Plugins/TransposePlugin/Makefile | |||
SpiralSynthPluginLocation.h | |||
Makefile | |||
) | |||