-
Notifications
You must be signed in to change notification settings - Fork 443
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20 from leon-thomm/ryven-console
A prototype for a GUIless Ryven version (currently called Ryven Console) is now included. Ryven Console is used to run Ryven flows without Qt (f.ex. on the server) much faster than in Ryven itself. Very useful for time-intensive processing. Testing and showcasing can be done in Ryven while the actual computation can be done without visual interface in the cloud. There are rules for using Ryven Console, one **cannot** just run a Ryven flow in the console application. But it is possible and not difficult to create nodes that work with Ryven Console. I will add an explanation to the docs once it is part of an official release.
- Loading branch information
Showing
50 changed files
with
1,365 additions
and
124 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,85 @@ | ||
import sys | ||
import types | ||
import inspect | ||
from optparse import OptionParser | ||
import random | ||
import math | ||
import pickle | ||
import os | ||
from pyowm import OWM | ||
import librosa | ||
# import sys | ||
# import types | ||
# import inspect | ||
# from optparse import OptionParser | ||
# import random | ||
# import math | ||
# import pickle | ||
# import os | ||
# from pyowm import OWM | ||
# import librosa | ||
|
||
from PySide2.QtWidgets import QMainWindow, QApplication, QWidget, QVBoxLayout, QPlainTextEdit, QGraphicsView, QGraphicsScene, QGraphicsProxyWidget, QAction, QMenu | ||
from PySide2.QtGui import QFont, QColor, QImage, QPainter, QPen, QBrush | ||
from PySide2.QtCore import Qt, QRectF | ||
|
||
# Beat tracking example | ||
import librosa | ||
# import librosa | ||
|
||
|
||
if __name__ == '__main__': | ||
print('asdf') | ||
# 1. Get the file path to an included audio example | ||
filename = librosa.example('nutcracker') | ||
print('asdf') | ||
class PlaceholderAttributeException(Exception): | ||
pass | ||
|
||
|
||
class Nope: | ||
pass | ||
|
||
|
||
def placeholder_method(*args): | ||
pass | ||
|
||
class PlaceholderWidget: | ||
# def __getattr__(self, item): | ||
# print('getting attribute', item) | ||
# if not hasattr(self, item): | ||
# raise PlaceholderAttributeException('nope') | ||
# else: | ||
# return super(PlaceholderWidget, self).__getattr__(item) | ||
|
||
# 2. Load the audio as a waveform `y` | ||
# Store the sampling rate as `sr` | ||
y, sr = librosa.load(filename) | ||
print('asdf') | ||
def y(self): | ||
return 'y!' | ||
|
||
# 3. Run the default beat tracker | ||
tempo, beat_frames = librosa.beat.beat_track(y=y, sr=sr) | ||
def __getattr__(self, item): | ||
print('getting attribute:', item) | ||
|
||
def method(*args): | ||
print('unknown method used:', item) | ||
|
||
return method | ||
|
||
def __setattr__(self, key, value): | ||
print('setting attr', key, 'to', value) | ||
print(hasattr(self, key)) | ||
if not hasattr(self, key): | ||
return | ||
super(PlaceholderWidget, self).__setattr__(key, value) | ||
|
||
|
||
if __name__ == '__main__': | ||
pw = PlaceholderWidget() | ||
print('1') | ||
pw.x = 10 | ||
print(pw.x) | ||
print('2') | ||
print(pw.y()) | ||
pw.foo(15) | ||
print('3') | ||
|
||
print('Estimated tempo: {:.2f} beats per minute'.format(tempo)) | ||
|
||
# 4. Convert the frame indices of beat events into timestamps | ||
beat_times = librosa.frames_to_time(beat_frames, sr=sr) | ||
# print('asdf') | ||
# # 1. Get the file path to an included audio example | ||
# filename = librosa.example('nutcracker') | ||
# print('asdf') | ||
# | ||
# # 2. Load the audio as a waveform `y` | ||
# # Store the sampling rate as `sr` | ||
# y, sr = librosa.load(filename) | ||
# print('asdf') | ||
# | ||
# # 3. Run the default beat tracker | ||
# tempo, beat_frames = librosa.beat.beat_track(y=y, sr=sr) | ||
# | ||
# print('Estimated tempo: {:.2f} beats per minute'.format(tempo)) | ||
# | ||
# # 4. Convert the frame indices of beat events into timestamps | ||
# beat_times = librosa.frames_to_time(beat_frames, sr=sr) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
"""This file automatically imports all requirements for custom NodeInstances, so that they only need to import this | ||
file. This file should lie in the same location as Ryven.py in order to be able to get imported directly.""" | ||
|
||
from custom_src.NodeInstance import NodeInstance | ||
from custom_src.Node import Node | ||
from custom_src.retain import M |
Oops, something went wrong.