mirror of
https://github.com/microtherion/VocalEasel.git
synced 2024-12-22 11:14:00 +00:00
45 lines
915 B
C
45 lines
915 B
C
|
//
|
||
|
// 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
|
||
|
int16_t fMeasure;
|
||
|
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:
|
||
|
MusicSequence fMusic;
|
||
|
size_t fCountIn;
|
||
|
MusicTrack fTrack;
|
||
|
size_t fMeasure;
|
||
|
MusicTimeStamp fChordTime;
|
||
|
MusicTimeStamp fNoteTime;
|
||
|
VLFraction fAt;
|
||
|
VLFraction fTime;
|
||
|
};
|
||
|
|
||
|
// Local Variables:
|
||
|
// mode:C++
|
||
|
// End:
|