【问题标题】:Pygame Midi Multi InstrumentPygame Midi 多功能乐器
【发布时间】:2015-06-30 13:18:46
【问题描述】:

是否可以在 pygame.midi 中同时演奏多种乐器? 我找到的唯一解决方案是 注意, 换仪器, 其他注意事项, 记下, 记下

但我认为这不是正确的方法。有其他选择吗?

【问题讨论】:

    标签: python pygame


    【解决方案1】:
    1. 您要使用的每个乐器都应位于其自己的 MIDI 通道 (0..15) 上。您可以使用set_instrument(instrument_id, channel) 方法进行设置。

    2. 然后您将要发送 Note On/Off 消息的乐器的通道号传递给使用 note_on(note, velocity, channel)note_off(note, velocity, channel) 方法。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-05-28
      • 2011-12-10
      • 2018-08-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-05-30
      相关资源
      最近更新 更多