def getScenes(file_names):
    r = []
    for f in file_names:
        try:
            r.append(load_song_from_file(f))
        except Exception as e:
            print("could not load File {}.\nError: {}".format(f, e))
    return r
Beispiel #2
0
    def openSongFromDisk(self, file_name):
        self._jack_client.transport_stop()
        self._jack_client.transport_locate(0)

        self.setEnabled(False)
        message = QMessageBox(self)
        message.setWindowTitle("Loading ....")
        message.setText("Reading Files, please wait ...")
        message.show()
        self.initUI(load_song_from_file(file_name))
        message.close()
        self.setEnabled(True)
Beispiel #3
0
    def openSongFromDisk(self, file_name):
        self._jack_client.transport_stop()
        self._jack_client.transport_locate(0)

        self.setEnabled(False)
        message = QMessageBox(self)
        message.setWindowTitle("Loading ....")
        message.setText("Reading Files, please wait ...")
        message.show()
        self.initUI(load_song_from_file(file_name))
        message.close()
        self.setEnabled(True)
Beispiel #4
0
 def onActionOpen(self):
     file_name, a = (
         QFileDialog.getOpenFileName(self,
                                     'Open file',
                                     expanduser('~'),
                                     'Super Boucle Song (*.sbs)'))
     if file_name:
         self.setEnabled(False)
         message = QMessageBox(self)
         message.setWindowTitle("Loading ....")
         message.setText("Reading Files, please wait ...")
         message.show()
         self.initUI(load_song_from_file(file_name))
         message.close()
         self.setEnabled(True)
Beispiel #5
0
import sys, os.path
from clip import Clip, Song, load_song_from_file
from gui import Gui
from PyQt5.QtWidgets import QApplication
from queue import Empty
import argparse


parser = argparse.ArgumentParser(description='launch superboucle')
parser.add_argument("songfile", nargs="?", help="load the song specified here")
args = parser.parse_args()

song = None
if args.songfile:
    if os.path.isfile(args.songfile):
        song = load_song_from_file(args.songfile)
    else:
        sys.exit("File {} does not exist.".format(args.songfile))
else:
    song = Song(8, 8)

client = jack.Client("Super Boucle")
midi_in = client.midi_inports.register("input")
midi_out = client.midi_outports.register("output")
inL = client.inports.register("input_L")
inR = client.inports.register("input_R")

app = QApplication(sys.argv)
gui = Gui(song, client)

CLIP_TRANSITION = {Clip.STARTING: Clip.START,