mirror of
https://github.com/cyberboy666/r_e_c_u_r.git
synced 2025-12-11 19:00:04 +01:00
18
actions.py
18
actions.py
@@ -150,11 +150,25 @@ class Actions(object):
|
|||||||
elif self.data.player_mode == 'next':
|
elif self.data.player_mode == 'next':
|
||||||
self.video_driver.next_player.toggle_show()
|
self.video_driver.next_player.toggle_show()
|
||||||
|
|
||||||
|
def increase_seek_time(self):
|
||||||
|
options = self.data.settings['sampler']['SEEK_TIME']['options']
|
||||||
|
current_index = [index for index, item in enumerate(options) if item == self.data.settings['sampler']['SEEK_TIME']['value'] ][0]
|
||||||
|
self.data.settings['sampler']['SEEK_TIME']['value'] = options[(current_index + 1) % len(options) ]
|
||||||
|
self.message_handler.set_message('INFO', 'The Seek Time is now ' + str(self.data.settings['sampler']['SEEK_TIME']['value']) + 's')
|
||||||
|
|
||||||
|
|
||||||
|
def decrease_seek_time(self):
|
||||||
|
options = self.data.settings['sampler']['SEEK_TIME']['options']
|
||||||
|
current_index = [index for index, item in enumerate(options) if item == self.data.settings['sampler']['SEEK_TIME']['value'] ][0]
|
||||||
|
self.data.settings['sampler']['SEEK_TIME']['value'] = options[(current_index - 1) % len(options) ]
|
||||||
|
self.message_handler.set_message('INFO', 'The Seek Time is now ' + str(self.data.settings['sampler']['SEEK_TIME']['value']) + 's')
|
||||||
|
|
||||||
|
|
||||||
def seek_forward_on_player(self):
|
def seek_forward_on_player(self):
|
||||||
self.video_driver.current_player.seek(30)
|
self.video_driver.current_player.seek(self.data.settings['sampler']['SEEK_TIME']['value'])
|
||||||
|
|
||||||
def seek_back_on_player(self):
|
def seek_back_on_player(self):
|
||||||
self.video_driver.current_player.seek(-30)
|
self.video_driver.current_player.seek(-(self.data.settings['sampler']['SEEK_TIME']['value']))
|
||||||
|
|
||||||
def toggle_function(self):
|
def toggle_function(self):
|
||||||
self.data.function_on = not self.data.function_on
|
self.data.function_on = not self.data.function_on
|
||||||
|
|||||||
@@ -57,7 +57,8 @@ you are done ! wasnt that easy ?
|
|||||||
[raspberry pi3]:https://www.aliexpress.com/item/RS-Version-2016-New-Raspberry-Pi-3-Model-B-Board-1GB-LPDDR2-BCM2837-Quad-Core-Ras/32789942633.html?spm=a2g0s.9042311.0.0.FkRWty
|
[raspberry pi3]:https://www.aliexpress.com/item/RS-Version-2016-New-Raspberry-Pi-3-Model-B-Board-1GB-LPDDR2-BCM2837-Quad-Core-Ras/32789942633.html?spm=a2g0s.9042311.0.0.FkRWty
|
||||||
[main parts]: build_all.jpg
|
[main parts]: build_all.jpg
|
||||||
[raspberry pi screen]:https://www.aliexpress.com/item/3-5-Inch-TFT-LCD-Moudle-For-Raspberry-Pi-2-Model-B-RPI-B-raspberry-pi/32707058182.html?spm=a2g0s.13010208.99999999.262.bV4EPV
|
[raspberry pi screen]:https://www.aliexpress.com/item/3-5-Inch-TFT-LCD-Moudle-For-Raspberry-Pi-2-Model-B-RPI-B-raspberry-pi/32707058182.html?spm=a2g0s.13010208.99999999.262.bV4EPV
|
||||||
[usb keypad]:https://www.aliexpress.com/item/2-4G-Wireless-Keyboard-USB-Numeric-Keypad-19-Keys-Mini-Digital-Keyboard-Ultra-Slim-Number-Pad/32818206308.html?spm=a2g0s.9042311.0.0.FkRWty
|
[usb keypad (AliExpress)]:https://www.aliexpress.com/item/2-4G-Wireless-Keyboard-USB-Numeric-Keypad-19-Keys-Mini-Digital-Keyboard-Ultra-Slim-Number-Pad/32818206308.html?spm=a2g0s.9042311.0.0.FkRWty
|
||||||
|
[usb keypad (Amazon)]:https://www.amazon.com/gp/product/B076GZDC14/ref=oh_aui_detailpage_o00_s00?ie=UTF8&psc=1&fbclid=IwAR3fNd1z0Cu137GE0ONYP2vmoTm0rJIvDA9plHlvCjNGZrSZFsV_naCHax0
|
||||||
[top]: ./topplate.stl
|
[top]: ./topplate.stl
|
||||||
[bottom]: ./baseplate.stl
|
[bottom]: ./baseplate.stl
|
||||||
[key stickers]: ./keystickers.svg
|
[key stickers]: ./keystickers.svg
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"a": {
|
"a": {
|
||||||
"NAV_BROWSER": ["move_browser_selection_up"],
|
"NAV_BROWSER": ["move_browser_selection_up"],
|
||||||
"PLAYER": ["seek_back_on_player"],
|
"PLAYER": ["seek_back_on_player", "decrease_seek_time"],
|
||||||
"NAV_SETTINGS": ["move_settings_selection_up"],
|
"NAV_SETTINGS": ["move_settings_selection_up"],
|
||||||
"NAV_SHADERS": ["move_shaders_selection_up"],
|
"NAV_SHADERS": ["move_shaders_selection_up"],
|
||||||
"LENGTH_SET": ["return_to_default_control_mode"],
|
"LENGTH_SET": ["return_to_default_control_mode"],
|
||||||
@@ -9,7 +9,7 @@
|
|||||||
},
|
},
|
||||||
"b": {
|
"b": {
|
||||||
"NAV_BROWSER": ["move_browser_selection_down"],
|
"NAV_BROWSER": ["move_browser_selection_down"],
|
||||||
"PLAYER": ["seek_forward_on_player"],
|
"PLAYER": ["seek_forward_on_player", "increase_seek_time"],
|
||||||
"NAV_SETTINGS": ["move_settings_selection_down"],
|
"NAV_SETTINGS": ["move_settings_selection_down"],
|
||||||
"NAV_SHADERS": ["move_shaders_selection_down"],
|
"NAV_SHADERS": ["move_shaders_selection_down"],
|
||||||
"LENGTH_SET": ["return_to_default_control_mode"],
|
"LENGTH_SET": ["return_to_default_control_mode"],
|
||||||
|
|||||||
@@ -261,7 +261,21 @@
|
|||||||
"off"
|
"off"
|
||||||
],
|
],
|
||||||
"value": "off"
|
"value": "off"
|
||||||
}
|
},
|
||||||
|
"SEEK_TIME": {
|
||||||
|
"action": null,
|
||||||
|
"options": [
|
||||||
|
0.5,
|
||||||
|
1,
|
||||||
|
5,
|
||||||
|
10,
|
||||||
|
15,
|
||||||
|
30,
|
||||||
|
60,
|
||||||
|
120
|
||||||
|
],
|
||||||
|
"value": 5
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"video": {
|
"video": {
|
||||||
"BACKGROUND_COLOUR": {
|
"BACKGROUND_COLOUR": {
|
||||||
|
|||||||
Reference in New Issue
Block a user