Subversion Repositories svn.mios32

Rev

Rev 2552 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
174 tk 1
// $Id: seq_layer.h 2635 2019-01-06 17:14:01Z tk $
2
/*
3
 * Header file for parameter layer routines
4
 *
5
 * ==========================================================================
6
 *
7
 *  Copyright (C) 2008 Thorsten Klose (tk@midibox.org)
8
 *  Licensed for personal non-commercial use only.
9
 *  All other rights reserved.
10
 *
11
 * ==========================================================================
12
 */
13
 
14
#ifndef _SEQ_LAYER_H
15
#define _SEQ_LAYER_H
16
 
17
/////////////////////////////////////////////////////////////////////////////
18
// Global definitions
19
/////////////////////////////////////////////////////////////////////////////
20
 
21
 
22
/////////////////////////////////////////////////////////////////////////////
23
// Global Types
24
/////////////////////////////////////////////////////////////////////////////
25
 
26
typedef struct {
27
  mios32_midi_package_t midi_package;
178 tk 28
  s16                   len;
419 tk 29
  u8                    layer_tag;
174 tk 30
} seq_layer_evnt_t;
31
 
32
 
176 tk 33
typedef enum {
319 tk 34
  SEQ_EVENT_MODE_Note,
35
  SEQ_EVENT_MODE_Chord,
36
  SEQ_EVENT_MODE_CC,
1211 tk 37
  SEQ_EVENT_MODE_Drum,
1316 tk 38
  SEQ_EVENT_MODE_Combined,
319 tk 39
} seq_event_mode_t;
40
 
41
 
174 tk 42
/////////////////////////////////////////////////////////////////////////////
43
// Prototypes
44
/////////////////////////////////////////////////////////////////////////////
45
 
46
extern s32 SEQ_LAYER_Init(u32 mode);
47
 
1313 tk 48
extern s32 SEQ_LAYER_ResetLatchedValues(void);
49
 
2092 tk 50
extern s32 SEQ_LAYER_ResetTrackPCBankLatchedValues(void);
51
extern s32 SEQ_LAYER_SendPCBankValues(u8 track, u8 force, u8 send_now);
52
 
2635 tk 53
extern s32 SEQ_LAYER_PresetDrumNoteSet(u8 num, u8 note);
54
extern s32 SEQ_LAYER_PresetDrumNoteGet(u8 num);
55
 
747 tk 56
extern const char *SEQ_LAYER_GetEvntModeName(seq_event_mode_t event_mode);
57
 
336 tk 58
extern s32 SEQ_LAYER_GetEvntOfLayer(u8 track, u16 step, u8 layer, u8 instrument, seq_layer_evnt_t *layer_event);
174 tk 59
 
2551 tk 60
#ifdef MBSEQV4P
61
extern s32 SEQ_LAYER_GetEventsPlus(u8 track, u16 step, seq_layer_evnt_t layer_events[80], u8 insert_empty_notes);
62
#else
457 tk 63
extern s32 SEQ_LAYER_GetEvents(u8 track, u16 step, seq_layer_evnt_t layer_events[16], u8 insert_empty_notes);
2551 tk 64
#endif
1211 tk 65
 
419 tk 66
extern s32 SEQ_LAYER_RecEvent(u8 track, u16 step, seq_layer_evnt_t layer_event);
323 tk 67
 
1771 tk 68
extern s32 SEQ_LAYER_DirectSendEvent(u8 track, u8 par_layer);
69
 
335 tk 70
extern s32 SEQ_LAYER_CopyPreset(u8 track, u8 only_layers, u8 all_triggers_cleared, u8 init_assignments);
333 tk 71
extern s32 SEQ_LAYER_CopyParLayerPreset(u8 track, u8 par_layer);
176 tk 72
 
178 tk 73
 
174 tk 74
/////////////////////////////////////////////////////////////////////////////
75
// Export global variables
76
/////////////////////////////////////////////////////////////////////////////
77
 
333 tk 78
// to display activity of selected track in trigger/parameter selection page
79
extern u8 seq_layer_vu_meter[16];
174 tk 80
 
2552 tk 81
#ifdef MBSEQV4P
82
// Drum CC configuration
83
extern u8 seq_layer_drum_cc[16][4]; // up to 4 parameter layers per drum
84
#endif
333 tk 85
 
2552 tk 86
 
174 tk 87
#endif /* _SEQ_LAYER_H */