Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
changed the name from TouchContinuum to IcarusTouch
  • Loading branch information
stocyr committed Oct 13, 2011
1 parent 8c91a73 commit 72c190e
Show file tree
Hide file tree
Showing 10 changed files with 107 additions and 58 deletions.
10 changes: 6 additions & 4 deletions README.md
@@ -1,6 +1,8 @@
TouchContinuum
IcarusTouch
==============

(former named *TouchContinuum*)

![blue](http://a6.sphotos.ak.fbcdn.net/hphotos-ak-ash4/299067_222700637789286_100001480546056_629480_1690295720_n.jpg?dl=1)__
![hot](http://a5.sphotos.ak.fbcdn.net/hphotos-ak-snc7/311805_222700691122614_100001480546056_629484_266904590_n.jpg?dl=1)

Expand All @@ -27,7 +29,7 @@ http://kivy.org/docs/installation/installation.html
heavily summarized version of the above one.


About TouchContinuum
About IcarusTouch
--------------------

This application is a multitouch instrument in form of a virtual piano keyboard.
Expand Down Expand Up @@ -142,7 +144,7 @@ can be set in the application settings. If you open the selection list for this
settings item, only the following devices are displayed:

* Output devices
* Devices which are not opened (except for the device opened by TouchContinuum)
* Devices which are not opened (except for the device opened by IcarusTouch)

If the preferred MIDI device could not be opened because it does not exist, the
software tries to open the systems default MIDI device.
Expand All @@ -151,7 +153,7 @@ software tries to open the systems default MIDI device.
Copyright and Contact
---------------------

TouchContinuum Copyright (C) 2011 Cyril Stoller
IcarusTouch Copyright (C) 2011 Cyril Stoller

This program comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to redistribute it under certain conditions;
Expand Down
2 changes: 1 addition & 1 deletion src/android.txt
@@ -1,3 +1,3 @@
title=TouchContinuum 1.0
title=IcarusTouch 1.0
author=Cyril Stoller
orientation=landscape
47 changes: 47 additions & 0 deletions src/icarustouch.kv
@@ -0,0 +1,47 @@
# # IcarusTouch# # Copyright (C) 2011 Cyril Stoller# # For comments, suggestions or other messages, contact me at:# <cyril.stoller@gmail.com># # This file is part of IcarusTouch.# # IcarusTouch is free software: you can redistribute it and/or modify# it under the terms of the GNU General Public License as published by# the Free Software Foundation, either version 3 of the License, or# (at your option) any later version.# # IcarusTouch is distributed in the hope that it will be useful,# but WITHOUT ANY WARRANTY; without even the implied warranty of# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the# GNU General Public License for more details.# # You should have received a copy of the GNU General Public License# along with IcarusTouch. If not, see <http://www.gnu.org/licenses/>.# #:kivy 1.0
#:import kivy kivy#:import win kivy.core.window
# Background image description:<Background>: # Problem: I want the background image to have a size bigger than the screen # so that images, that doesn't match the screen's ratio, don't leave a black bar. # But even the full-size + stretch to the screen's dimension doesn't work... # fill the entire screen with the background image allow_stretch: True keep_ratio: False pos_hint: {'center_x':0.5}# Feedback wall image description:<Feedback>: color: (1, 1, 1, root.transparency)# Keyboard ("main instrument" widget) description:<Keyboard>: allow_stretch: True keep_ratio: False # add a border including a shadow canvas.before: Color: rgba: 1,1,1,1 #BorderImage: # source: 'images/shadow_145_white.png' # border: (root.border_width, root.border_width, root.border_width, root.border_width) # size: (self.width+root.border_width*2, self.height+root.border_width*2) # pos: (self.x-root.border_width, self.y-root.border_width) BorderImage: source: 'images/Shadow+Border_38.png' border: (38, 38, 38, 38) size: (self.width+38*2, self.height+38*2) pos: (self.x-38, self.y-38)# Root widget description:
<IcarusTouchWidget>: float_layout: float_layout
pitch_lock_button: pitch_lock_button
y_axis_volume_button: y_axis_volume_button
settings_button: settings_button look_button: look_button
# all aligned widgets are children of the FloatLayout:
FloatLayout: id: float_layout
size: root.size
# Application name and Kivy Logo are on the top-left:
BoxLayout:
padding: 10
spacing: 10
size_hint: 1, None
pos_hint: {'top':1,}
height: 24
Image:
size_hint: None, None
size: 24, 24
source: 'data/logo/kivy-icon-32.png'
Label:
height: 24
text_size: self.size
color: (1, 1, 1, .8)
text: 'IcarusTouch v%s- Kivy %s' % (root.version, kivy.__version__)
# Copyright and author name are on the bottom-left:
Label:
height: 24
pos: 10, 10
text_size: self.size
color: (1, 1, 1, .8)
text: '© 2011 by Cyril Stoller'
# The two big buttons in the middle of the bottom:
BoxLayout:
spacing: 30
padding: 10
size_hint_y: 0.18 size_hint_x: None width: 2*(self.height - 2*self.padding) + self.spacing + 2*self.padding
pos_hint: {'center_x':0.5}
ToggleButton:
id: pitch_lock_button background_normal: 'images/Pitch_Unlocked.png' background_down: 'images/Pitch_Locked.png' on_press: root.on_pitch_lock_button_press() state: 'down' if root.app.config.get('General', 'PitchLock') == 'On' else 'normal'
ToggleButton:
id: y_axis_volume_button
background_normal: 'images/X-Axis_mod.png' background_down: 'images/X-Axis_vol.png' on_press: root.on_y_axis_volume_button_press() state: 'down' if root.app.config.get('General', 'YAxis') == 'Volume' else 'normal'
# The two little buttons on the bottom-right:
BoxLayout: spacing: 15 padding: 10 size_hint_y: 0.15 size_hint_x: None width: 2*(self.height - 2*self.padding) + self.spacing + 2*self.padding pos_hint: {'right':1} Button: id: look_button background_normal: 'images/Look.png' background_down: 'images/Look.png' on_press: root.open_my_settings_panel() Button: id: settings_button background_normal: 'images/Settings.png' background_down: 'images/Settings.png' on_press: root.open_settings() # Maybe we could also add an "Exit" button on the top-right? #Button: # size_hint: None, None # width: root.width / 30 # height: self.width # pos_hint: {'right':0.98, 'top': 0.95} # text: "X" # on_press: root.app.stop()
# The custom settingspanel for the appearance settings:<MySettingsPanel>: background_scroll_view_grid: background_scroll_view_grid keyboard_scroll_view_box: keyboard_scroll_view_box size: root.size # left panel containing the background images ScrollView: size: 500, 700 x: 32 y: 32 do_scroll_x: False #scroll_distance: 5 #scroll_timeout: 250 scroll_friction: 3 # add the same border-shadow combination as on the keyboard canvas.before: Color: rgba: 1, 1, 1, 1 BorderImage: source: 'images/Shadow+Border_38.png' border: (38, 38, 38, 38) size: (self.width+38*2, self.height+38*2) pos: (self.x-38, self.y-38) # the actual content: a gridLayout filled with the images GridLayout: id: background_scroll_view_grid cols: 2 size_hint_y: None spacing: 10 # the background of the panel: dark, but half-transparent canvas: Color: rgba: 0, 0, 0, 0.7 Rectangle: pos: self.pos size: self.size # right panel containing the keyboard images ScrollView: size: 500, 700 right: win.Window.width - 32 y: 32 do_scroll_x: False #scroll_distance: 5 #scroll_timeout: 250 scroll_friction: 2 # add the same border-shadow combination as on the keyboard canvas.before: Color: rgba: 1, 1, 1, 1 BorderImage: source: 'images/Shadow+Border_38.png' border: (38, 38, 38, 38) size: (self.width+38*2, self.height+38*2) pos: (self.x-38, self.y-38) # the actual contend: a boxLayout filled with the images BoxLayout: id: keyboard_scroll_view_box orientation: 'vertical' size_hint_y: None spacing: 10 # the background of the panel: dark, but half-transparent canvas: Color: rgba: 0, 0, 0, 0.7 Rectangle: pos: self.pos size: self.size
Expand Down
10 changes: 5 additions & 5 deletions src/keyboard.py
@@ -1,25 +1,25 @@
'''
TouchContinuum
IcarusTouch
Copyright (C) 2011 Cyril Stoller
For comments, suggestions or other messages, contact me at:
<cyril.stoller@gmail.com>
This file is part of TouchContinuum.
This file is part of IcarusTouch.
TouchContinuum is free software: you can redistribute it and/or modify
IcarusTouch is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
TouchContinuum is distributed in the hope that it will be useful,
IcarusTouch is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with TouchContinuum. If not, see <http://www.gnu.org/licenses/>.
along with IcarusTouch. If not, see <http://www.gnu.org/licenses/>.
'''


Expand Down
54 changes: 27 additions & 27 deletions src/main.py
@@ -1,25 +1,25 @@
'''
TouchContinuum
IcarusTouch
Copyright (C) 2011 Cyril Stoller
For comments, suggestions or other messages, contact me at:
<cyril.stoller@gmail.com>
This file is part of TouchContinuum.
This file is part of IcarusTouch.
TouchContinuum is free software: you can redistribute it and/or modify
IcarusTouch is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
TouchContinuum is distributed in the hope that it will be useful,
IcarusTouch is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with TouchContinuum. If not, see <http://www.gnu.org/licenses/>.
along with IcarusTouch. If not, see <http://www.gnu.org/licenses/>.
'''


Expand Down Expand Up @@ -100,7 +100,7 @@ class Feedback(Image):
##
####################################
'''
class TouchContinuumWidget(Widget):
class IcarusTouchWidget(Widget):
app = ObjectProperty(None)
float_layout = ObjectProperty(None)
pitch_lock_button = ObjectProperty(None)
Expand All @@ -120,7 +120,7 @@ class TouchContinuumWidget(Widget):
####################################
'''
def __init__(self, **kwargs):
super(TouchContinuumWidget, self).__init__(**kwargs) # don't know if this is necessary?
super(IcarusTouchWidget, self).__init__(**kwargs) # don't know if this is necessary?

# add background image (and add it in the BACKGROUND! --> index modification)
self.background = Background(source=self.app.config.get('Graphics', 'Background'))
Expand Down Expand Up @@ -167,23 +167,23 @@ def on_touch_down(self, touch):
if self.my_settings_panel.keyboard_scroll_view_box.collide_point(*touch.pos) or \
self.my_settings_panel.background_scroll_view_grid.collide_point(*touch.pos):
ud['settingspanel'] = True
return super(TouchContinuumWidget, self).on_touch_down(touch)
return super(IcarusTouchWidget, self).on_touch_down(touch)
else:
# user has clicked aside - he wants to quit the settings.
self.close_my_settings_panel()
return True

elif self.keyboard.collide_point(*touch.pos):
# if the user touched on the keyboard, feed the touch to the keyboard.
return super(TouchContinuumWidget, self).on_touch_down(touch)
return super(IcarusTouchWidget, self).on_touch_down(touch)

elif self.pitch_lock_button.collide_point(*touch.pos) or \
self.y_axis_volume_button.collide_point(*touch.pos) or \
self.look_button.collide_point(*touch.pos) or \
self.settings_button.collide_point(*touch.pos):
# if the user touched one of the buttons, feed the touch to the buttons
self.create_circle(touch)
return super(TouchContinuumWidget, self).on_touch_down(touch)
return super(IcarusTouchWidget, self).on_touch_down(touch)

##########################
# X-Axis Key width scaling
Expand Down Expand Up @@ -274,7 +274,7 @@ def on_touch_move(self, touch):

# if the touch was started on the keyboard
if 'initial_key' in ud or 'settingspanel' in ud:
return super(TouchContinuumWidget, self).on_touch_move(touch)
return super(IcarusTouchWidget, self).on_touch_move(touch)


'''
Expand Down Expand Up @@ -308,7 +308,7 @@ def on_touch_up(self, touch):
self.keyboard.keyboard_x_animation.start(self.keyboard)

if 'initial_key' in ud:
return super(TouchContinuumWidget, self).on_touch_up(touch)
return super(IcarusTouchWidget, self).on_touch_up(touch)


'''
Expand Down Expand Up @@ -550,14 +550,14 @@ def keyboard_change_complete(self, animation, widget):
##
####################################
'''
class TouchContinuum(App):
title = 'TouchContinuum'
class IcarusTouch(App):
title = 'IcarusTouch'
icon = 'icon.png'


def build(self):
# print the application informations
print '\nTouchContinuum v%s Copyright (C) 2011 Cyril Stoller' % VERSION
print '\nIcarusTouch v%s Copyright (C) 2011 Cyril Stoller' % VERSION
print 'This program comes with ABSOLUTELY NO WARRANTY'
print 'This is free software, and you are welcome to redistribute it'
print 'under certain conditions; see the source code for details.\n'
Expand All @@ -574,8 +574,8 @@ def build(self):
print 'Loading images... Please wait.'

# create the root widget and give it a reference of the application instance (so it can access the application settings)
self.touchcontinuumwidget = TouchContinuumWidget(app=self)
return self.touchcontinuumwidget
self.icarustouchwidget = IcarusTouchWidget(app=self)
return self.icarustouchwidget


def build_config(self, config):
Expand Down Expand Up @@ -682,28 +682,28 @@ def on_config_change(self, config, section, key, value):

if token == ('General', 'YAxis'):
# set the buttons to sync up with the settings
self.touchcontinuumwidget.y_axis_volume_button.state = 'normal' if value == 'Aftertouch' else 'down'
self.touchcontinuumwidget.on_y_axis_volume_button_press()
self.icarustouchwidget.y_axis_volume_button.state = 'normal' if value == 'Aftertouch' else 'down'
self.icarustouchwidget.on_y_axis_volume_button_press()
elif token == ('General', 'PitchLock'):
# set the buttons to sync up with the settings
self.touchcontinuumwidget.pitch_lock_button.state = 'normal' if value == 'Off' else 'down'
self.touchcontinuumwidget.on_pitch_lock_button_press()
self.icarustouchwidget.pitch_lock_button.state = 'normal' if value == 'Off' else 'down'
self.icarustouchwidget.on_pitch_lock_button_press()
elif token == ('General', 'MonoMode'): # inactive if voice mode is 'polyphonic'
pass


elif token == ('Graphics', 'Background'):
# change the background image like with an opened mySettingsPanel
self.touchcontinuumwidget.background_image_change(value)
self.touchcontinuumwidget.close_my_settings_panel()
self.icarustouchwidget.background_image_change(value)
self.icarustouchwidget.close_my_settings_panel()
elif token == ('Graphics', 'Keyboard'):
# change the keyboard image like with an opened mySettingsPanel
self.touchcontinuumwidget.keyboard_image_change(value)
self.touchcontinuumwidget.close_my_settings_panel()
self.icarustouchwidget.keyboard_image_change(value)
self.icarustouchwidget.close_my_settings_panel()


elif token == ('MIDI', 'Device'):
self.touchcontinuumwidget.set_midi_device()
self.icarustouchwidget.set_midi_device()
elif token == ('MIDI', 'Channel'):
# TODO: setting the value to 0 here causes an error?!
# config.set('MIDI', 'Channel', boundary(value, 0, 15)
Expand Down Expand Up @@ -759,5 +759,5 @@ def print_widget_tree(self):


if __name__ in ('__main__', '__android__'):
TouchContinuum().run()
IcarusTouch().run()

10 changes: 5 additions & 5 deletions src/mysettingspanel.py
@@ -1,25 +1,25 @@
'''
TouchContinuum
IcarusTouch
Copyright (C) 2011 Cyril Stoller
For comments, suggestions or other messages, contact me at:
<cyril.stoller@gmail.com>
This file is part of TouchContinuum.
This file is part of IcarusTouch.
TouchContinuum is free software: you can redistribute it and/or modify
IcarusTouch is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
TouchContinuum is distributed in the hope that it will be useful,
IcarusTouch is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with TouchContinuum. If not, see <http://www.gnu.org/licenses/>.
along with IcarusTouch. If not, see <http://www.gnu.org/licenses/>.
'''


Expand Down
10 changes: 5 additions & 5 deletions src/settingfile.py
@@ -1,25 +1,25 @@
'''
TouchContinuum
IcarusTouch
Copyright (C) 2011 Cyril Stoller
For comments, suggestions or other messages, contact me at:
<cyril.stoller@gmail.com>
This file is part of TouchContinuum.
This file is part of IcarusTouch.
TouchContinuum is free software: you can redistribute it and/or modify
IcarusTouch is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
TouchContinuum is distributed in the hope that it will be useful,
IcarusTouch is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with TouchContinuum. If not, see <http://www.gnu.org/licenses/>.
along with IcarusTouch. If not, see <http://www.gnu.org/licenses/>.
'''


Expand Down

0 comments on commit 72c190e

Please sign in to comment.