本文整理汇总了Python中mididings.units.base._Unit函数的典型用法代码示例。如果您正苦于以下问题:Python _Unit函数的具体用法?Python _Unit怎么用?Python _Unit使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了_Unit函数的18个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: Channel
def Channel(channel):
"""
Channel(channel)
Change the event's channel number.
"""
return _Unit(_mididings.Channel(_util.actual(channel)))
开发者ID:aldanor,项目名称:mididings,代码行数:7,代码来源:modifiers.py
示例2: Port
def Port(port):
"""
Port(port)
Change the event's port number.
"""
return _Unit(_mididings.Port(_util.actual(port)))
开发者ID:aldanor,项目名称:mididings,代码行数:7,代码来源:modifiers.py
示例3: Key
def Key(note):
"""
Key(note)
Change note events to a fixed note number.
"""
return _Unit(_mididings.Key(note))
开发者ID:Masterharper1082,项目名称:mididings,代码行数:7,代码来源:modifiers.py
示例4: CtrlMap
def CtrlMap(ctrl_in, ctrl_out):
"""
CtrlMap(ctrl_in, ctrl_out)
Convert controller *ctrl_in* to *ctrl_out*, i.e. change the event's
control change number.
"""
return _Unit(_mididings.CtrlMap(ctrl_in, ctrl_out))
开发者ID:aldanor,项目名称:mididings,代码行数:8,代码来源:modifiers.py
示例5: SysEx
def SysEx(port, sysex):
"""
SysEx(sysex)
SysEx(port, sysex)
Create a system exclusive event, replacing the incoming event.
*sysex* can be a string (binary or ASCII) or a sequence of integers,
and must include the leading ``F0`` and trailing ``F7`` bytes.
"""
return _Unit(_mididings.SysExGenerator(
_util.actual_ref(port),
sysex,
))
开发者ID:Masterharper1082,项目名称:mididings,代码行数:13,代码来源:generators.py
示例6: Pitchbend
def Pitchbend(port, channel, value):
"""
Pitchbend(value)
Pitchbend(port, channel, value)
Create a pitch-bend event, replacing the incoming event.
"""
return _Unit(_mididings.Generator(
_constants.PITCHBEND,
_util.actual_ref(port),
_util.actual_ref(channel),
0,
value
))
开发者ID:Masterharper1082,项目名称:mididings,代码行数:14,代码来源:generators.py
示例7: Ctrl
def Ctrl(port, channel, ctrl, value):
"""
Ctrl(ctrl, value)
Ctrl(port, channel, ctrl, value)
Create a control change event, replacing the incoming event.
"""
return _Unit(_mididings.Generator(
_constants.CTRL,
_util.actual_ref(port),
_util.actual_ref(channel),
ctrl,
value
))
开发者ID:Masterharper1082,项目名称:mididings,代码行数:14,代码来源:generators.py
示例8: NoteOff
def NoteOff(port, channel, note, velocity=0):
"""
NoteOff(note, velocity=0)
NoteOff(port, channel, note, velocity=0)
Create a note-off event, replacing the incoming event.
"""
return _Unit(_mididings.Generator(
_constants.NOTEOFF,
_util.actual_ref(port),
_util.actual_ref(channel),
note,
velocity
))
开发者ID:Masterharper1082,项目名称:mididings,代码行数:14,代码来源:generators.py
示例9: Program
def Program(port, channel, program):
"""
Program(program)
Program(port, channel, program)
Create a program change event, replacing the incoming event.
"""
return _Unit(_mididings.Generator(
_constants.PROGRAM,
_util.actual_ref(port),
_util.actual_ref(channel),
0,
_util.actual_ref(program)
))
开发者ID:Masterharper1082,项目名称:mididings,代码行数:14,代码来源:generators.py
示例10: PolyAftertouch
def PolyAftertouch(port, channel, note, value):
"""
PolyAftertouch(note, value)
PolyAftertouch(port, channel, note, value)
Create a polyphonic aftertouch event, replacing the incoming event.
"""
return _Unit(_mididings.Generator(
_constants.POLY_AFTERTOUCH,
_util.actual_ref(port),
_util.actual_ref(channel),
note,
value
))
开发者ID:Masterharper1082,项目名称:mididings,代码行数:14,代码来源:generators.py
示例11: Aftertouch
def Aftertouch(port, channel, value):
"""
Aftertouch(value)
Aftertouch(port, channel, value)
Create an aftertouch event, replacing the incoming event.
"""
return _Unit(_mididings.Generator(
_constants.AFTERTOUCH,
_util.actual_ref(port),
_util.actual_ref(channel),
0,
value
))
开发者ID:Masterharper1082,项目名称:mididings,代码行数:14,代码来源:generators.py
示例12: Generator
def Generator(type, port=_constants.EVENT_PORT,
channel=_constants.EVENT_CHANNEL, data1=0, data2=0):
"""
Generator(type, port, channel, data1=0, data2=0)
Generic generator to change the incoming event's type and data.
System common and system realtime events can only be created this way.
"""
return _Unit(_mididings.Generator(
type,
_util.actual_ref(port),
_util.actual_ref(channel),
data1,
data2
))
开发者ID:Masterharper1082,项目名称:mididings,代码行数:15,代码来源:generators.py
示例13: CtrlRange
def CtrlRange(ctrl, min, max, in_min=0, in_max=127):
"""
CtrlRange(ctrl, min, max, in_min=0, in_max=127)
Linearly map control change values for controller *ctrl* from the interval
[*in_min*, *in_max*] to the interval [*min*, *max*].
Any input value less than or equal to *in_min* results in an output value
of *min*. Likewise, any value of *in_max* or greater results in an output
value of *max*.
"""
if in_min > in_max:
# swap ranges so that in_min is less than in_max
in_min, in_max = in_max, in_min
min, max = max, min
return _Unit(_mididings.CtrlRange(ctrl, min, max, in_min, in_max))
开发者ID:aldanor,项目名称:mididings,代码行数:15,代码来源:modifiers.py
示例14: Velocity
def Velocity(multiply):
return _Unit(_mididings.Velocity(
multiply, _mididings.TransformMode.MULTIPLY))
开发者ID:aldanor,项目名称:mididings,代码行数:3,代码来源:modifiers.py
示例15: VelocitySlope
def VelocitySlope(notes, curve):
_check_velocity_slope(notes, curve)
return _Unit(_mididings.VelocitySlope(
notes, curve, _mididings.TransformMode.CURVE))
开发者ID:aldanor,项目名称:mididings,代码行数:4,代码来源:modifiers.py
示例16: CtrlCurve
def CtrlCurve(ctrl, curve):
return _Unit(_mididings.CtrlCurve(
ctrl, curve, _mididings.TransformMode.CURVE))
开发者ID:aldanor,项目名称:mididings,代码行数:3,代码来源:modifiers.py
示例17: PitchbendRange
def PitchbendRange(min, max, in_min=-8192, in_max=8191):
return _Unit(_mididings.PitchbendRange(min, max, in_min, in_max))
开发者ID:aldanor,项目名称:mididings,代码行数:2,代码来源:modifiers.py
示例18: Transpose
def Transpose(offset):
return _Unit(_mididings.Transpose(offset))
开发者ID:aldanor,项目名称:mididings,代码行数:2,代码来源:modifiers.py
注:本文中的mididings.units.base._Unit函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论