Author Topic: libopenmpt interactive feature request: play_note at sample offset  (Read 1134 times)

Offline EthanF4D

  • Active artist
  • *
  • Posts: 11
  • Operating System: Windows 10
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?

Offline Saga Musix

  • OpenMPT Developers
  • *****
  • Posts: 6,490
  • aka Jojo
    • Download music, samples, VST plugins: Saga Musix Website
  • Operating System: Windows 7 x64
Re: libopenmpt interactive feature request: play_note at sample offset
« Reply #1 on: February 23, 2018, 16:57:29 »
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.

Offline EthanF4D

  • Active artist
  • *
  • Posts: 11
  • Operating System: Windows 10
Re: libopenmpt interactive feature request: play_note at sample offset
« Reply #2 on: February 24, 2018, 08:06:19 »
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() ?
Code: [Select]
int channel = play_note(...);
if (channel != -1) {
  set_channel_sample_offset(channel, offset);
}

Offline Saga Musix

  • OpenMPT Developers
  • *****
  • Posts: 6,490
  • aka Jojo
    • Download music, samples, VST plugins: Saga Musix Website
  • Operating System: Windows 7 x64
Re: libopenmpt interactive feature request: play_note at sample offset
« Reply #3 on: February 24, 2018, 12:37:55 »
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.