merged some of Javiers recent changes to trunk
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/branches/lmms/stable-0.3@570 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
@@ -665,7 +665,8 @@ polyb302Synth::handleState::handleState( const polyb302Synth * _synth )
|
||||
m_vcf_envpos = ENVINC;
|
||||
m_vco_detune = 0;
|
||||
|
||||
m_vca_mode = 2;
|
||||
// Start VCA on an attack.
|
||||
m_vca_mode = 0;
|
||||
m_vca_a = 0;
|
||||
//m_vca_attack = 1.0 - 0.94406088;
|
||||
m_vca_attack = 1.0 - 0.96406088;
|
||||
@@ -816,19 +817,6 @@ void polyb302Synth::handleState::process( sampleFrame * _outbuf,
|
||||
m_sample_cnt++;
|
||||
m_vcf_envpos++;
|
||||
|
||||
// 01/21/07 Changed to VCF -> VCA instead of VCA -> VCF
|
||||
#ifdef LB_FILTERED
|
||||
float samp = m_vcf->process( m_vco_k ) * 2.0 * m_vca_a;
|
||||
#else
|
||||
float samp = m_vco_k * m_vca_a;
|
||||
#endif
|
||||
|
||||
for( int c = 0; c < DEFAULT_CHANNELS; c++ )
|
||||
{
|
||||
_outbuf[i][c] = samp;
|
||||
}
|
||||
|
||||
|
||||
// update vco
|
||||
m_vco_c += m_vco_inc * _freq;
|
||||
if( m_vco_c > 0.5 )
|
||||
@@ -902,19 +890,30 @@ void polyb302Synth::handleState::process( sampleFrame * _outbuf,
|
||||
break;
|
||||
}
|
||||
|
||||
// Make it louder. For the better?
|
||||
//m_vco_k*=2.0;
|
||||
// Write out samples.
|
||||
#ifdef LB_FILTERED
|
||||
float samp = m_vcf->process( m_vco_k ) * 2.0 * m_vca_a;
|
||||
#else
|
||||
float samp = m_vco_k * m_vca_a;
|
||||
#endif
|
||||
|
||||
for( int c = 0; c < DEFAULT_CHANNELS; c++ )
|
||||
{
|
||||
_outbuf[i][c] = samp;
|
||||
}
|
||||
|
||||
|
||||
// Handle Envelope
|
||||
// TODO: Add decay once I figure out how to extend past the end
|
||||
// of a note.
|
||||
if( m_sample_cnt >= 0.5 * engine::getMixer()->sampleRate() )
|
||||
{
|
||||
m_vca_mode = 2;
|
||||
}
|
||||
if( m_vca_mode == 0 )
|
||||
{
|
||||
m_vca_a += ( m_vca_a0 - m_vca_a ) * m_vca_attack;
|
||||
if( m_sample_cnt >= 0.5
|
||||
* engine::getMixer()->sampleRate() )
|
||||
{
|
||||
m_vca_mode = 2;
|
||||
}
|
||||
}
|
||||
else if( m_vca_mode == 1 )
|
||||
{
|
||||
|
||||
@@ -452,6 +452,7 @@ void singerBot::synThread::run( void )
|
||||
|
||||
void singerBot::synThread::text_to_wave( void )
|
||||
{
|
||||
//TODO: Heap corruption too -> move to separate process?
|
||||
char command[80];
|
||||
sprintf( command,
|
||||
"(set! duffint_params '((start %f) (end %f)))",
|
||||
@@ -508,7 +509,7 @@ EST_Wave * singerBot::synThread::get_wave( const char * _name )
|
||||
return( NULL );
|
||||
}
|
||||
|
||||
EST_Relation *r = utterance( lutt )->relation( "Wave" );
|
||||
EST_Relation * r = utterance( lutt )->relation( "Wave" );
|
||||
|
||||
//TODO: This check is useless. The error is fatal.
|
||||
if ( !r || !r->head() )
|
||||
|
||||
@@ -456,7 +456,9 @@ void vestigeInstrument::openPlugin( void )
|
||||
{
|
||||
return;
|
||||
}
|
||||
engine::getMixer()->lock();
|
||||
setParameter( "plugin", ofd.selectedFiles()[0] );
|
||||
engine::getMixer()->unlock();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -20,12 +20,19 @@ libvstbase_la_SOURCES = vst_base.cpp \
|
||||
lvsl_client.cpp \
|
||||
lvsl_client.h
|
||||
|
||||
CC = wineg++
|
||||
pkglib_PROGRAMS = lvsl_server
|
||||
lvsl_server_SOURCES = lvsl_server.c communication.h
|
||||
lvsl_server_SOURCES = lvsl_server.cpp communication.h
|
||||
lvsl_server_CPPFLAGS = $(AM_CPPFLAGS) -I${prefix}/include/wine/windows
|
||||
lvsl_server_CPPFLAGS += -I/usr/include/wine/windows
|
||||
lvsl_server_LINK = wineg++ -mwindows -lpthread -o $(pkglib_PROGRAMS)
|
||||
nobase_pkglib_DATA = $(pkglib_PROGRAMS).exe.so
|
||||
|
||||
if AMD64_BUILD
|
||||
lvsl_server_CXXFLAGS = -m32 $(AM_CXXFLAGS)
|
||||
lvsl_server_LINK += -m32 -Wb,--as-cmd="as --32",--ld-cmd="ld -melf_i386" \
|
||||
-L/usr/lib32
|
||||
endif
|
||||
|
||||
CLEANFILES = $(MOC_FILES) $(nobase_pkglib_DATA)
|
||||
|
||||
install-exec-hook:
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* communication.h - header file defining stuff concerning communication between
|
||||
* LVSL-server and -client
|
||||
*
|
||||
* Copyright (c) 2005-2006 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2005-2007 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -61,8 +61,9 @@ inline void writeValue( const T & _i, int _fd = 1 )
|
||||
static inline std::string readString( int _fd = 0 )
|
||||
{
|
||||
Sint16 len = readValue<Sint16>( _fd );
|
||||
char * sc = new char[len];
|
||||
char * sc = new char[len + 1];
|
||||
read( _fd, sc, len );
|
||||
sc[len] = '\0';
|
||||
std::string s( sc );
|
||||
delete[] sc;
|
||||
return( s );
|
||||
@@ -73,7 +74,7 @@ static inline std::string readString( int _fd = 0 )
|
||||
|
||||
static inline void writeString( const char * _str, int _fd = 1 )
|
||||
{
|
||||
int len = strlen( _str ) + 1;
|
||||
int len = strlen( _str );
|
||||
writeValue<Sint16>( len, _fd );
|
||||
write( _fd, _str, len );
|
||||
}
|
||||
|
||||
@@ -382,7 +382,12 @@ void remoteVSTPlugin::enqueueMidiEvent( const midiEvent & _event,
|
||||
{
|
||||
lock();
|
||||
writeValueS<Sint16>( VST_ENQUEUE_MIDI_EVENT );
|
||||
writeValueS<midiEvent>( _event );
|
||||
|
||||
writeValueS<midiEventTypes>( _event.m_type );
|
||||
writeValueS<Sint8>( _event.m_channel );
|
||||
writeValueS<Uint16>( _event.m_data.m_param[0] );
|
||||
writeValueS<Uint16>( _event.m_data.m_param[1] );
|
||||
|
||||
writeValueS<f_cnt_t>( _frames_ahead );
|
||||
unlock();
|
||||
}
|
||||
@@ -578,7 +583,7 @@ Sint16 remoteVSTPlugin::processNextMessage( void )
|
||||
case VST_SHM_KEY_AND_SIZE:
|
||||
{
|
||||
Uint16 shm_key = readValueS<Uint16>();
|
||||
size_t shm_size = readValueS<size_t>();
|
||||
size_t shm_size = readValueS<Uint32>();
|
||||
setShmKeyAndSize( shm_key, shm_size );
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -665,7 +665,7 @@ void VSTPlugin::resizeSharedMemory( void )
|
||||
int shm_id;
|
||||
Uint16 shm_key = 0;
|
||||
while( ( shm_id = shmget( ++shm_key, s, IPC_CREAT | IPC_EXCL |
|
||||
0666 ) ) == -1 )
|
||||
0600 ) ) == -1 )
|
||||
{
|
||||
}
|
||||
|
||||
@@ -688,7 +688,7 @@ void VSTPlugin::resizeSharedMemory( void )
|
||||
|
||||
writeValue<Sint16>( VST_SHM_KEY_AND_SIZE );
|
||||
writeValue<Uint16>( shm_key );
|
||||
writeValue<size_t>( s );
|
||||
writeValue<Uint32>( s );
|
||||
}
|
||||
|
||||
|
||||
@@ -1206,7 +1206,14 @@ int main( void )
|
||||
|
||||
case VST_ENQUEUE_MIDI_EVENT:
|
||||
{
|
||||
const midiEvent ev = readValue<midiEvent>();
|
||||
midiEventTypes type =
|
||||
readValue<midiEventTypes>();
|
||||
Sint8 channel = readValue<Sint8>();
|
||||
Uint16 param1 = readValue<Uint16>();
|
||||
Uint16 param2 = readValue<Uint16>();
|
||||
const midiEvent ev = midiEvent( type, channel,
|
||||
param1, param2 );
|
||||
|
||||
const f_cnt_t fr_ahead = readValue<f_cnt_t>();
|
||||
plugin->enqueueMidiEvent( ev, fr_ahead );
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user