Skip to content

Commit

Permalink
dynamic tempo, online help, filter directories
Browse files Browse the repository at this point in the history
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@469 0778d3d1-df1d-0410-868b-ea421aaaa00d
  • Loading branch information
Javier Serrano Polo committed Mar 28, 2007
1 parent 799d87c commit 52d9ca4
Show file tree
Hide file tree
Showing 15 changed files with 217 additions and 49 deletions.
29 changes: 29 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,32 @@
2007-03-28 Javier Serrano Polo <jasp00/at/terra/dot/es>

* include/mixer.h:
* include/note_play_handle.h:
* src/core/note_play_handle.cpp:
* src/core/song_editor.cpp:
fixed notes with dynamic tempo

* include/main_window.h:
* src/core/main_window.cpp:
added online help

* include/file_browser.h:
* src/core/file_browser.cpp:
- filter directories without relevant content
- simplified entry retrieval

* include/basic_filters.h:
limit Moog instability

* src/core/main.cpp:
updated year

* src/widgets/knob.cpp:
initialize members according to last arrangement

* data/locale/ca.ts:
updated translation

2007-03-26 Tobias Doerffel <tobydox/at/users/dot/sourceforge/dot/net>

* configure.in:
Expand Down
4 changes: 2 additions & 2 deletions configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
# Process this file with autoconf to produce a configure script.

AC_PREREQ(2.50)
AC_INIT(lmms, 0.2.1-svn20070325, lmms-devel/at/lists/dot/sf/dot/net)
AM_INIT_AUTOMAKE(lmms, 0.2.1-svn20070325)
AC_INIT(lmms, 0.2.1-svn20070328, lmms-devel/at/lists/dot/sf/dot/net)
AM_INIT_AUTOMAKE(lmms, 0.2.1-svn20070328)

AM_CONFIG_HEADER(config.h)

Expand Down
Binary file modified data/locale/ca.qm
Binary file not shown.
9 changes: 9 additions & 0 deletions data/locale/ca.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2338,6 +2338,15 @@ Per favor, visita http://wiki.mindrules.net per a documentació sobre LMMS.</tra
<source>MultiMedia Project (*.mmp *.mmpz);;MultiMedia Project Template (*.mpt)</source>
<translation>Projecte MultiMèdia (*.mmp *.mmpz);;Plantilla de Projecte MultiMèdia (*.mpt)</translation>
</message>
<message>
<source>Online help</source>
<translation>Ajuda en línia</translation>
</message>
<message>
<source>start</source>
<comment>doku.php id</comment>
<translation>start</translation>
</message>
</context>
<context>
<name>mallets</name>
Expand Down
26 changes: 17 additions & 9 deletions include/basic_filters.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* original file by ???
* modified and enhanced by Tobias Doerffel
*
* Copyright (c) 2004-2006 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2004-2007 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
Expand Down Expand Up @@ -115,14 +115,22 @@ class basicFilters

// four cascaded onepole filters
// (bilinear transform)
m_y1[_chnl] = x*m_p + m_oldx[_chnl]*m_p -
m_k*m_y1[_chnl];
m_y2[_chnl] = m_y1[_chnl]*m_p+m_oldy1[_chnl]*
m_p - m_k*m_y2[_chnl];
m_y3[_chnl] = m_y2[_chnl]*m_p+m_oldy2[_chnl]*
m_p - m_k*m_y3[_chnl];
m_y4[_chnl] = m_y3[_chnl]*m_p+m_oldy3[_chnl]*
m_p - m_k*m_y4[_chnl];
m_y1[_chnl] = tLimit(
x*m_p + m_oldx[_chnl]*m_p -
m_k*m_y1[_chnl],
-10.0f, 10.0f );
m_y2[_chnl] = tLimit(
m_y1[_chnl]*m_p+m_oldy1[_chnl]*
m_p - m_k*m_y2[_chnl],
-10.0f, 10.0f );
m_y3[_chnl] = tLimit(
m_y2[_chnl]*m_p+m_oldy2[_chnl]*
m_p - m_k*m_y3[_chnl],
-10.0f, 10.0f );
m_y4[_chnl] = tLimit(
m_y3[_chnl]*m_p+m_oldy3[_chnl]*
m_p - m_k*m_y4[_chnl],
-10.0f, 10.0f );

