Skip to content

Commit

Permalink
add feature recorded midi nots are undo/redo able. add undo/redo midi…
Browse files Browse the repository at this point in the history
…_action. reformat hydrogen.cpp

git-svn-id: http://svn.assembla.com/svn/hydrogen/trunk@2481 3b3fb362-3133-0410-aa15-cf69e0a59cb7
  • Loading branch information
wolkstein committed Apr 2, 2012
1 parent ac2053d commit e788a0c
Show file tree
Hide file tree
Showing 12 changed files with 2,591 additions and 2,413 deletions.
21 changes: 20 additions & 1 deletion src/core/include/hydrogen/event_queue.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#define EVENT_QUEUE_H

#include <hydrogen/object.h>
#include <hydrogen/basics/note.h>
#include <cassert>

#define MAX_EVENTS 1024
Expand All @@ -46,7 +47,8 @@ enum EventType {
EVENT_RECALCULATERUBBERBAND,
EVENT_PROGRESS,
EVENT_JACK_SESSION,
EVENT_PLAYLIST_LOADSONG
EVENT_PLAYLIST_LOADSONG,
EVENT_UNDO_REDO
};


Expand All @@ -71,6 +73,23 @@ class EventQueue : public H2Core::Object
void push_event( EventType type, int nValue );
Event pop_event();

struct AddMidiNoteVector
{
int m_column; //position
int m_row; //instrument row
int m_pattern; // pattern number
int m_length;
float f_velocity;
float f_pan_L;
float f_pan_R;
Note::Key nk_noteKeyVal;
Note::Octave no_octaveKeyVal;
bool b_isMidi;
bool b_isInstrumentMode;
bool b_noteExist;
};
std::vector<AddMidiNoteVector> m_addMidiNoteVector;

private:
EventQueue();
static EventQueue *__instance;
Expand Down
Loading

0 comments on commit e788a0c

Please sign in to comment.