diff options
author | James <olpc@localhost.localdomain> | 2007-01-25 08:40:00 (GMT) |
---|---|---|
committer | James <olpc@localhost.localdomain> | 2007-01-25 08:40:00 (GMT) |
commit | eae4efe983b2aaf46338a6e2983f83ac5a3fe5f3 (patch) | |
tree | 3bb7df2a8ba597608ad386179bcb781d6503b259 /ttt.py | |
parent | 0701b52b495c7a3aaf62ecc4eab52ca1ddae136f (diff) |
SoundClient can disconnect, reconnect
Diffstat (limited to 'ttt.py')
-rw-r--r-- | ttt.py | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -42,12 +42,12 @@ if __name__ == "__main__": while True: i = raw_input() - if i == 'w': + if i == 'w': # stop note n = CSoundNote(0.0, 0, 1.0, 0.0, 1.0, 1.0, instrument = inst, decay=0.7) n.playNow(1.0) - elif i == 'q': + elif i == 'q': # quit break - elif i == 'b': + elif i == 'b': # generate and start a beat sc_loop_setNumTicks( 4 * Config.TICKS_PER_BEAT) sc_loop_clear() sc_loop_setTickDuration(23.0) @@ -57,16 +57,16 @@ if __name__ == "__main__": sc_loop_setTick(sc_loop_getTick()) sc_loop_playing(1) print 'playing true!' - elif i == 's': + elif i == 's': # stop a beat sc_loop_playing(0) - elif i == 'u': + elif i == 'u': # start csound sc_start() load_instruments() time.sleep(0.2) sc_setMasterVolume(50.0) - elif i == 'd': + elif i == 'd': # stop csound sc_stop() - else: + else: # play a sitar n = CSoundNote(0.0, 24 + 4, 1.0, 0.0, -1.0, 1.0, instrument = inst) n.playNow(1.0) |