m_oldx[_chnl] = x;
m_oldy1[_chnl] = m_y1[_chnl];
Expand Down
5 changes: 4 additions & 1 deletion include/file_browser.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* file_browser.h - include file for fileBrowser
*
* Copyright (c) 2004-2006 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2004-2007 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
Expand Down Expand Up @@ -68,6 +68,9 @@ class fileBrowser : public sideBarWidget, public engineObject
QWidget * _parent, engine * _engine );
virtual ~fileBrowser();

static bool isDirWithContent( const QString & _path,
const QString & _filter );


public slots:
void reloadTree( void );
Expand Down
5 changes: 4 additions & 1 deletion include/main_window.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* main_window.h - declaration of class mainWindow, the main window of LMMS
*
* Copyright (c) 2004-2006 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2004-2007 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
Expand Down Expand Up @@ -169,11 +169,14 @@ public slots:
QMenu * m_tools_menu;
vlist<tool *> m_tools;

bool have_www_browser( void );


friend class engine;


private slots:
void browseHelp( void );
void fillTemplatesMenu( void );
void showTool( int _idx );

Expand Down
7 changes: 6 additions & 1 deletion include/mixer.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* mixer.h - audio-device-independent mixer for LMMS
*
* Copyright (c) 2004-2006 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2004-2007 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
Expand Down Expand Up @@ -182,6 +182,11 @@ class mixer : public QObject, public engineObject
return( m_playHandles );
}

inline playHandleVector & playHandles( void )
{
return( m_playHandles );
}

void checkValidityOfPlayHandles( void );

inline bool haveNoRunningNotes( void ) const
Expand Down
5 changes: 5 additions & 0 deletions include/note_play_handle.h
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ class notePlayHandle : public QObject, public playHandle, public note
}

void processMidiTime( const midiTime & _time );
void resize( const bpm_t _new_bpm );

#if SINGERBOT_SUPPORT
int patternIndex( void )
Expand Down Expand Up @@ -250,6 +251,10 @@ class notePlayHandle : public QObject, public playHandle, public note
int m_patternIndex; // position among relevant notes
#endif

// tempo reaction
bpm_t m_orig_bpm; // original bpm
f_cnt_t m_orig_frames; // original m_frames


