38#define PTTTL_VERSION "v0.2.0"
45#ifndef PTTTL_MAX_CHANNELS_PER_FILE
46#define PTTTL_MAX_CHANNELS_PER_FILE (16u)
55#ifndef PTTTL_MAX_NAME_LEN
56#define PTTTL_MAX_NAME_LEN (256u)
61#define PTTTL_NOTE_VIBRATO_FREQ(note) (((note)->vibrato_settings) & 0xffffu)
64#define PTTTL_NOTE_VIBRATO_VAR(note) ((((note)->vibrato_settings) >> 16u) & 0xffffu)
67#define PTTTL_NOTE_VALUE(note) (((note)->note_settings) & 0x7fu)
70#define PTTTL_NOTE_DURATION(note) ((((note)->note_settings) >> 7u) & 0xffffu)
126 int (*read)(
char *input_char);
139 int (*seek)(uint32_t position);
int ptttl_parse_init(ptttl_parser_t *parser, ptttl_parser_input_iface_t iface)
#define PTTTL_MAX_CHANNELS_PER_FILE
Definition: ptttl_parser.h:46
int ptttl_parse_next(ptttl_parser_t *parser, uint32_t channel_idx, ptttl_output_note_t *note)
ptttl_parser_error_t ptttl_parser_error(ptttl_parser_t *state)
#define PTTTL_MAX_NAME_LEN
Definition: ptttl_parser.h:56
Definition: ptttl_parser.h:77
uint32_t note_settings
Definition: ptttl_parser.h:87
uint32_t vibrato_settings
Definition: ptttl_parser.h:94
Definition: ptttl_parser.h:148
const char * error_message
Human-readable error message.
Definition: ptttl_parser.h:149
int column
Column number within input text.
Definition: ptttl_parser.h:151
int line
Line number within input text.
Definition: ptttl_parser.h:150
Definition: ptttl_parser.h:159
unsigned int default_duration
Default note duration from the "settings" section.
Definition: ptttl_parser.h:162
ptttl_parser_error_t error
Last parsing error that occurred.
Definition: ptttl_parser.h:166
uint32_t channel_count
Total number of channels present in input text.
Definition: ptttl_parser.h:167
ptttl_parser_input_iface_t iface
Input interface for reading PTTTL source.
Definition: ptttl_parser.h:171
unsigned int default_vibrato_freq
Default vibrato frequency from the "settings" section.
Definition: ptttl_parser.h:164
ptttl_parser_input_stream_t stream
Input stream used for 'settings' section.
Definition: ptttl_parser.h:169
unsigned int default_vibrato_var
Default vibrato variance from the "settings" section.
Definition: ptttl_parser.h:165
unsigned int bpm
BPM from the "settings" section.
Definition: ptttl_parser.h:161
unsigned int default_octave
Default octave from the "settings" section.
Definition: ptttl_parser.h:163
ptttl_parser_input_stream_t * active_stream
Input stream currently being parsed.
Definition: ptttl_parser.h:168