Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
8dce0e4
Move calf to submodule
tresf Nov 5, 2017
8d428bc
Add CMakeLists.txt, use old Calf version
tresf Nov 5, 2017
aa542c5
Revert submodule to 0.0.60.0
tresf Nov 5, 2017
2631d22
Revert Calf to 0.0.18.2
tresf Nov 5, 2017
c540efc
Point calf submodule at fork
tresf Nov 6, 2017
ebd1fbd
Make it work
tresf Nov 6, 2017
c817ad3
Bump to Calf 0.90
tresf Nov 6, 2017
cd80f8e
Cleanup comments
tresf Nov 17, 2017
67adaf3
Namespace calf_plugins to veal_plugins
tresf Nov 19, 2017
a02730a
Nudge to latest commits
tresf Nov 19, 2017
0a0fd0a
Fix windows, bump to latest commits
tresf Nov 21, 2017
2e9f98d
Bump to latest changes at tresf/veal
tresf Dec 2, 2017
14d00cd
Tmp
JohannesLorenz Jan 2, 2018
ac14fa8
Fixes from the PR todo list
JohannesLorenz Jan 4, 2018
00b188e
DataFile upgrades
tresf Feb 5, 2018
ab72fe2
Add S&Q upgrades
tresf Feb 8, 2018
fb01511
Fix looping logic
tresf Feb 10, 2018
ca4690b
Switch back to lmms fork
tresf Feb 11, 2018
c29d2a8
Try again to bump submodule
tresf Feb 11, 2018
a1606ac
Move exprtk to non-volatile branch
tresf Jan 5, 2018
85860ec
Enable C++11 to fix Windows builds
tresf Feb 11, 2018
021e604
First attempt. Remove lists work, but adding has no effect.
JohannesLorenz Mar 16, 2018
62e1d8f
Fix all CALF effects' port numbers, ranges and defaults
JohannesLorenz Apr 2, 2018
2574408
Fix all CALF effects' port numbers, ranges and defaults
JohannesLorenz Apr 2, 2018
e313d62
Update CALF module. Code reading rework.
JohannesLorenz Apr 2, 2018
b156a82
Don't revert exprtk
tresf Apr 13, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Tmp
  • Loading branch information
