2006-09-11 02:49:56 +00:00
|
|
|
//
|
2007-04-27 06:41:34 +00:00
|
|
|
// File: VLDocument.h - VocalEasel document
|
2006-09-11 02:49:56 +00:00
|
|
|
//
|
2007-04-27 06:41:34 +00:00
|
|
|
// Author(s):
|
|
|
|
//
|
|
|
|
// (MN) Matthias Neeracher
|
|
|
|
//
|
2012-04-21 23:48:39 +00:00
|
|
|
// Copyright © 2005-2012 Matthias Neeracher
|
2006-09-11 02:49:56 +00:00
|
|
|
//
|
|
|
|
|
|
|
|
#import "VLModel.h"
|
2006-10-03 17:52:54 +00:00
|
|
|
#import <Cocoa/Cocoa.h>
|
2006-12-04 07:04:24 +00:00
|
|
|
#import "VLKeyValueUndo.h"
|
2011-09-11 21:27:53 +00:00
|
|
|
#import <AudioToolbox/AudioToolbox.h>
|
2006-10-03 17:52:54 +00:00
|
|
|
|
2006-10-28 09:18:55 +00:00
|
|
|
@class VLSheetWindow;
|
2006-09-11 02:49:56 +00:00
|
|
|
|
2011-07-24 03:32:13 +00:00
|
|
|
#define VLBIABType @"VLBIABType"
|
|
|
|
#define VLNativeType @"org.aereperennius.vocaleasel-song"
|
|
|
|
#define VLLilypondType @"org.lilypond.lilypond-source"
|
|
|
|
#define VLMusicXMLType @"VLMusicXMLType"
|
|
|
|
#define VLMMAType @"VLMMAType"
|
2012-04-21 23:48:39 +00:00
|
|
|
#define VLMIDIType @"public.midi-audio"
|
2011-07-24 03:32:13 +00:00
|
|
|
#define VLPDFType @"com.adobe.pdf"
|
|
|
|
#define VLAIFFType @"public.aifc-audio"
|
|
|
|
#define VLMP3Type @"public.mp3"
|
|
|
|
|
2007-12-03 17:45:56 +00:00
|
|
|
enum {
|
|
|
|
kVLPlayAccompaniment = 1,
|
|
|
|
kVLPlayMelody = 2,
|
|
|
|
kVLPlayMetronome = 4,
|
2008-01-24 01:29:18 +00:00
|
|
|
kVLPlayCountIn = 8,
|
|
|
|
kVLPlayGroovePreview = 32768
|
2007-12-03 17:45:56 +00:00
|
|
|
};
|
|
|
|
|
2006-09-11 02:49:56 +00:00
|
|
|
@interface VLDocument : NSDocument
|
|
|
|
{
|
2007-04-18 07:05:04 +00:00
|
|
|
VLSong * song;
|
|
|
|
NSString * lilypondTemplate;
|
|
|
|
NSString * songTitle;
|
|
|
|
NSString * songLyricist;
|
|
|
|
NSString * songComposer;
|
|
|
|
NSString * songArranger;
|
|
|
|
NSString * songGroove;
|
2011-09-04 19:48:57 +00:00
|
|
|
float songTempo;
|
2008-01-26 16:38:30 +00:00
|
|
|
float chordSize;
|
|
|
|
float lyricSize;
|
|
|
|
float staffSize;
|
2011-07-24 03:32:43 +00:00
|
|
|
float topPadding;
|
|
|
|
float titlePadding;
|
|
|
|
float staffPadding;
|
|
|
|
float chordPadding;
|
|
|
|
float lyricPadding;
|
2011-09-04 00:00:26 +00:00
|
|
|
int playElements;
|
2011-09-03 20:34:53 +00:00
|
|
|
NSURL * tmpURL;
|
2007-04-18 07:05:04 +00:00
|
|
|
NSFileWrapper * vcsWrapper;
|
|
|
|
NSMutableDictionary*validTmpFiles;
|
|
|
|
int repeatVolta;
|
|
|
|
bool brandNew;
|
2011-09-11 21:27:53 +00:00
|
|
|
MusicSequence musicSequence;
|
2007-04-18 07:05:04 +00:00
|
|
|
VLSheetWindow * sheetWin;
|
|
|
|
VLKeyValueUndo* undo;
|
2011-09-06 01:15:51 +00:00
|
|
|
VLKeyValueUndo* staffMetrics;
|
2008-01-24 01:29:18 +00:00
|
|
|
NSRange previewRange;
|
2008-05-29 18:54:30 +00:00
|
|
|
float playRate;
|
2008-07-06 11:07:41 +00:00
|
|
|
float baseTempo;
|
2006-09-11 02:49:56 +00:00
|
|
|
}
|
|
|
|
|
2011-09-04 19:48:57 +00:00
|
|
|
@property (nonatomic) float songTempo;
|
2011-09-04 00:00:26 +00:00
|
|
|
@property (nonatomic) int playElements;
|
|
|
|
|
2006-09-11 02:49:56 +00:00
|
|
|
- (VLSong *) song;
|
|
|
|
- (NSNumber *) songKey;
|
|
|
|
- (NSNumber *) songTime;
|
|
|
|
- (NSNumber *) songDivisions;
|
2006-12-30 09:57:40 +00:00
|
|
|
- (int) repeatVolta;
|
2007-01-21 11:34:40 +00:00
|
|
|
- (bool) brandNew;
|
2006-09-11 02:49:56 +00:00
|
|
|
|
2008-01-23 01:20:09 +00:00
|
|
|
- (void) setKey:(int)key transpose:(BOOL)transpose inSections:(NSRange)sections;
|
|
|
|
- (void) setTimeNum:(int)num denom:(int)denom inSections:(NSRange)sections;
|
|
|
|
- (void) setDivisions:(int)divisions inSections:(NSRange)sections;
|
|
|
|
- (void) setGroove:(NSString *)groove inSections:(NSRange)sections;
|
2008-01-24 01:29:18 +00:00
|
|
|
- (void) playWithGroove:(NSString *)groove inSections:(NSRange)sections;
|
2008-04-12 21:33:43 +00:00
|
|
|
- (void) changeOctave:(BOOL)up inSections:(NSRange)sections;
|
2008-01-23 01:20:09 +00:00
|
|
|
|
|
|
|
- (void) setRepeatVolta:(int)repeatVolta;
|
2006-10-03 17:52:54 +00:00
|
|
|
|
2011-09-04 19:48:57 +00:00
|
|
|
- (void) playSong;
|
2012-08-18 22:30:50 +00:00
|
|
|
- (void) endSong;
|
2011-09-04 19:48:57 +00:00
|
|
|
|
2011-09-03 20:34:53 +00:00
|
|
|
- (NSURL *) tmpURL;
|
|
|
|
- (NSURL *) workURL;
|
2006-11-10 08:09:18 +00:00
|
|
|
- (NSString *) baseName;
|
2006-11-12 11:37:36 +00:00
|
|
|
- (NSURL *) fileURLWithExtension:(NSString*)extension;
|
2007-04-18 07:05:04 +00:00
|
|
|
- (void) createTmpFileWithExtension:(NSString*)ext ofType:(NSString*)type;
|
2006-11-12 11:37:36 +00:00
|
|
|
- (NSTask *) taskWithLaunchPath:(NSString *)path arguments:(NSArray *)args;
|
2007-01-12 09:01:19 +00:00
|
|
|
- (void) changedFileWrapper;
|
2006-12-04 07:04:24 +00:00
|
|
|
- (void) willChangeSong;
|
|
|
|
- (void) didChangeSong;
|
2006-11-10 08:09:18 +00:00
|
|
|
|
2006-09-11 02:49:56 +00:00
|
|
|
@end
|
2006-11-10 08:09:18 +00:00
|
|
|
|
|
|
|
// Local Variables:
|
|
|
|
// mode:ObjC
|
|
|
|
// End:
|