Commits

Alexandre Quessy  committed 89ff120 Merge

merged

  • Participants
  • Parent commits 81c5aca, 74eb895

Comments (0)

Files changed (3)

File papercut_toonloop

 #    --verbose
 
 toonloop \
-    --device=0 \
+    --device=1 \
     --image-width=320 \
     --fps=30 \
     -o project_name papercut \
-    -o osc_enabled True \
-    -o osc_verbose True \
-    -o osc_sampler_enabled True \
+    -o midi_input_id 5 \
+    -o midi_enabled True \
+    -o midi_verbose True \
     --verbose

File papercut_toonloop_audio

+#!/bin/bash
+
+toonloop \
+    --device=1 \
+    --image-width=320 \
+    -o display_width 1024 \
+    -o display_height 768 \
+    --fps=30 \
+    -o midi_input_id 5 \
+    -o midi_enabled True \
+    -o midi_verbose True \
+    -o project_name papercut \
+    -o osc_enabled True \
+    -o osc_verbose True \
+    -o osc_sampler_enabled True \
+    --verbose
+
+# FIXME: device 1
+
+# MIDI
+#    -o midi_input_id 7 \
+#    -o midi_enabled True \
+#    -o midi_verbose True \
+
     (options, args) = parser.parse_args()
     print("This pid is %d" % (os.getpid()))
     sampler = Sampler()
-    deferred = client.create_simple_client()
+    
+    pd_manager_kwargs = {}
+    pd_manager_kwargs["audioindev"] = 1 # 2 
+    pd_manager_kwargs["audiooutdev"] = 1 
+    pd_manager_kwargs["driver"] = "alsa"
+    
+    deferred = client.create_simple_client(**pd_manager_kwargs)
     deferred.addCallback(sampler.creation_callback)
     osc_controller = OscController(sampler, send_host=options.send_host, receive_port=options.receive_port, send_port=options.send_port)
     try:
         reactor.run()
     except KeyboardError:
         print("Ctrl-C has been pressed.")
+# DIDNT WORK:
+#    sampler.client.send_message("pd", "quit")
+#    def _quit():
+#        print("Will quit now.")
+#        reactor.stop()
+#    WAIT_FOR  = 2.0
+#    print("Will quit in %2.2f seconds" % (WAIT_FOR))
+#    reactor.callLater(WAIT_FOR, _quit)
+#    reactor.run()
     import subprocess
     print("Killing all running pd processes.") # FIXME
     subprocess.call("killall pd", shell=True)