JohannesLorenz committed Jan 2, 2018
commit 14d00cd775f4ab0a36b1171b9fded70eb388ecfe
1 change: 1 addition & 0 deletions include/LadspaBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ typedef enum BufferRates
typedef enum BufferData
{
TOGGLED,
ENUM,
INTEGER,
FLOATING,
TIME,
Expand Down
6 changes: 6 additions & 0 deletions include/LadspaManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,12 @@ class EXPORT LadspaManager
be described as [-0.1, 3.1]. */
bool isInteger( const ladspa_key_t & _plugin, uint32_t _port );

/* Indicates that a user interface would probably wish to provide a
stepped control taking only integer values. This is equal to isInteger,
but the number of values is usually small and may be better depicted
with a combo box. */
bool isEnum( const ladspa_key_t & _plugin, uint32_t _port );

/* Returns the name of the port. */
QString getPortName( const ladspa_key_t & _plugin, uint32_t _port );

Expand Down
6 changes: 3 additions & 3 deletions plugins/LadspaEffect/LadspaControlDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,10 @@ void LadspaControlDialog::updateEffectView( LadspaControls * _ctl )
{
if( (*it)->port()->proc == proc )
{
buffer_data_t this_port = (*it)->port()->data_type;
if( last_port != NONE &&
(*it)->port()->data_type == TOGGLED &&
!( (*it)->port()->data_type == TOGGLED &&
last_port == TOGGLED ) )
( this_port == TOGGLED || this_port == ENUM ) &&
( last_port != TOGGLED && last_port != ENUM ) )
{
++row;
col = 0;
Expand Down
4 changes: 4 additions & 0 deletions plugins/LadspaEffect/LadspaEffect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,10 @@ void LadspaEffect::pluginInstantiation()
}

p->scale = 1.0f;
if( manager->isEnum( m_key, port ) )
{
p->data_type = ENUM;
}
if( manager->isPortToggled( m_key, port ) )
{
p->data_type = TOGGLED;
Expand Down
2 changes: 1 addition & 1 deletion plugins/LadspaEffect/calf/veal
Submodule veal updated from d2943d to fd276e
8 changes: 8 additions & 0 deletions src/core/LadspaControl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ LadspaControl::LadspaControl( Model * _parent, port_desc_t * _port,
break;

case INTEGER:
case ENUM:
m_knobModel.setRange( static_cast<int>( m_port->max ),
static_cast<int>( m_port->min ),
1 + static_cast<int>( m_port->max -
Expand Down Expand Up @@ -117,6 +118,7 @@ LADSPA_Data LadspaControl::value()
case TOGGLED:
return static_cast<LADSPA_Data>( m_toggledModel.value() );
case INTEGER:
case ENUM:
case FLOATING:
return static_cast<LADSPA_Data>( m_knobModel.value() );
case TIME:
Expand All @@ -136,6 +138,7 @@ ValueBuffer * LadspaControl::valueBuffer()
{
case TOGGLED:
case INTEGER:
case ENUM:
return NULL;
case FLOATING:
return m_knobModel.valueBuffer();
Expand All @@ -159,6 +162,7 @@ void LadspaControl::setValue( LADSPA_Data _value )
m_toggledModel.setValue( static_cast<bool>( _value ) );
break;
case INTEGER:
case ENUM:
m_knobModel.setValue( static_cast<int>( _value ) );
break;
case FLOATING:
Expand Down Expand Up @@ -193,6 +197,7 @@ void LadspaControl::saveSettings( QDomDocument& doc,
m_toggledModel.saveSettings( doc, e, "data" );
break;
case INTEGER:
case ENUM:
case FLOATING:
m_knobModel.saveSettings( doc, e, "data" );
break;
Expand Down Expand Up @@ -236,6 +241,7 @@ void LadspaControl::loadSettings( const QDomElement& parent, const QString& name
m_toggledModel.loadSettings( e, dataModelName );
break;
case INTEGER:
case ENUM:
case FLOATING:
m_knobModel.loadSettings( e, dataModelName );
break;
Expand All @@ -259,6 +265,7 @@ void LadspaControl::linkControls( LadspaControl * _control )
BoolModel::linkModels( &m_toggledModel, _control->toggledModel() );
break;
case INTEGER:
case ENUM:
case FLOATING:
FloatModel::linkModels( &m_knobModel, _control->knobModel() );
break;
Expand Down Expand Up @@ -309,6 +316,7 @@ void LadspaControl::unlinkControls( LadspaControl * _control )
BoolModel::unlinkModels( &m_toggledModel, _control->toggledModel() );
break;
case INTEGER:
case ENUM:
case FLOATING:
FloatModel::unlinkModels( &m_knobModel, _control->knobModel() );
break;
Expand Down
25 changes: 25 additions & 0 deletions src/core/LadspaManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -749,6 +749,31 @@ bool LadspaManager::isInteger( const ladspa_key_t & _plugin,



bool LadspaManager::isEnum( const ladspa_key_t & _plugin, uint32_t _port )
{
if( m_ladspaManagerMap.contains( _plugin )
&& _port < getPortCount( _plugin ) )
{
LADSPA_Descriptor_Function descriptorFunction =
m_ladspaManagerMap[_plugin]->descriptorFunction;
const LADSPA_Descriptor * descriptor =
descriptorFunction(
m_ladspaManagerMap[_plugin]->index );
LADSPA_PortRangeHintDescriptor hintDescriptor =
descriptor->PortRangeHints[_port].HintDescriptor;
// This is an LMMS extension to ladspa
return( LADSPA_IS_HINT_INTEGER( hintDescriptor ) &&
LADSPA_IS_HINT_TOGGLED( hintDescriptor ) );
}
else
{
return( false );
}
}




QString LadspaManager::getPortName( const ladspa_key_t & _plugin,
uint32_t _port )
{
Expand Down
1 change: 1 addition & 0 deletions src/gui/widgets/LadspaControlView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ LadspaControlView::LadspaControlView( QWidget * _parent,
}

case INTEGER:
case ENUM:
case FLOATING:
knb = new Knob( knobBright_26, this, m_ctl->port()->name );
break;
Expand Down