mirror of
https://github.com/vale981/openAV-Luppp
synced 2025-03-05 09:01:39 -05:00
-Updated run script, fixed APC error.
This commit is contained in:
parent
3f8cc2f926
commit
398ab69482
5 changed files with 85 additions and 8 deletions
58
luppp5apc.ajs
Normal file
58
luppp5apc.ajs
Normal file
|
@ -0,0 +1,58 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<alsa>
|
||||
<client name="System">
|
||||
<port id="0" />
|
||||
<port id="1" />
|
||||
</client>
|
||||
<client name="Midi Through">
|
||||
<port id="0" />
|
||||
</client>
|
||||
<client name="Hammerfall DSP">
|
||||
<port id="0" />
|
||||
</client>
|
||||
<client name="Akai APC40">
|
||||
<port id="0" />
|
||||
</client>
|
||||
<client name="Client-128" />
|
||||
<client name="jack_midi" />
|
||||
</alsa>
|
||||
<jack>
|
||||
<client name="system">
|
||||
<port name="capture_1">
|
||||
<connection port="Luppp:master_in" />
|
||||
</port>
|
||||
<port name="capture_2" />
|
||||
<port name="capture_3" />
|
||||
<port name="capture_4" />
|
||||
<port name="capture_5" />
|
||||
<port name="capture_6" />
|
||||
<port name="capture_7" />
|
||||
<port name="capture_8" />
|
||||
<port name="capture_9" />
|
||||
<port name="capture_10" />
|
||||
<port name="capture_11" />
|
||||
<port name="capture_12" />
|
||||
<port name="capture_13" />
|
||||
<port name="capture_14" />
|
||||
<port name="capture_15" />
|
||||
<port name="capture_16" />
|
||||
<port name="capture_17" />
|
||||
<port name="capture_18" />
|
||||
</client>
|
||||
<client name="alsa_pcm">
|
||||
<port name="Midi-Through/midi_capture_1" />
|
||||
<port name="Hammerfall-DSP/midi_capture_1" />
|
||||
<port name="Akai-APC40/midi_capture_1">
|
||||
<connection port="Luppp:apc_in" />
|
||||
</port>
|
||||
</client>
|
||||
<client name="Luppp">
|
||||
<port name="master_out">
|
||||
<connection port="system:playback_2" />
|
||||
<connection port="system:playback_1" />
|
||||
</port>
|
||||
<port name="apc_out">
|
||||
<connection port="alsa_pcm:Akai-APC40/midi_playback_1" />
|
||||
</port>
|
||||
</client>
|
||||
</jack>
|
2
run.sh
2
run.sh
|
@ -2,4 +2,6 @@
|
|||
|
||||
cd .build/
|
||||
|
||||
xterm -e "sleep 1 && aj-snapshot -r luppp5apc.ajs" &
|
||||
|
||||
./luppp5
|
||||
|
|
|
@ -12,7 +12,7 @@ class Controller
|
|||
virtual void mute(int t, bool b){};
|
||||
virtual void clipSelect(int t, bool b){};
|
||||
|
||||
virtual void record(int t, bool b){};
|
||||
virtual void record(int t, bool b) = 0;
|
||||
|
||||
virtual void volume(int t, float f){};
|
||||
};
|
||||
|
|
|
@ -10,39 +10,49 @@
|
|||
|
||||
using namespace std;
|
||||
|
||||
// this is a wrapper class around a vector of Controller instances
|
||||
// Call the method on this class, and all controllers will be updated
|
||||
class ControllerUpdator
|
||||
{
|
||||
public:
|
||||
enum ClipMode {
|
||||
CLIP_MODE_PLAYING,
|
||||
CLIP_MODE_PLAY_QUEUED,
|
||||
CLIP_MODE_LOADED,
|
||||
CLIP_MODE_EMPTY,
|
||||
};
|
||||
|
||||
|
||||
ControllerUpdator()
|
||||
{
|
||||
c.push_back( AkaiAPC() );
|
||||
c.push_back( new AkaiAPC() );
|
||||
}
|
||||
|
||||
void mute(int t, bool b)
|
||||
{
|
||||
for(int i = 0; i < c.size(); i++) c.at(i).mute(t,b);
|
||||
for(int i = 0; i < c.size(); i++) c.at(i)->mute(t,b);
|
||||
}
|
||||
|
||||
void clipSelect(int t, bool cs)
|
||||
void clipSelect(int t, ClipMode cm)
|
||||
{
|
||||
for(int i = 0; i < c.size(); i++)
|
||||
c.at(i).clipSelect(t,cs);
|
||||
c.at(i)->clipSelect(t,cm);
|
||||
}
|
||||
|
||||
void record(int t, bool r)
|
||||
{
|
||||
cout << "record() " << t << " " << r << endl;
|
||||
for(int i = 0; i < c.size(); i++)
|
||||
c.at(i).record(t,r);
|
||||
c.at(i)->record(t,r);
|
||||
}
|
||||
|
||||
void volume(int t, float v)
|
||||
{
|
||||
for(int i = 0; i < c.size(); i++) c.at(i).volume(t,v);
|
||||
for(int i = 0; i < c.size(); i++) c.at(i)->volume(t,v);
|
||||
}
|
||||
|
||||
private:
|
||||
std::vector<Controller> c;
|
||||
std::vector<Controller*> c;
|
||||
};
|
||||
|
||||
#endif // LUPPP_CONTROLLER_UPDATER_H
|
||||
|
|
|
@ -82,6 +82,13 @@ void Looper::setState(State s)
|
|||
numBeats = 0;
|
||||
jack->getControllerUpdator()->record(track, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
jack->getControllerUpdator()->record(track, false);
|
||||
}
|
||||
|
||||
if (state == STATE_PLAY_QUEUED )
|
||||
{
|
||||
}
|
||||
|
||||
void Looper::process(int nframes, Buffers* buffers)
|
||||
|
|
Loading…
Add table
Reference in a new issue