omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular
    1. Home
    2. SP3IIL93

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    • Profile
    • Following 0
    • Followers 0
    • Topics 2
    • Posts 5
    • Best 0
    • Controversial 0
    • Groups 0

    SP3IIL93

    @SP3IIL93

    0
    Reputation
    441
    Profile views
    5
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    SP3IIL93 Unfollow Follow

    Latest posts made by SP3IIL93

    • What are the names of the sounds?

      I just want to know how to find what all the sound names are.

      posted in Pythonista
      SP3IIL93
      SP3IIL93
    • help with random chord

      <pre>
      import sound
      from scene import *
      from random import random
      from random import choice
      from colorsys import hsv_to_rgb
      sound.load_effect('Boing_1')

      s1=['Piano_C3','Piano_E3','Piano_G3']
      s2=['Piano_D3','Piano_F3','Piano_A3']
      s3=['Piano_E3','Piano_G3','Piano_B3']
      s4=['Piano_F3','Piano_A3','Piano_C4']
      s5=['Piano_G3','Piano_B3','Piano_D4']
      s6=['Piano_A3','Piano_C4','Piano_E4']
      s7=['Piano_B3','Piano_D4','Piano_F4']

      ########PROBLEM HERE########
      random_note=['s1','s2','s3','s4','s5','s6','s7']

      class Particle (object):
      def init(self, location):
      self.location = location

      class Particles (Scene):
      def setup(self):
      self.show_instructions = True
      self.particles = set()
      self.p_size = 64 if self.size.w > 700 else 32

      def should_rotate(self, orientation):
      	return True
      
      def touch_began(self, touch):
      	if self.show_instructions:
      		self.show_instructions = False
      	particle = Particle(touch.location)
      	self.particles.add(particle)
      	sound.play_effect(choice(random_note))
      

      ########AND HERE########

      def draw(self):
      	background(1, 1, 1)
      	if self.show_instructions:
      		s = 40 if self.size.w > 700 else 17
      		text('Touch here.',
      		     'Futura', s, *self.bounds.center().as_tuple())
      	dead = set()
      	for particle in self.particles:
      		s = 20
      		x, y = particle.location.as_tuple()
      		image('Musical_Notes', x - s/2, y - s/2, s, s)
      

      run(Particles())
      </pre>

      posted in Pythonista
      SP3IIL93
      SP3IIL93
    • RE: What are the names of the sounds?

      never mind. i figured it out. THANKS!!!

      posted in Pythonista
      SP3IIL93
      SP3IIL93
    • RE: What are the names of the sounds?

      i am using the ipod. im still confused as to what exactly i need to do. does this need to be in an empty file?

      posted in Pythonista
      SP3IIL93
      SP3IIL93
    • RE: sound module

      please explain exactly what i need to do.

      posted in Pythonista
      SP3IIL93
      SP3IIL93