VocalEasel/Sources/VLMIDIWriter.h

49 lines
1.0 KiB
C
Raw Normal View History

2008-05-29 18:54:30 +00:00
//
// File: VLMIDIWriter.h
//
// Author(s):
//
// (MN) Matthias Neeracher
//
// Copyright © 2008 Matthias Neeracher
//
#include "VLModel.h"
#include <CoreFoundation/CoreFoundation.h>
#include <AudioToolbox/AudioToolbox.h>
struct VLMIDIUserEvent {
uint32_t fLength;
int8_t fPitch; // 0 -> Chord
2008-07-05 13:55:41 +00:00
uint8_t fStanza;
2008-05-29 18:54:30 +00:00
int16_t fMeasure;
uint32_t fVisual;
2008-05-29 18:54:30 +00:00
VLFract fAt;
};
class VLMIDIWriter: public VLSongVisitor {
public:
VLMIDIWriter(MusicSequence music, size_t countIn)
: fMusic(music), fCountIn(countIn) {}
virtual void Visit(VLSong & song);
virtual void VisitMeasure(size_t m, VLProperties & p, VLMeasure & meas);
virtual void VisitNote(VLLyricsNote & n);
virtual void VisitChord(VLChord & c);
private:
2008-07-05 13:55:41 +00:00
MusicSequence fMusic;
size_t fCountIn;
MusicTrack fTrack;
size_t fMeasure;
size_t fStanza;
MusicTimeStamp fChordTime;
MusicTimeStamp fNoteTime;
VLFraction fAt;
VLFraction fTime;
std::vector<uint8_t> fVolta;
2008-05-29 18:54:30 +00:00
};
// Local Variables:
// mode:C++
// End: