Window Setup

This is the first bit of work I’ve done on the project and it’s pretty simple but you have to start somewhere! I just started off by importing the GUI and then using it to create a setup function that creates a window the size of the screen where the display will eventually be. I started off with this because I’m still learning how to use JEM and how to play with midi files, but I wanted to get a start on something. I pulled this code directly from my data visualization lab because I knew it would do what I needed and I’m lazy and don’t like to re-type things.  I’ve been working on getting a midi file to upload and play in JEM but so far I haven’t figured it out. We’re hoping to get help from Kenzie on that tomorrow so that we can move onto getting data from midi files that we can use to make visuals.


import os
import gui
from gui import *
#input: none
#return: the width of the screen
def getScreenWidth():
return Toolkit.getDefaultToolkit().getScreenSize().width
#input: none
#return: the height of the screen
def getScreenHeight():
return Toolkit.getDefaultToolkit().getScreenSize().height
#input: none
#return: none
#sets up the display
def setup():
window = Display("Synesthetic Sound", getScreenWidth(), getScreenHeight())
setup()

Leave a comment