change to version 0.6.1 Beta1
git-svn-id: https://svn.code.sf.net/p/pianobooster/code/trunk@32 ba081f5d-443b-49a7-ac4b-446c3f91f371
This commit is contained in:
parent
684d814571
commit
8c7126ca43
|
@ -113,6 +113,27 @@ QT4_WRAP_CPP( PIANOBOOSTER_MOC_SRCS ${PIANOBOOSTER_MOC_HDRS} )
|
|||
# (CMAKE_BINARY_DIR holds a path to the build directory, while INCLUDE_DIRECTORIES() works just like INCLUDEPATH from qmake)
|
||||
INCLUDE_DIRECTORIES( ${CMAKE_BINARY_DIR} ${OPENGL_INCLUDE_DIR})
|
||||
|
||||
# tell CMake what libraries our executable needs,
|
||||
# luckily FIND_PACKAGE prepared QT_LIBRARIES variable for us:
|
||||
LINK_LIBRARIES( ${QT_LIBRARIES} )
|
||||
|
||||
# Add in the link libraries for each operating system
|
||||
IF(${CMAKE_SYSTEM} MATCHES "Linux")
|
||||
LINK_LIBRARIES (asound)
|
||||
ENDIF(${CMAKE_SYSTEM} MATCHES "Linux")
|
||||
|
||||
IF(${CMAKE_SYSTEM} MATCHES "Windows")
|
||||
FIND_PACKAGE(WINDRES REQUIRED)
|
||||
ADD_DEFINITIONS(-D__WINDOWS_MM__)
|
||||
LINK_LIBRARIES(winmm opengl32)
|
||||
ENDIF(${CMAKE_SYSTEM} MATCHES "Windows")
|
||||
|
||||
IF(${CMAKE_SYSTEM} MATCHES "Darwin")
|
||||
ADD_DEFINITIONS(-D__MACOSX_CORE__)
|
||||
LINK_LIBRARIES("-framework CoreMidi -framework CoreAudio -framework CoreFoundation -framework OpenGL")
|
||||
ENDIF(${CMAKE_SYSTEM} MATCHES "Darwin")
|
||||
|
||||
|
||||
# here we instruct CMake to build "pianobooster" executable from all of the source files
|
||||
ADD_EXECUTABLE( pianobooster ${PIANOBOOSTER_SRCS} ${PIANOBOOSTER_MOC_SRCS}
|
||||
${PIANOBOOSTER_RC_SRCS}
|
||||
|
@ -123,13 +144,3 @@ SET_TARGET_PROPERTIES(pianobooster PROPERTIES COMPILE_FLAGS "-Wall")
|
|||
SET_TARGET_PROPERTIES(pianobooster PROPERTIES LINK_FLAGS "-mwindows")
|
||||
|
||||
|
||||
# last thing we have to do is to tell CMake what libraries our executable needs,
|
||||
# luckily FIND_PACKAGE prepared QT_LIBRARIES variable for us:
|
||||
TARGET_LINK_LIBRARIES( pianobooster ${QT_LIBRARIES} )
|
||||
|
||||
IF(UNIX)
|
||||
TARGET_LINK_LIBRARIES (pianobooster asound)
|
||||
ELSE(UNIX)
|
||||
TARGET_LINK_LIBRARIES (pianobooster Winmm.lib opengl32)
|
||||
ENDIF(UNIX)
|
||||
|
||||
|
|
|
@ -53,6 +53,7 @@ public:
|
|||
m_deltaTime = 0;
|
||||
m_av8Left = 0;
|
||||
m_av8Right = 0;
|
||||
m_maxLeftEdge = 0;
|
||||
}
|
||||
|
||||
CSymbol getSymbol(int index) {return m_symbols[index];}
|
||||
|
@ -61,6 +62,8 @@ public:
|
|||
void setDeltaTime(int delta) {m_deltaTime = delta;}
|
||||
void addDeltaTime(int delta) {m_deltaTime += delta;}
|
||||
int getDeltaTime() {return m_deltaTime;}
|
||||
int getLeftSideDeltaTime() {return m_deltaTime + m_maxLeftEdge;}
|
||||
|
||||
void setAv8Left(int val) {m_av8Left = val;}
|
||||
int getAv8Left() {return m_av8Left;}
|
||||
|
||||
|
@ -113,6 +116,18 @@ public:
|
|||
if (note == m_symbols[i].getNote() || note == 0)
|
||||
m_symbols[i].setPianistTiming(timing);
|
||||
}
|
||||
if (timing < m_maxLeftEdge)
|
||||
m_maxLeftEdge = timing;
|
||||
ppTrace("m_maxLeftEdge %d %d", m_maxLeftEdge, timing); //fixme
|
||||
}
|
||||
|
||||
void clearAllNoteTimmings()
|
||||
{
|
||||
for (int i = 0; i < m_length; i++)
|
||||
{
|
||||
m_symbols[i].setPianistTiming(NOT_USED);
|
||||
}
|
||||
m_maxLeftEdge = 0;
|
||||
}
|
||||
|
||||
protected:
|
||||
|
@ -124,6 +139,7 @@ private:
|
|||
int m_length;
|
||||
int m_av8Left;
|
||||
int m_av8Right;
|
||||
int m_maxLeftEdge; // the furthest the note will appear on the left hand edge (used when removing the note)
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -121,6 +121,7 @@ Window::~Window()
|
|||
{
|
||||
delete m_settings;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//! @brief Displays the usage
|
||||
void Window::displayUsage()
|
||||
|
|
|
@ -8,20 +8,23 @@ v0.5.1: (1 January 2009)
|
|||
- changed the wrong note sound to use a separate midi channel.
|
||||
- on Windows removed the dos console
|
||||
|
||||
v0.5.2 svn: (1 February 2009)
|
||||
v0.5.2 beta1: (7 March 2009)
|
||||
- Added a play from bar (so you can start from playing any bar)
|
||||
- Added a latency fix for high latency sound generators (e.g. the windows GS software synth)
|
||||
(requires a piano keyboard _with_ it's own speakers/sound generator)
|
||||
- Added the ability to "mute your part when playing" along.
|
||||
- May have reduced the flickering especially on windows with a low spec machine
|
||||
- Added a piano volume slider (so you can adjust the volume of your piano with compaired
|
||||
to the accompaniment)
|
||||
- Added a piano volume slider (so you can adjust the volume of your piano with compared
|
||||
to the accompaniment)
|
||||
- Added an icon for the Piano Booster main window.
|
||||
- Fix a bug when swapping hands in the middle of a piece.
|
||||
- Fix a bug left or right now correctly dim the other stave.
|
||||
- Added start-up checks that Open GL is present.
|
||||
- Fix the pulse of sound when stopping the music
|
||||
- Added timing markers.
|
||||
|
||||
|
||||
*/
|
||||
|
||||
#define PB_VERSION "0.5.2 SVN"
|
||||
#define PB_VERSION "0.6.1 Beta1"
|
||||
|
||||
|
|
|
@ -98,17 +98,32 @@ bool CScroll::insertSlots()
|
|||
m_headSlot = m_notation->nextSlot();
|
||||
if (m_headSlot.length() == 0 || m_headSlot.getSymbolType(0) == PB_SYMBOL_theEnd) // this means we have reached the end of the file
|
||||
return false;
|
||||
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void CScroll::removeEarlyTimingMakers()
|
||||
{
|
||||
int delta = deltaAdjust(m_deltaTail) * m_noteSpacingFactor + Cfg::playZoneX() - Cfg::scrollStartX() - NOTE_AHEAD_GAP;
|
||||
// only look a few steps (10) into the scroll queue
|
||||
for (int i = 0; i < 10 && i < m_scrollQueue->length(); i++ )
|
||||
{
|
||||
if (delta < -(m_scrollQueue->index(i).getLeftSideDeltaTime() * m_noteSpacingFactor))
|
||||
{
|
||||
m_scrollQueue->indexPtr(i)->clearAllNoteTimmings();
|
||||
compileSlot(m_scrollQueue->index(i));
|
||||
}
|
||||
delta += m_scrollQueue->index(i).getDeltaTime() * m_noteSpacingFactor;
|
||||
}
|
||||
}
|
||||
|
||||
void CScroll::removeSlots()
|
||||
{
|
||||
while (m_scrollQueue->length() > 0)
|
||||
{
|
||||
if (deltaAdjust(m_deltaTail) * m_noteSpacingFactor > -Cfg::playZoneX() + Cfg::scrollStartX() + NOTE_AHEAD_GAP -(m_scrollQueue->index(0).getDeltaTime() * m_noteSpacingFactor) )
|
||||
if (deltaAdjust(m_deltaTail) * m_noteSpacingFactor > -Cfg::playZoneX() + Cfg::scrollStartX() + NOTE_AHEAD_GAP -(m_scrollQueue->index(0).getLeftSideDeltaTime() * m_noteSpacingFactor) )
|
||||
break;
|
||||
|
||||
CSlotDisplayList info = m_scrollQueue->pop();
|
||||
|
||||
m_deltaTail += info.getDeltaTime() * SPEED_ADJUST_FACTOR;
|
||||
|
@ -123,9 +138,6 @@ void CScroll::removeSlots()
|
|||
{
|
||||
m_wantedIndex = 0;
|
||||
m_wantedDelta = m_deltaTail;
|
||||
//if (m_scrollQueue->length() >= 1)
|
||||
// m_wantedDelta += m_scrollQueue->indexPtr(0)->getDeltaTime() * SPEED_ADJUST_FACTOR;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -136,6 +148,7 @@ void CScroll::drawScrollingSymbols(bool show)
|
|||
{
|
||||
insertSlots(); // new symbols at the end of the score
|
||||
removeSlots(); // delete old symbols no longer required
|
||||
removeEarlyTimingMakers();
|
||||
|
||||
if (show == false) // Just update the queue only
|
||||
return;
|
||||
|
@ -211,7 +224,7 @@ void CScroll::setPlayedNoteColour(int note, CColour colour, int wantedDelta, int
|
|||
{
|
||||
pianistTimming = deltaAdjust(pianistTimming) * DEFAULT_PPQN / CMidiFile::getPulsesPerQuarterNote();
|
||||
|
||||
m_scrollQueue->indexPtr(index)->setNoteTimming(note, pianistTimming);
|
||||
m_scrollQueue->indexPtr(index)->setNoteTimming(note, -pianistTimming);//fixme
|
||||
}
|
||||
compileSlot(m_scrollQueue->index(index));
|
||||
}
|
||||
|
|
|
@ -87,6 +87,7 @@ private:
|
|||
bool validPianistChord(int index);
|
||||
bool insertSlots();
|
||||
void removeSlots();
|
||||
void removeEarlyTimingMakers();
|
||||
int findWantedChord(int note, CColour colour, int wantedDelta);
|
||||
|
||||
int m_id; // There are lots of these class running but each class has a unique id
|
||||
|
|
Loading…
Reference in New Issue