Skip to content

Arecorder track selection and gain.  #28

@wiccy46

Description

@wiccy46

In feature-recorder-improvement, I added a new method to Arecorder named set_tracks(self, tracks, gains). This allows individual tracks selected to be recorded before calling record(), e.g.:

ar.set_tracks(tracks=[0, 2], gains=[-3, -10]) #gain in db

or just with one channel: `ar.set_tracks(tracks=2, gains=-10)

I then added data_float = data_float[:, self.tracks] * self.gains to the callback to actually subset the channels.

I also added to reset the recording mode back to record all track with no volume adjustment.

def reset(self):
        self.tracks = slice(None)
        self.gains = np.ones(self.channels)

Originally, I was thinking to introduce input channel selection in record() but think it is best for user to refined the desired channels first just like it would be done in a DAW.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions