libopenmpt interactive feature request: play_note at sample offset

Started by EthanF4D, February 23, 2018, 10:54:19

Previous topic - Next topic

EthanF4D

Hi developers,
I would like to have a way to play_note() at sample offset like the command 9XX or Oxx.

The current play_note API has (note, instrument, volume, panning) which is quite basic and does a good job.
On the other hand, the interactive API also included 'global effect' such as set_speed, set_tempo and 'per channel effect' such as set_channel_mute_status

what is the vision for the interactive API? will it keep on evolving to be fully functional for many commands or there is a limit of what it can do?

Saga Musix

It's not planned, but rather than adding more and more optional parameters of play_note(), I'd rather add extra functions that can manipulate any playing channel, e.g. channel_offset(int channel, int offset).
These kind of requests are better kept on our issue tracker by the way, as it's easier to keep track of requests and bug reports there.
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.

EthanF4D

Seems promising. I will post a request on issue tracker.

Is it because of the commands are queued and happen on the next tick, so that we can modify the note's property after play_note() ?
int channel = play_note(...);
if (channel != -1) {
  set_channel_sample_offset(channel, offset);
}

Saga Musix

Quote from: EthanF4D on February 24, 2018, 08:06:19
Is it because of the commands are queued and happen on the next tick, so that we can modify the note's property after play_note() ?
No, there is no "queue". But until the next call to read() libopenmpt will naturally not do any rendering, so it's okay to change these properties after the note has been triggered.
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.