68b1907147
remove redundant import |
||
---|---|---|
mair | ||
tests | ||
__main__.py | ||
.gitignore | ||
LICENSE | ||
README.md | ||
setup.py |
Mair Remote
This package offers a python interface to the Midas MR18 digital rack mixer. All testing was done using a Midas MR18 but I've been informed that the software for XR18 is identical. Midas are not affiliated with/nor do they support this package in any way.
Prerequisites
- Python 3.9+
Installation
git clone https://github.com/onyx-and-iris/mair-api-python
cd mair-api-python
Just the interface:
pip install .
With development dependencies:
pip install -e .['development']
Usage
Connection
An ini file named config.ini, placed into the current working directory of your code may be used to configure the mixers ip. It's contents should resemble:
[connection]
ip=<ip address>
Alternatively you may state it explicitly as an argument to mair.connect()
Example 1
import mair
def main():
with mair.connect(kind_id, ip=ip) as mixer:
mixer.strip[8].config.name = 'sm7b'
mixer.strip[8].config.on = True
print(f'strip 09 ({mixer.strip[8].config.name}) has been set to {mixer.strip[8].config.on}')
if __name__ == '__main__':
kind_id = 'MR18'
ip = '<ip address>'
main()
API
Currently the following devices are support:
XR18
MR18
However, this interface can be expanded upon to support other devices.
MAirRemote (higher level)
mixer.lr
A class representing Main LR channel
mixer.strip
A Strip tuple containing a class for each input strip channel
mixer.bus
A Bus tuple containing a class for each output bus channel
mixer.dca
A DCA tuple containing a class for each DCA group
mixer.fxsend
An FXSend tuple containing a class for each FX Send channel
mixer.fxreturn
An FXReturn tuple containing a class for each FX Return channel
mixer.aux
A class representing aux channel
mixer.rtn
An RTN tuple containing a class for each rtn channel
mixer.config
A class representing the main config settings
LR
Contains the subclasses:
(Config
, Dyn
, Insert
, EQ
, Mix
)
Strip
Contains the subclasses:
(Config
, Preamp
, Gate
, Dyn
, Insert
, GEQ
, EQ
, Mix
, Group
, Automix
)
Bus
Contains the subclasses:
(Config
, Dyn
, Insert
, EQ
, Mix
, Group
)
FXSend
Contains the subclasses:
(Config
, Mix
, Group
)
Aux
Contains the subclasses:
(Config
, Preamp
, EQ
, Mix
, Group
)
Rtn
Contains the subclasses:
(Config
, Preamp
, EQ
, Mix
, Group
)
Subclasses
For each subclass the corresponding properties are available.
Config
name
: stringcolor
: int, from 0, 16inputsource
: intusbreturn
: int
Preamp
on
: boolusbtrim
: float, from -18.0 to 18.0usbinput
: boolinvert
: boolhighpasson
: boolhighpassfilter
: int, from 20 to 400
Gate
on
: boolmode
: str, one of ('gate', 'exp2', 'exp3', 'exp4', 'duck')threshold
: float, from -80.0 to 0.0range
: int, from 3 to 60attack
: int, from 0 to 120hold
: float, from 0.02 to 2000release
: int, from 5 to 4000keysource
, from 0 to 22filteron
: boolfiltertype
: int, from 0 to 8filterfreq
: float, from 20 to 20000
Dyn
on
: boolmode
: str, one of ('comp', 'exp')det
: str, one of ('peak', 'rms')env
: str, one of ('lin', 'log')threshold
: float, from -60.0 to 0.0ratio
: int, from 0 to 11knee
: int, from 0 to 5mgain
: float, from 0.0 to 24.0attack
: int, from 0 to 120hold
: float, from 0.02 to 2000release
: int, from 5 to 4000mix
: int, from 0 to 100keysource
: int, from 0 to 22auto
: boolfilteron
: boolfiltertype
: int, from 0 to 8filterfreq
: float, from 20 to 20000
Insert
on
: boolsel
: int
GEQ
The following method names preceded by slider_
20
,25
,31_5
,40
,50
,63
,80
,100
,125
,160
,200
,250
,315
,400
,500
,630
,800
,1k
,1k25
,1k6
,2k
,2k5
,3k15
,4k
,5k
,6k3
,8k
,10k
,12k5
,16k
,20k
: float, from -15.0 to 15.0
for example: slider_20
, slider_6k3
etc..
EQ
on
: boolmode
: str, one of ('peq', 'geq', 'teq')
For the subclasses: low
, low2
, lomid
, himid
, high2
, high
the following properties are available:
type
: int, from 0 to 5frequency
: float, from 20.0 to 20000.0gain
: float, -15.0 to 15.0quality
: float, from 0.3 to 10.0
for example: eq.low2.type
Mix
on
: boolfader
: float, -inf, to 10.0lr
: bool
Group
dca
: int, from 0 to 15mute
: int, from 0 to 15
Automix
group
: int, from 0 to 2weight
: float, from -12.0 to 12.0
DCA
on
: boolname
: strcolor
: int, from 0 to 15
Config
The following method names preceded by chlink
1_2
,3_4
,5_6
,7_8
,9_10
,11_12
,13_14
,15_16
The following method names preceded by buslink
1_2
,3_4
,5_6
for example: chlink1_2
, buslink5_6
etc..
link_eq
: boollink_dyn
: boollink_fader_mute
: boolamixenable
: boolamixlock
: boolmute_group
: bool
For the subclass monitor
the following properties are available
level
: float, -inf to 10.0source
: int, from 0 to 14chmode
boolbusmode
booldim
boolmono
boolmute
booldimfpl
bool
for example: config.monitor.chmode
Tests
First make sure you installed the development dependencies
To run the tests from tests directory:
WARNING: First save your settings and make sure your equipment is safe from damage. Run tests at your own risk.
nosetests --r test -v
.
License
This project is licensed under the MIT License - see the LICENSE file for details
Special Thanks
Peter Dikant for writing the base class