78 lines
1.5 KiB
C++
78 lines
1.5 KiB
C++
#ifndef _GUITAR_TABENTRY_HPP_
|
|
#define _GUITAR_TABENTRY_HPP_
|
|
#ifndef _COMMON_BLOCK_HPP_
|
|
#include <common/block.hpp>
|
|
#endif
|
|
#ifndef _GUITAR_FRETTEDNOTE_HPP_
|
|
#include <guitar/FrettedNote.hpp>
|
|
#endif
|
|
#ifndef _GUITAR_NOTETYPE_HPP_
|
|
#include <guitar/NoteType.hpp>
|
|
#endif
|
|
#ifndef _GUITAR_TIMING_HPP_
|
|
#include <guitar/timing.hpp>
|
|
#endif
|
|
#ifndef _MUSIC_CHORD_HPP_
|
|
#include <music/chord.hpp>
|
|
#endif
|
|
|
|
class MIDIOutputDevice;
|
|
|
|
class TabEntry;
|
|
typedef Block<TabEntry> TabEntries;
|
|
|
|
class TabEntry : public Block<FrettedNote>
|
|
{
|
|
public:
|
|
TabEntry();
|
|
TabEntry(const TabEntry &entry);
|
|
virtual ~TabEntry();
|
|
bool play(MIDIOutputDevice &midiDevice,bool useDelay=true)const;
|
|
bool operator==(const TabEntry &entry)const;
|
|
TabEntry &operator=(const TabEntry &entry);
|
|
const NoteType &getNoteType(void)const;
|
|
void setNoteType(const NoteType ¬eType);
|
|
String toString(void)const;
|
|
bool fromString(String strText);
|
|
bool fromChord(const Music::Chord &chord);
|
|
bool contains(int string,int &entryIndex);
|
|
bool contains(int string);
|
|
bool remove(int string,int fret);
|
|
void remove(void);
|
|
bool addFrettedNote(int string,const FrettedNote &frettedNote);
|
|
bool setFrettedNote(int string,const FrettedNote &frettedNote);
|
|
private:
|
|
void delay(void)const;
|
|
|
|
NoteType mNoteType;
|
|
};
|
|
|
|
inline
|
|
TabEntry::TabEntry()
|
|
{
|
|
}
|
|
|
|
inline
|
|
TabEntry::~TabEntry()
|
|
{
|
|
}
|
|
|
|
inline
|
|
const NoteType &TabEntry::getNoteType(void)const
|
|
{
|
|
return mNoteType;
|
|
}
|
|
|
|
inline
|
|
void TabEntry::setNoteType(const NoteType ¬eType)
|
|
{
|
|
mNoteType=noteType;
|
|
}
|
|
|
|
inline
|
|
void TabEntry::remove(void)
|
|
{
|
|
Block<FrettedNote>::remove();
|
|
}
|
|
#endif
|