private slots:
void updateFrequency( void );
Expand Down
74 changes: 52 additions & 22 deletions src/core/file_browser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* file_browser.cpp - implementation of the project-, preset- and
* sample-file-browser
*
* Copyright (c) 2004-2006 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2004-2007 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
Expand Down Expand Up @@ -160,7 +160,7 @@ void fileBrowser::reloadTree( void )
void fileBrowser::addItems( const QString & _path )
{
QDir cdir( _path );
QStringList files = cdir.entryList( QDir::NoFilter, QDir::Name );
QStringList files = cdir.entryList( QDir::Files, QDir::Name );

// TODO: after dropping qt3-support we can use QStringList's iterator
// which makes it possible to travel through the list in reverse
Expand All @@ -169,9 +169,7 @@ void fileBrowser::addItems( const QString & _path )
for( csize i = 0; i < files.size(); ++i )
{
QString cur_file = files[files.size() - i - 1];
if( cur_file[0] != '.' &&
QFileInfo( _path + QDir::separator() +
cur_file ).isDir() == FALSE
if( cur_file[0] != '.'
#ifdef QT4
// TBD
#else
Expand All @@ -185,12 +183,13 @@ void fileBrowser::addItems( const QString & _path )
}
}

files = cdir.entryList( QDir::Dirs, QDir::Name );
for( csize i = 0; i < files.size(); ++i )
{
QString cur_file = files[files.size() - i - 1];
if( cur_file[0] != '.' &&
QFileInfo( _path + QDir::separator() +
cur_file ).isDir() )
isDirWithContent( _path + QDir::separator() + cur_file,
m_filter ) )
{
QListViewItem * item = m_l->findItem( cur_file, 0 );
if( item == NULL )
Expand All @@ -210,6 +209,44 @@ void fileBrowser::addItems( const QString & _path )



bool fileBrowser::isDirWithContent( const QString & _path,
const QString & _filter )
{
QDir cdir( _path );
QStringList files = cdir.entryList( QDir::Files, QDir::Unsorted );
for( QStringList::iterator it = files.begin(); it != files.end(); ++it )
{
QString cur_file = *it;
if( cur_file[0] != '.'
#ifdef QT4
// TBD
#else
&& QDir::match( _filter, cur_file.lower() )
#endif
)
{
return( TRUE );
}
}

files = cdir.entryList( QDir::Dirs, QDir::Unsorted );
for( QStringList::iterator it = files.begin(); it != files.end(); ++it )
{
QString cur_file = *it;
if( cur_file[0] != '.' &&
isDirWithContent( _path + QDir::separator() + cur_file,
_filter ) )
{
return( TRUE );
}
}

return( FALSE );
}




void fileBrowser::keyPressEvent( QKeyEvent * _ke )
{
if( _ke->key() == Qt::Key_F5 )
Expand Down Expand Up @@ -740,41 +777,34 @@ bool directory::addItems( const QString & _path )

bool added_something = FALSE;

QStringList files = thisDir.entryList( QDir::NoFilter, QDir::Name );
QStringList files = thisDir.entryList( QDir::Files, QDir::Name );
for( csize i = 0; i < files.size(); ++i )
{
QString cur_file = files[files.size() - i - 1];
if( cur_file[0] != '.'
#ifdef QT4
if( cur_file[0] != '.' && !QFileInfo(
thisDir.absolutePath() + QDir::separator() +
cur_file ).isDir() &&
thisDir.match( m_filter, cur_file.toLower() )
/*QDir::match( FILE_FILTER, cur_file )*/ )
&& thisDir.match( m_filter, cur_file.toLower() )
#else
if( cur_file[0] != '.' && !QFileInfo(
thisDir.absPath() + QDir::separator() +
cur_file ).isDir() &&
thisDir.match( m_filter, cur_file.lower() )
/*QDir::match( FILE_FILTER, cur_file )*/ )
&& thisDir.match( m_filter, cur_file.lower() )
#endif
/*QDir::match( FILE_FILTER, cur_file )*/ )
{
(void) new fileItem( this, cur_file, _path );
added_something = TRUE;
}
}

files = thisDir.entryList( QDir::Dirs, QDir::Name );
for( csize i = 0; i < files.size(); ++i )
{
QString cur_file = files[files.size() - i - 1];
if( cur_file[0] != '.' && fileBrowser::isDirWithContent(
#ifdef QT4
if( cur_file[0] != '.' && QFileInfo(
thisDir.absolutePath() + QDir::separator() +
cur_file ).isDir() )
#else
if( cur_file[0] != '.' && QFileInfo(
thisDir.absPath() + QDir::separator() +
cur_file ).isDir() )
#endif
cur_file, m_filter ) )
{
new directory( this, cur_file, _path, m_filter );
added_something = TRUE;
Expand Down
6 changes: 3 additions & 3 deletions src/core/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/*
* main.cpp - just main.cpp which is starting up app...
*
* Copyright (c) 2004-2006 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2004-2007 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
Expand Down Expand Up @@ -101,7 +101,7 @@ int main( int argc, char * * argv )
QString( app.argv()[i] ) == "-v" )
{
printf( "\nLinux MultiMedia Studio %s\n\n"
"Copyright (c) 2004-2006 Tobias Doerffel and others.\n\n"
"Copyright (c) 2004-2007 Tobias Doerffel and others.\n\n"
"This program is free software; you can redistribute it and/or\n"
"modify it under the terms of the GNU General Public\n"
"License as published by the Free Software Foundation; either\n"
Expand All @@ -115,7 +115,7 @@ int main( int argc, char * * argv )
QString( app.argv()[i] ) == "-h" ) )
{
printf( "\nLinux MultiMedia Studio %s\n"
"Copyright (c) 2004-2006 Tobias Doerffel and others.\n\n"
"Copyright (c) 2004-2007 Tobias Doerffel and others.\n\n"
"usage: lmms [ -r <file_to_render> [ -o <format> ] [ -h ] "
"[ <file_to_load> ]\n"
"-r, --render render given file.\n"
Expand Down
Loading

0 comments on commit 52d9ca4

Please sign in to comment.