Beispiel #1
0
    def color(self):
        """
        Track color in RGB format.

        :type: tuple of int
        """
        native_color = RPR.GetTrackColor(self.id)
        r, g, b = reapy.rgb_from_native(native_color)
        return r, g, b
Beispiel #2
0
 def __init__(self, item):
     self.item = item
     self.itemLength = reaper.GetMediaItemInfo_Value(item, 'D_LENGTH')
     self.activeTake = reaper.GetActiveTake(item)
     self.source = reaper.GetMediaItemTake_Source(self.activeTake)
     self.offset = reaper.GetMediaItemTakeInfo_Value(self.activeTake, 'D_STARTOFFS')
     self.sourcePath = reaper.GetMediaSourceFileName(self.source, '',512)[1]
     self.sourceLength = reaper.GetMediaSourceLength(self.source, False)[0]
     self.sourceSR = reaper.GetMediaSourceSampleRate(self.source)
     self.itemTrack = reaper.GetMediaItem_Track(item)
     self.trackName = reaper.GetTrackName(self.itemTrack,'',512)[2]
     self.trackColor = reaper.GetTrackColor(self.itemTrack)