mne_videobrowser.browsers.AudioBrowser#
- class mne_videobrowser.browsers.AudioBrowser(audio: AudioFile, playback_update_interval_ms: int = 50, parent: QWidget | None = None)[source]#
Bases:
SyncableBrowserWidgetQt widget for browsing audio with playback controls.
This browser allows interactive visualization of audio data from AudioFile objects.
NOTE: This browser currently only supports a single audio file. Methods that receive media_idx parameter ignore it and signals emit zero as the media index.
- Parameters:
audio (AudioFile) – The audio file to visualize.
playback_update_interval_ms (int, optional) – Determines how often the visualization is updated during audio playback. By default 50 ms, which corresponds to 20 updates per second.
parent (QWidget | None, optional) – The parent widget, by default None.
Methods
acceptDrops(self, /)accessibleDescription(self, /)accessibleIdentifier(self, /)accessibleName(self, /)actionEvent(self, event, /)actions(self, /)activateWindow(self, /)addAction(...)addActions(self, actions, /)adjustSize(self, /)autoFillBackground(self, /)backgroundRole(self, /)backingStore(self, /)baseSize(self, /)blockSignals(self, b, /)changeEvent(self, event, /)childAt(...)childEvent(self, event, /)children(self, /)childrenRect(self, /)childrenRegion(self, /)clearFocus(self, /)clearMask(self, /)close(self, /)closeEvent(self, event, /)colorCount(self, /)connect(...)connectNotify(self, signal, /)contentsMargins(self, /)contentsRect(self, /)contextMenuEvent(self, event, /)contextMenuPolicy(self, /)create(self, /[, arg__1, initializeWindow, ...])createWinId(self, /)createWindowContainer(window, /[, parent, flags])cursor(self, /)customEvent(self, event, /)deleteLater(self, /)depth(self, /)destroy(self, /[, destroyWindow, ...])devType(self, /)devicePixelRatio(self, /)devicePixelRatioF(self, /)devicePixelRatioFScale()disconnect(...)disconnectNotify(self, signal, /)dragEnterEvent(self, event, /)dragLeaveEvent(self, event, /)dragMoveEvent(self, event, /)dropEvent(self, event, /)dumpObjectInfo(self, /)dumpObjectTree(self, /)dynamicPropertyNames(self, /)effectiveWinId(self, /)emit(self, signal, /, *args)encodeMetricF(metric, value, /)ensurePolished(self, /)enterEvent(self, event, /)event(self, event, /)eventFilter(self, watched, event, /)find(arg__1, /)findChild(self, type, /[, name, options])findChildren() -> List[~PlaceholderType] ))focusInEvent(self, event, /)focusNextChild(self, /)focusNextPrevChild(self, next, /)focusOutEvent(self, event, /)focusPolicy(self, /)focusPreviousChild(self, /)focusProxy(self, /)focusWidget(self, /)font(self, /)fontInfo(self, /)fontMetrics(self, /)foregroundRole(self, /)frameGeometry(self, /)frameSize(self, /)geometry(self, /)get_current_position(media_idx)Get the index of the current sample position.
grab(self, /[, rectangle])grabGesture(self, type, /[, flags])grabKeyboard(self, /)grabMouse(-> None)grabShortcut(self, key, /[, context])graphicsEffect(self, /)graphicsProxyWidget(self, /)hasFocus(self, /)hasHeightForWidth(self, /)hasMouseTracking(self, /)hasTabletTracking(self, /)height(self, /)heightForWidth(self, arg__1, /)heightMM(self, /)hide(self, /)hideEvent(self, event, /)inherits(self, classname, /)initPainter(self, painter, /)inputMethodEvent(self, event, /)inputMethodHints(self, /)inputMethodQuery(self, arg__1, /)insertAction(self, before, action, /)insertActions(self, before, actions, /)installEventFilter(self, filterObj, /)internalWinId(self, /)isActiveWindow(self, /)isAncestorOf(self, child, /)isEnabled(self, /)isEnabledTo(self, arg__1, /)isFullScreen(self, /)isHidden(self, /)isLeftToRight(self, /)isMaximized(self, /)isMinimized(self, /)isModal(self, /)isQuickItemType(self, /)isRightToLeft(self, /)isSignalConnected(self, signal, /)isTopLevel(self, /)isVisible(self, /)isVisibleTo(self, arg__1, /)isWidgetType(self, /)isWindow(self, /)isWindowModified(self, /)isWindowType(self, /)jump_to_end(media_idx[, signal])Display the last sample of the audio.
jump_to_start(media_idx[, signal])Display the first sample of the audio.
keyPressEvent(self, event, /)keyReleaseEvent(self, event, /)keyboardGrabber()killTimer(-> None)layout(self, /)layoutDirection(self, /)leaveEvent(self, event, /)locale(self, /)logicalDpiX(self, /)logicalDpiY(self, /)lower(self, /)mapFrom(-> PySide6.QtCore.QPoint)mapFromGlobal(-> PySide6.QtCore.QPoint)mapFromParent(-> PySide6.QtCore.QPoint)mapTo(-> PySide6.QtCore.QPoint)mapToGlobal(-> PySide6.QtCore.QPoint)mapToParent(-> PySide6.QtCore.QPoint)mask(self, /)maximumHeight(self, /)maximumSize(self, /)maximumWidth(self, /)metaObject(self, /)metric(self, arg__1, /)minimumHeight(self, /)minimumSize(self, /)minimumSizeHint(self, /)minimumWidth(self, /)mouseDoubleClickEvent(self, event, /)mouseGrabber()mouseMoveEvent(self, event, /)mousePressEvent(self, event, /)mouseReleaseEvent(self, event, /)move(-> None)moveEvent(self, event, /)moveToThread(self, thread, /)nativeEvent(self, eventType, message, /)nativeParentWidget(self, /)nextInFocusChain(self, /)normalGeometry(self, /)objectName(self, /)overrideWindowFlags(self, type, /)overrideWindowState(self, state, /)paintEngine(self, /)paintEvent(self, event, /)paintingActive(self, /)palette(self, /)parent(self, /)parentWidget(self, /)Pause the audio playback.
physicalDpiX(self, /)physicalDpiY(self, /)pos(self, /)previousInFocusChain(self, /)property(self, name, /)raise_(self, /)receivers(self, signal, /)rect(self, /)redirected(self, offset, /)releaseKeyboard(self, /)releaseMouse(self, /)releaseShortcut(self, id, /)removeAction(self, action, /)removeEventFilter(self, obj, /)render(, sourceRegion, renderFlags, renderFlags)repaint(-> None -> None -> None)resize(-> None)resizeEvent(self, event, /)restoreGeometry(self, geometry, /)saveGeometry(self, /)screen(self, /)scroll(-> None)sender(self, /)senderSignalIndex(self, /)setAcceptDrops(self, on, /)setAccessibleDescription(self, description, /)setAccessibleIdentifier(self, identifier, /)setAccessibleName(self, name, /)setAttribute(self, arg__1, /[, on])setAutoFillBackground(self, enabled, /)setBackgroundRole(self, arg__1, /)setBaseSize(-> None)setContentsMargins(-> None)setContextMenuPolicy(self, policy, /)setCursor(self, arg__1, /)setDisabled(self, arg__1, /)setEnabled(self, arg__1, /)setFixedHeight(self, h, /)setFixedSize(-> None)setFixedWidth(self, w, /)setFocus(-> None)setFocusPolicy(self, policy, /)setFocusProxy(self, arg__1, /)setFont(self, arg__1, /)setForegroundRole(self, arg__1, /)setGeometry(-> None)setGraphicsEffect(self, effect, /)setHidden(self, hidden, /)setInputMethodHints(self, hints, /)setLayout(self, arg__1, /)setLayoutDirection(self, direction, /)setLocale(self, locale, /)setMask(-> None)setMaximumHeight(self, maxh, /)setMaximumSize(-> None)setMaximumWidth(self, maxw, /)setMinimumHeight(self, minh, /)setMinimumSize(-> None)setMinimumWidth(self, minw, /)setMouseTracking(self, enable, /)setObjectName(self, name, /)setPalette(self, arg__1, /)setParent(-> None)setProperty(self, name, value, /)setScreen(self, arg__1, /)setShortcutAutoRepeat(self, id, /[, enable])setShortcutEnabled(self, id, /[, enable])setSizeIncrement(-> None)setSizePolicy(-> None)setStatusTip(self, arg__1, /)setStyle(self, arg__1, /)setStyleSheet(self, styleSheet, /)setTabOrder(arg__1, arg__2, /)setTabletTracking(self, enable, /)setToolTip(self, arg__1, /)setToolTipDuration(self, msec, /)setUpdatesEnabled(self, enable, /)setVisible(self, visible, /)setWhatsThis(self, arg__1, /)setWindowFilePath(self, filePath, /)setWindowFlag(self, arg__1, /[, on])setWindowFlags(self, type, /)setWindowIcon(self, icon, /)setWindowIconText(self, arg__1, /)setWindowModality(self, windowModality, /)setWindowModified(self, arg__1, /)setWindowOpacity(self, level, /)setWindowRole(self, arg__1, /)setWindowState(self, state, /)setWindowTitle(self, arg__1, /)set_position(position_idx, media_idx[, signal])Set the current position to the given sample index.
set_sync_status(status, media_idx)Set the synchronization status for the specified media.
sharedPainter(self, /)show(self, /)showEvent(self, event, /)showFullScreen(self, /)showMaximized(self, /)showMinimized(self, /)showNormal(self, /)signalsBlocked(self, /)size(self, /)sizeHint(self, /)sizeIncrement(self, /)sizePolicy(self, /)stackUnder(self, arg__1, /)startTimer(self, interval, /[, timerType])start_playback(media_idx)Start the audio playback from the current position.
statusTip(self, /)style(self, /)styleSheet(self, /)tabletEvent(self, event, /)testAttribute(self, arg__1, /)thread(self, /)timerEvent(self, event, /)toolTip(self, /)toolTipDuration(self, /)topLevelWidget(self, /)tr(self, sourceText, /[, disambiguation, n])underMouse(self, /)ungrabGesture(self, type, /)unsetCursor(self, /)unsetLayoutDirection(self, /)unsetLocale(self, /)update(-> None -> None -> None)updateGeometry(self, /)updateMicroFocus(self, /[, query])updatesEnabled(self, /)visibleRegion(self, /)whatsThis(self, /)wheelEvent(self, event, /)width(self, /)widthMM(self, /)winId(self, /)window(self, /)windowFilePath(self, /)windowFlags(self, /)windowHandle(self, /)windowIcon(self, /)windowIconText(self, /)windowModality(self, /)windowOpacity(self, /)windowRole(self, /)windowState(self, /)windowTitle(self, /)windowType(self, /)x(self, /)y(self, /)Attributes
Get the index of the current sample position.
Get the current position in seconds.
Return whether the audio is currently playing.
paintersushort
- set_position(position_idx: int, media_idx: int, signal: bool = True) bool[source]#
Set the current position to the given sample index.
NOTE: Does not do anything with media_idx, as this browser currently only supports a single audio file.
- get_current_position(media_idx: int) int[source]#
Get the index of the current sample position.
Parameter media_idx is ignored as this browser only supports a single audio file.
- jump_to_end(media_idx: int, signal: bool = True) None[source]#
Display the last sample of the audio.
NOTE: Does not do anything with media_idx, as this browser currently only supports a single audio file.
- jump_to_start(media_idx: int, signal: bool = True) None[source]#
Display the first sample of the audio.
NOTE: Does not do anything with media_idx, as this browser currently only supports a single audio file.
- staticMetaObject = PySide6.QtCore.QMetaObject("AudioBrowser" inherits "SyncableBrowserWidget": Methods: #35 type=Slot, signature=_on_audio_view_sample_change(int), parameters=int #36 type=Slot, signature=_set_playback_audio_data(PyObject), parameters=PyObject #37 type=Slot, signature=_on_playback_timeout() #38 type=Slot, signature=_toggle_play_pause() #39 type=Slot, signature=_jump_forward() #40 type=Slot, signature=_jump_backwards() )#