Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added aseqplay.py

- This is the version from 2007-12-02
  • Loading branch information...
commit 7c096b0b629105acf53716e8d902961bb4a558c5 1 parent c8f8586
@ppaez authored
Showing with 33 additions and 0 deletions.
  1. +33 −0 aseqplay.py
View
33 aseqplay.py
@@ -0,0 +1,33 @@
+#! /usr/bin/python
+# -*- coding: UTF-8 -*-
+
+import alsaseq, alsamidi, sys
+
+dest_cliente = int( sys.argv[1] )
+ruta = sys.argv[2]
+if len(sys.argv) > 3:
+ display = sys.argv[3]
+else:
+ display = ''
+
+seq = alsamidi.Seq()
+seq.read( ruta )
+eventos = alsamidi.merge( seq.tracks )
+seq.info()
+
+print len( eventos ), 'eventos'
+alsaseq.client( 'Reproductor', 0, 1, 1 )
+alsaseq.connectto( 0, dest_cliente, 0 )
+
+for channel in range( 16 ):
+ alsaseq.output( alsamidi.pgmchangeevent( channel, 0 ) )
+
+alsaseq.start()
+
+#eventos = alsamidi.modifyevents( eventos, source = ( 20, 0 ) )
+for evento in eventos:
+ if display: print evento
+ alsaseq.output( evento )
+
+alsaseq.syncoutput()
+# time.sleep( delay )
Please sign in to comment.
Something went wrong with that request. Please try again.