added tool plugins
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@441 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
@@ -10,5 +10,17 @@ if STK_SUPPORT
|
||||
STK_DIR=stk
|
||||
endif
|
||||
|
||||
SUBDIRS = audio_file_processor bass_booster bit_invader flp_import $(LADSPA_DIRS) midi_import organic plucked_string_synth $(STK_DIR) triple_oscillator $(VST_DIRS) vibed
|
||||
|
||||
SUBDIRS = \
|
||||
audio_file_processor \
|
||||
bass_booster \
|
||||
bit_invader \
|
||||
flp_import \
|
||||
$(LADSPA_DIRS) \
|
||||
live_tool \
|
||||
midi_import \
|
||||
organic \
|
||||
plucked_string_synth \
|
||||
$(STK_DIR) \
|
||||
triple_oscillator \
|
||||
$(VST_DIRS) \
|
||||
vibed
|
||||
|
||||
@@ -153,7 +153,7 @@ void ladspaSubPluginFeatures::listSubPluginKeys( engine * _eng,
|
||||
plugins = lm->getValidEffects();
|
||||
//plugins += lm->getInvalidEffects();
|
||||
break;
|
||||
case plugin::AnalysisTools:
|
||||
case plugin::Tool:
|
||||
plugins = lm->getAnalysisTools();
|
||||
break;
|
||||
case plugin::Other:
|
||||
|
||||
33
plugins/live_tool/Makefile.am
Normal file
33
plugins/live_tool/Makefile.am
Normal file
@@ -0,0 +1,33 @@
|
||||
AUTOMAKE_OPTIONS = foreign 1.4
|
||||
|
||||
|
||||
INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/src/lib -I.
|
||||
|
||||
|
||||
AM_CXXFLAGS := $(AM_CXXFLAGS) $(QT_CXXFLAGS) -DPLUGIN_NAME="live_tool"
|
||||
|
||||
|
||||
%.moc: ./%.h
|
||||
$(MOC) -o $@ $<
|
||||
|
||||
|
||||
MOC_FILES = ./live_tool.moc
|
||||
|
||||
BUILT_SOURCES = $(MOC_FILES) ./embedded_resources.h
|
||||
EMBEDDED_RESOURCES = $(wildcard *png)
|
||||
|
||||
./embedded_resources.h: $(EMBEDDED_RESOURCES)
|
||||
$(BIN2RES) $(EMBEDDED_RESOURCES) > $@
|
||||
|
||||
EXTRA_DIST = $(EMBEDDED_RESOURCES)
|
||||
|
||||
|
||||
CLEANFILES = $(MOC_FILES) ./embedded_resources.h
|
||||
|
||||
|
||||
|
||||
pkglib_LTLIBRARIES = liblive_tool.la
|
||||
|
||||
liblive_tool_la_SOURCES = live_tool.cpp live_tool.h
|
||||
|
||||
$(liblive_tool_la_SOURCES): ./embedded_resources.h
|
||||
BIN
plugins/live_tool/artwork.png
Normal file
BIN
plugins/live_tool/artwork.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 12 KiB |
163
plugins/live_tool/live_tool.cpp
Normal file
163
plugins/live_tool/live_tool.cpp
Normal file
@@ -0,0 +1,163 @@
|
||||
/*
|
||||
* live_tool.cpp - tool for live performance
|
||||
*
|
||||
* Copyright (c) 2006 Javier Serrano Polo <jasp00/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public
|
||||
* License along with this program (see COPYING); if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include "live_tool.h"
|
||||
#include "bb_editor.h"
|
||||
#include "song_editor.h"
|
||||
|
||||
#ifdef Q_WS_X11
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
|
||||
#endif
|
||||
|
||||
#undef SINGLE_SOURCE_COMPILE
|
||||
#include "embed.cpp"
|
||||
|
||||
|
||||
|
||||
|
||||
extern "C"
|
||||
{
|
||||
|
||||
plugin::descriptor live_tool_plugin_descriptor =
|
||||
{
|
||||
STRINGIFY_PLUGIN_NAME( PLUGIN_NAME ),
|
||||
"LiveTool",
|
||||
QT_TRANSLATE_NOOP( "pluginBrowser",
|
||||
"tool for live performance" ),
|
||||
"Javier Serrano Polo <jasp00/at/users.sourceforge.net>",
|
||||
0x0100,
|
||||
plugin::Tool,
|
||||
new QPixmap( PLUGIN_NAME::getIconPixmap( "logo" ) ),
|
||||
NULL
|
||||
} ;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
liveTool::liveTool( mainWindow * _window ) :
|
||||
tool( _window, &live_tool_plugin_descriptor )
|
||||
{
|
||||
QPixmap background = PLUGIN_NAME::getIconPixmap( "artwork" );
|
||||
setPaletteBackgroundPixmap( background );
|
||||
setFixedSize( background.size() );
|
||||
|
||||
hide();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
liveTool::~liveTool()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
QString liveTool::nodeName( void ) const
|
||||
{
|
||||
return( live_tool_plugin_descriptor.name );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void liveTool::keyPressEvent( QKeyEvent * _ke )
|
||||
{
|
||||
switch( _ke->key() )
|
||||
{
|
||||
case Qt::Key_Space:
|
||||
if( eng()->getSongEditor()->playing() )
|
||||
{
|
||||
eng()->getSongEditor()->pause();
|
||||
}
|
||||
else if( eng()->getSongEditor()->paused() &&
|
||||
eng()->getSongEditor()->playMode() ==
|
||||
songEditor::PLAY_SONG )
|
||||
{
|
||||
eng()->getSongEditor()->resumeFromPause();
|
||||
}
|
||||
else
|
||||
{
|
||||
eng()->getSongEditor()->play();
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
_ke->ignore();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#ifdef Q_WS_X11
|
||||
bool liveTool::x11Event( XEvent * _xe )
|
||||
{
|
||||
if( _xe->type == KeyPress )
|
||||
{
|
||||
unsigned keycode = _xe->xkey.keycode;
|
||||
// F1 to F10
|
||||
if( 67 <= keycode && keycode <= 76 )
|
||||
{
|
||||
toggleInstrument( keycode - 67 );
|
||||
return( TRUE );
|
||||
}
|
||||
}
|
||||
return( FALSE );
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
void liveTool::toggleInstrument( int _n )
|
||||
{
|
||||
bool track_exists;
|
||||
track * t = eng()->getBBEditor()->tracks().at( _n, &track_exists );
|
||||
if( track_exists )
|
||||
{
|
||||
t->setMuted( !t->muted() );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
extern "C"
|
||||
{
|
||||
|
||||
// neccessary for getting instance out of shared lib
|
||||
plugin * lmms_plugin_main( void * _data )
|
||||
{
|
||||
return( new liveTool( static_cast<mainWindow *>( _data ) ) );
|
||||
}
|
||||
|
||||
}
|
||||
59
plugins/live_tool/live_tool.h
Normal file
59
plugins/live_tool/live_tool.h
Normal file
@@ -0,0 +1,59 @@
|
||||
/*
|
||||
* live_tool.h - declaration of class liveTool, for live performance
|
||||
*
|
||||
* Copyright (c) 2006 Javier Serrano Polo <jasp00/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public
|
||||
* License along with this program (see COPYING); if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _LIVE_TOOL_H
|
||||
#define _LIVE_TOOL_H
|
||||
|
||||
|
||||
#include "tool.h"
|
||||
|
||||
|
||||
|
||||
|
||||
class liveTool : public tool
|
||||
{
|
||||
public:
|
||||
liveTool( mainWindow * _window );
|
||||
virtual ~liveTool();
|
||||
|
||||
virtual QString nodeName( void ) const;
|
||||
|
||||
|
||||
protected:
|
||||
virtual void keyPressEvent( QKeyEvent * _ke );
|
||||
#ifdef Q_WS_X11
|
||||
virtual bool x11Event( XEvent * _xe );
|
||||
#endif
|
||||
|
||||
|
||||
private:
|
||||
void toggleInstrument( int _n );
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
BIN
plugins/live_tool/logo.png
Normal file
BIN
plugins/live_tool/logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.5 KiB |
@@ -23,8 +23,7 @@ libvstbase_la_SOURCES = vst_base.cpp \
|
||||
CC = wineg++
|
||||
pkglib_PROGRAMS = lvsl_server
|
||||
lvsl_server_SOURCES = lvsl_server.c communication.h
|
||||
lvsl_server_LDFLAGS = -mwindows -lpthread -o $(pkglib_PROGRAMS)
|
||||
lvsl_server_LINK = wineg++
|
||||
lvsl_server_LINK = wineg++ -mwindows -lpthread -o $(pkglib_PROGRAMS)
|
||||
nobase_pkglib_DATA = $(pkglib_PROGRAMS).exe.so
|
||||
|
||||
CLEANFILES = $(MOC_FILES) $(nobase_pkglib_DATA)
|
||||
|
||||
Reference in New Issue
Block a user