MIDI-SoundFont
view release on metacpan or search on metacpan
doc/timidity/playmidi.c view on Meta::CPAN
#ifdef REDUCE_VOICE_TIME_TUNING
static int max_good_nv = 1;
static int min_bad_nv = 256;
static int32 ok_nv_total = 32;
static int32 ok_nv_counts = 1;
static int32 ok_nv_sample = 0;
static int ok_nv = 32;
static int old_rate = -1;
#endif
static int midi_streaming = 0;
int volatile stream_max_compute = 500; /* compute time limit (in msec) when streaming */
static int prescanning_flag;
static int32 midi_restart_time = 0;
Channel channel[MAX_CHANNELS];
int max_voices = DEFAULT_VOICES;
Voice *voice = NULL;
int8 current_keysig = 0;
int8 current_temper_keysig = 0;
int temper_adj = 0;
int8 opt_init_keysig = 8;
int8 opt_force_keysig = 8;
doc/timidity/playmidi.c view on Meta::CPAN
if (playing) {
kill_all_voices();
if (temper_type_mute) {
if (temper_type_mute & 1)
FILL_CHANNELMASK(channel_mute);
else
CLEAR_CHANNELMASK(channel_mute);
}
for (i = 0; i < MAX_CHANNELS; i++)
redraw_controllers(i);
if (midi_streaming && free_instruments_afterwards) {
free_instruments(0);
/* free unused memory */
cnt = free_global_mblock();
if (cnt > 0)
ctl->cmsg(CMSG_INFO, VERB_VERBOSE,
"%d memory blocks are free", cnt);
}
} else
reset_voices();
master_volume_ratio = 0xffff;
doc/timidity/playmidi.c view on Meta::CPAN
if(ctl->verbosity >= VERB_DEBUG_SILLY)
ctl->cmsg(CMSG_INFO, VERB_DEBUG_SILLY,
"Midi Event %d: %s %d %d %d", cet,
event_name(ev->type), ev->channel, ev->a, ev->b);
if(cet > current_sample)
{
int rc;
if(midi_streaming!=0){
if ( (cet - current_sample) * 1000 / play_mode->rate > stream_max_compute ) {
kill_all_voices();
/* reset_voices(); */
/* ctl->cmsg(CMSG_INFO, VERB_DEBUG_SILLY, "play_event: discard %d samples", cet - current_sample); */
current_sample = cet;
}
}
rc = compute_data(cet - current_sample);
ctl_mode_event(CTLE_REFRESH, 0, 0, 0);
doc/timidity/playmidi.c view on Meta::CPAN
midi_time_ratio = tempo_adjust;
CLEAR_CHANNELMASK(channel_mute);
if (temper_type_mute & 1)
FILL_CHANNELMASK(channel_mute);
midi_restart_time = 0;
if(first)
{
first = 0;
init_mblock(&playmidi_pool);
current_file_info = get_midi_file_info("TiMidity", 1);
midi_streaming=1;
}
else
reuse_mblock(&playmidi_pool);
/* Fill in current_file_info */
current_file_info->readflag = 1;
current_file_info->seq_name = safe_strdup("TiMidity server");
current_file_info->karaoke_title = current_file_info->first_text = NULL;
current_file_info->mid = 0x7f;
current_file_info->hdrsiz = 0;
( run in 0.227 second using v1.01-cache-2.11-cpan-4d50c553e7e )