mirror of
https://github.com/cyberboy666/r_e_c_u_r.git
synced 2025-12-05 16:00:06 +01:00
fixing bugs
This commit is contained in:
@@ -331,7 +331,7 @@ class Actions(object):
|
||||
self.load_this_detour_shader()
|
||||
|
||||
def load_this_detour_shader(self):
|
||||
self.video_driver.osc_client.send_message("/detour/load_mix", "/home/pi/Shaders/2-input/" + self.data.detour_settings['mix_shader'])
|
||||
self.video_driver.osc_client.send_message("/detour/load_mix", "/home/pi/r_e_c_u_r/Shaders/2-input/" + self.data.detour_settings['mix_shader'])
|
||||
|
||||
def switch_to_detour_0(self):
|
||||
self.switch_to_this_detour(0)
|
||||
@@ -369,7 +369,7 @@ class Actions(object):
|
||||
self.data.detour_settings['detour_end'] = end
|
||||
self.data.detour_settings['detour_size'] = size
|
||||
self.data.detour_settings['detour_speed'] = round(speed, 2)
|
||||
self.data.detour_settings['detour_position'] = round(mix)
|
||||
#self.data.detour_settings['mix?'] = round(mix)
|
||||
self.data.detour_settings['memory_full'] = memory_full
|
||||
|
||||
def set_the_detour_mix_0(self):
|
||||
@@ -461,7 +461,7 @@ class Actions(object):
|
||||
|
||||
def check_if_should_start_openframeworks(self):
|
||||
if self.data.settings['video']['VIDEOPLAYER_BACKEND']['value'] != 'omxplayer':
|
||||
self.openframeworks_process = subprocess.Popen(['/home/pi/openFrameworks/apps/myApps/c_o_n_j_u_r/bin/c_o_n_j_u_r'])
|
||||
self.openframeworks_process = subprocess.Popen([self.data.PATH_TO_OPENFRAMEWORKS +'apps/myApps/c_o_n_j_u_r/bin/c_o_n_j_u_r'])
|
||||
print('conjur pid is {}'.format(self.openframeworks_process.pid))
|
||||
|
||||
def exit_openframeworks(self):
|
||||
|
||||
@@ -23,7 +23,8 @@ class Data(object):
|
||||
EMPTY_SLOT = dict(name='', location='', length=-1, start=-1, end=-1, rate=1)
|
||||
PATH_TO_DATA_OBJECTS = '/home/pi/r_e_c_u_r/json_objects/'
|
||||
PATH_TO_EXTERNAL_DEVICES = '/media/pi'
|
||||
PATH_TO_CONJUR_DATA = '/home/pi/openFrameworks/apps/myApps/c_o_n_j_u_r/bin/data/settings.xml'
|
||||
PATH_TO_OPENFRAMEWORKS = '/home/pi/openframeworks10.1/'
|
||||
PATH_TO_CONJUR_DATA = PATH_TO_OPENFRAMEWORKS + 'apps/myApps/c_o_n_j_u_r/bin/data/settings.xml'
|
||||
|
||||
def __init__(self, message_handler):
|
||||
self.message_handler = message_handler
|
||||
@@ -44,7 +45,7 @@ class Data(object):
|
||||
self.player_mode = 'now'
|
||||
self.detour_active = False
|
||||
self.detour_mix_shaders = self.get_list_of_two_input_shaders()
|
||||
self.detour_settings = collections.OrderedDict([('current_detour',0), ('is_playing', False), ('is_recording', False), ('record_loop', False), ('detour_size', False), ('detour_speed', 0), ('memory_full', False), ('mix_shader', self.detour_mix_shaders[0]), ('detour_position', 0), ('detour_start', 0), ('detour_end', 0), ('is_delay', False)])
|
||||
self.detour_settings = collections.OrderedDict([('current_detour',0), ('is_playing', False), ('is_recording', False), ('record_loop', False), ('detour_size', False), ('detour_speed', 0), ('memory_full', False), ('mix_shader', self.detour_mix_shaders[0]), ('detour_position', 5), ('detour_start', 0), ('detour_end', 0), ('is_delay', False)])
|
||||
|
||||
### persisted data (use default if doesnt exits):
|
||||
self.bank_data = [self.create_empty_bank()]
|
||||
|
||||
@@ -7,7 +7,7 @@ class Display(object):
|
||||
MENU_HEIGHT = 10
|
||||
SELECTOR_WIDTH = 0.47
|
||||
ROW_OFFSET = 6.0
|
||||
TITLE = '================== r_e_c_u_r =================='
|
||||
TITLES = ['{0} r_e_c_u_r {0}'.format('='*18), '{0} c_o_n_j_u_r {1}'.format('='*18, '='*16), '{0} d_e_t_o_u_r {1}'.format('='*18, '='*16)]
|
||||
|
||||
def __init__(self, tk, video_driver, shaders, message_handler, data):
|
||||
self.tk = tk
|
||||
@@ -51,7 +51,15 @@ class Display(object):
|
||||
self.display_text.pack()
|
||||
|
||||
def _load_title(self):
|
||||
self.display_text.insert(END, self.TITLE + ' \n')
|
||||
if self.data.display_mode == 'SHADERS':
|
||||
self.display_text.insert(END, self.TITLES[1] + ' \n')
|
||||
self.display_text.tag_add("TITLE", 1.19, 1.31)
|
||||
elif self.data.display_mode == 'DETOUR':
|
||||
self.display_text.insert(END, self.TITLES[2] + ' \n')
|
||||
self.display_text.tag_add("TITLE", 1.19, 1.31)
|
||||
else:
|
||||
self.display_text.insert(END, self.TITLES[0] + ' \n')
|
||||
self.display_text.tag_add("TITLE", 1.19, 1.28)
|
||||
|
||||
def _load_player(self):
|
||||
if self.data.player_mode == 'now':
|
||||
@@ -85,8 +93,6 @@ class Display(object):
|
||||
|
||||
|
||||
def _load_sampler(self):
|
||||
self.TITLE = '================== r_e_c_u_r =================='
|
||||
self.display_text.tag_add("TITLE", 1.19, 1.28)
|
||||
bank_data = self.data.bank_data[self.data.bank_number]
|
||||
|
||||
self.display_text.insert(END, '{} \n'.format(self.body_title))
|
||||
@@ -106,8 +112,6 @@ class Display(object):
|
||||
self._highlight_this_row(current_slot)
|
||||
|
||||
def _load_browser(self):
|
||||
self.TITLE = '================== r_e_c_u_r =================='
|
||||
self.display_text.tag_add("TITLE", 1.19, 1.28)
|
||||
browser_list = self.browser_menu.menu_list
|
||||
number_of_lines_displayed = 0
|
||||
self.display_text.insert(END, '{} \n'.format(self.body_title))
|
||||
@@ -129,8 +133,6 @@ class Display(object):
|
||||
self._highlight_this_row(self.browser_menu.selected_list_index - self.browser_menu.top_menu_index)
|
||||
|
||||
def _load_settings(self):
|
||||
self.TITLE = '================== r_e_c_u_r =================='
|
||||
self.display_text.tag_add("TITLE", 1.19, 1.28)
|
||||
line_count = 0
|
||||
settings_list = self.settings_menu.menu_list
|
||||
self.display_text.insert(END, '{} \n'.format(self.body_title))
|
||||
@@ -151,11 +153,9 @@ class Display(object):
|
||||
self._highlight_this_row(self.settings_menu.selected_list_index - self.settings_menu.top_menu_index)
|
||||
|
||||
def _load_shaders(self):
|
||||
self.TITLE = '================== c_o_n_j_u_r ================'
|
||||
self.display_text.tag_add("TITLE", 1.19, 1.31)
|
||||
line_count = 0
|
||||
self.display_text.insert(END, '{} \n'.format(self.body_title))
|
||||
|
||||
|
||||
## showing current shader info:
|
||||
shader = self.shaders.selected_shader
|
||||
self.display_text.insert(END, '{:<1}:{:<1}{:<2} {:<17} '.format \
|
||||
@@ -186,11 +186,9 @@ class Display(object):
|
||||
|
||||
|
||||
def _load_detour(self):
|
||||
self.TITLE = '================== d_e_t_o_u_r ================'
|
||||
self.display_text.tag_add("TITLE", 1.19, 1.31)
|
||||
line_count = 0
|
||||
self.display_text.insert(END, '{} \n'.format(self.body_title))
|
||||
|
||||
|
||||
## showing current detour info:
|
||||
self.display_text.insert(END, '{:^23} {:^22} \n'.format('SETTING', 'VALUE'))
|
||||
self.display_text.insert(END, '{:>23} {:<22} \n'.format("DETOUR_ACTIVE", self.data.detour_active))
|
||||
@@ -355,7 +353,7 @@ round(param_row + column_offset + (param_num+1)*param_length, 2))
|
||||
def _generate_body_title(self):
|
||||
display_modes = self.data.get_display_modes_list()
|
||||
current_mode = self.data.display_mode
|
||||
selected_list = ['[{}]'.format(v) if v == current_mode else '<{}>'.format(v[:3].lower()) for v in display_modes ]
|
||||
selected_list = ['[{}]'.format(v) if v == current_mode else '<{}>'.format(v[:2].lower()) for v in display_modes ]
|
||||
selected_string = '--'.join(selected_list)
|
||||
pad = 47 - len(selected_string)
|
||||
output = ('-' * (pad // 2)) + selected_string + ('-' * (pad // 2)) + ('-' * (pad % 2))
|
||||
|
||||
@@ -56,8 +56,9 @@ these are suppose to stop screensaver / hide cursor / remove on screen power war
|
||||
|
||||
- created internal storage folder in ~/Videos
|
||||
|
||||
- set a custom splash screen by replacing splash.png an image at `/usr/share/plymouth/themes/pix/splash.png`with my original. i made a copy of the original, and then copied ~~my own from a flash stick...~~ from `~/r_e_c_u_r/documentation/splash.png`
|
||||
|
||||
- set a custom splash screen by replacing splash.png an image at:
|
||||
`sudo cp ~/r_e_c_u_r/documentation/splash.png /usr/share/plymouth/themes/pix/splash.png`
|
||||
|
||||
## for piCaptureSd1
|
||||
|
||||
need to install : `sudo apt-get install python3-smbus` and `sudo pip3 install pivideo`
|
||||
@@ -127,8 +128,8 @@ sdtv_aspect=1
|
||||
- and also `sudo apt-get upgrade -y; sudo apt-get update` (these took ageeees ! didnt even finish.. will come back to this)
|
||||
- `make Release -C ~/openFrameworks/libs/openFrameworksCompiled/project`
|
||||
- `cd ~/openFrameworks/apps/myApps/` and `git clone https://github.com/langolierz/c_o_n_j_u_r.git`
|
||||
- `cd ~/openFrameworks/addons/` and `git clone https://github.com/langolierz/ofxOMXCamera` (will swap this out for main once/if my edits work and get in)
|
||||
- NOTE also gotta checkout the stretch branch : `git checkout stretch`
|
||||
- `cd ~/openFrameworks/addons/` and `git clone https://github.com/langolierz/ofxOMXCamera.git` (will swap this out for main once/if my edits work and get in)
|
||||
- `git clone https://github.com/langolierz/ofxVideoArtTools.git`
|
||||
- `git clone https://github.com/timscaffidi/ofxVideoRecorder.git` and its depend : `sudo apt-get install ffmeg`
|
||||
- `git clone https://github.com/jvcleave/ofxOMXPlayer.git` and install depends : `cd ofxOMXPlayer; ./install_depends.sh`
|
||||
- `git clone https://github.com/danomatika/ofxMidi.git`
|
||||
@@ -151,7 +152,7 @@ sdtv_aspect=1
|
||||
|
||||
## setup:
|
||||
|
||||
need to delete the old settings : `rm json_objects/settings.json` and create a `Shaders` folder, also need to put default.vert shader in there for any shaders to work !
|
||||
need to delete the old settings : `rm json_objects/settings.json` ~~and create a `Shaders` folder, also need to put default.vert shader in there for any shaders to work !~~
|
||||
|
||||
i think will need to turn on the i2c and serial interfacing... (and maybe that serial switvhing thing .. oh and the clocking for midi serial ... )
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
"0-0"
|
||||
"0-0"
|
||||
@@ -344,7 +344,7 @@
|
||||
"ofvideoplayer",
|
||||
"ofxomxplayer"
|
||||
],
|
||||
"value": "ofvideoplayer"
|
||||
"value": "ofxomxplayer"
|
||||
},
|
||||
"HDMI_MODE": {
|
||||
"action": "change_hdmi_settings",
|
||||
|
||||
Reference in New Issue
Block a user