This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from scene import * | |
| import sound | |
| import random | |
| import math | |
| A = Action | |
| mapsprites=['plc:Brown_Block','plc:Dirt_Block','plc:Grass_Block','plc:Plain_Block',] | |
| def choose_random_node(): | |
| tx=random.choice(mapsprites) | |
| sn=SpriteNode(tx) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import sound,ui | |
| from sound import Recorder | |
| from sound import Player | |
| sound.set_volume(1) | |
| filename='4.m4a' #could have this come from a textfield in the ui... | |
| play_image=ui.Image('iob:play_256') | |
| stop_image=ui.Image('iob:stop_256') | |
| record_image=ui.Image('iob:ios7_circle_filled_256') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import sound,ui | |
| from sound import Recorder | |
| from sound import Player | |
| sound.set_volume(1) | |
| filename='4.m4a' #could have this come from a textfield in the ui... | |
| play_image=ui.Image('iob:play_256') | |
| stop_image=ui.Image('iob:stop_256') | |
| record_image=ui.Image('iob:ios7_circle_filled_256') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # coding: utf-8 | |
| # based on Cethric's image capture gist.... | |
| FRAME_PROC_INTERVAL=15 #num frames to skip. 1=go as fast as possible, 5=every fifth frame | |
| import ui | |
| from objc_util import * | |
| import ctypes | |
| from objc_util import autoreleasepool | |
| AVCaptureDevice = ObjCClass('AVCaptureDevice') | |
| AVCaptureDeviceInput = ObjCClass('AVCaptureDeviceInput') | |
| AVCaptureVideoDataOutput = ObjCClass('AVCaptureVideoDataOutput') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from scene import * | |
| from math import floor | |
| class SceneTimers(Scene): | |
| def setup(self): | |
| t1=LabelNode() | |
| t2=LabelNode() | |
| t3=LabelNode() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import ui | |
| import numpy as np | |
| W=1024 | |
| import time | |
| from objc_util import * | |
| CAShapeLayer=ObjCClass('CAShapeLayer') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from objc_util import * | |
| AVAudioEngine = ObjCClass('AVAudioEngine').alloc().init() | |
| AVAudioSession = ObjCClass('AVAudioSession') | |
| AVAudioRecorder = ObjCClass('AVAudioRecorder') | |
| shared_session = AVAudioSession.sharedInstance() | |
| category_set= shared_session.setCategory_withOptions_error_( | |
| ns('AVAudioSessionCategoryRecord'), | |
| 0x2, #duckothers | |
| None) |
NewerOlder