Permalink
Browse files

PEP 8

  • Loading branch information...
1 parent a507794 commit 84463f4fb0762d2824537bd028af6634c4ff17f5 @ppaez committed Feb 5, 2014
Showing with 15 additions and 11 deletions.
  1. +15 −11 aseqplay.py
View
@@ -2,33 +2,37 @@
#! /usr/bin/python
# -*- coding: UTF-8 -*-
-import alsaseq, alsamidi, sys
+import sys
+import alsaseq
+import alsamidi
+
def main(dest_client, file_name, display=False):
seq = alsamidi.Seq()
- seq.read( file_name )
- events = alsamidi.merge( seq.tracks )
+ seq.read(file_name)
+ events = alsamidi.merge(seq.tracks)
seq.info()
- print(len( events ), 'events')
- alsaseq.client( 'aseqplay', 0, 1, 1 )
- alsaseq.connectto( 0, dest_client, 0 )
+ print(len(events), 'events')
+ alsaseq.client('aseqplay', 0, 1, 1)
+ alsaseq.connectto(0, dest_client, 0)
- for channel in range( 16 ):
- alsaseq.output( alsamidi.pgmchangeevent( channel, 0 ) )
+ for channel in range(16):
+ alsaseq.output(alsamidi.pgmchangeevent(channel, 0))
alsaseq.start()
#events = alsamidi.modifyevents( events, source = ( 20, 0 ) )
for event in events:
- if display: print(event)
- alsaseq.output( event )
+ if display:
+ print(event)
+ alsaseq.output(event)
alsaseq.syncoutput()
# time.sleep( delay )
if __name__ == '__main__':
- dest_client = int( sys.argv[1] )
+ dest_client = int(sys.argv[1])
file_name = sys.argv[2]
if len(sys.argv) > 3:
display = sys.argv[3]

0 comments on commit 84463f4

Please sign in to comment.