Exemplo n.º 1
0
def initCbox(clientName):
    cbox.init_engine("")
    cbox.Config.set("io", "client_name", clientName)
    cbox.start_audio()
    scene = cbox.Document.get_engine().new_scene()
    scene.clear()
    cbox.do_cmd("/master/set_ppqn_factor", None, [D4]) #quarter note has how many ticks?

    cbox.Transport.stop()
    cbox.Transport.seek_ppqn(0)
    cbox.Transport.set_tempo(120.0) #must be float
    eventLoop.call_soon(cboxLoop, eventLoop)
    return scene, cbox, eventLoop
Exemplo n.º 2
0
def initCbox(clientName, internalEventProcessor=True, commonMidiInput=True):
    cbox.init_engine("")
    cbox.Config.set("io", "client_name", clientName)
    cbox.Config.set("io", "enable_common_midi_input", commonMidiInput) #the default "catch all" midi input
    cbox.start_audio()
    scene = cbox.Document.get_engine().new_scene()
    scene.clear()
    cbox.do_cmd("/master/set_ppqn_factor", None, [D4]) #quarter note has how many ticks?

    cbox.Transport.stop()
    cbox.Transport.seek_ppqn(0)
    cbox.Transport.set_tempo(120.0) #must be float

    if internalEventProcessor:
        eventLoop.call_soon(cboxLoop, eventLoop)
    return scene, cbox, eventLoop
Exemplo n.º 3
0
def initCbox(clientName, internalEventProcessor=True, commonMidiInput=True):
    cbox.init_engine("")
    cbox.Config.set("io", "client_name", clientName)
    cbox.Config.set("io", "enable_common_midi_input",
                    commonMidiInput)  #the default "catch all" midi input
    cbox.start_audio()
    scene = cbox.Document.get_engine().new_scene()
    scene.clear()
    cbox.do_cmd("/master/set_ppqn_factor", None,
                [D4])  #quarter note has how many ticks?

    cbox.Transport.stop()
    cbox.Transport.seek_ppqn(0)
    cbox.Transport.set_tempo(120.0)  #must be float

    if internalEventProcessor:
        eventLoop.call_soon(cboxLoop, eventLoop)
    return scene, cbox, eventLoop
Exemplo n.º 4
0
You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
"""

import atexit
from pprint import pprint
from calfbox import cbox


cbox.init_engine("")
cbox.Config.set("io", "outputs", 8)
NAME = "Cbox Interactive"
cbox.Config.set("io", "client_name", NAME)

cbox.start_audio()
scene = cbox.Document.get_engine().new_scene()
scene.clear()

print("Setting nonsense meta data to our first two ports and midi port")
cbox.JackIO.Metadata.set_property("Cbox Interactive:out_1", "foo", "bar")
cbox.JackIO.Metadata.set_property("Cbox Interactive:out_1", "faz", "baz")
cbox.JackIO.Metadata.set_property("Cbox Interactive:out_2", "rolf", "hello")
cbox.JackIO.Metadata.set_property("Cbox Interactive:out_2", "rolf", "hello")
cbox.JackIO.Metadata.set_property("Cbox Interactive:midi", "wolf", "world", "stryng")
cbox.JackIO.Metadata.set_property("Cbox Interactive:midi", "asd", "qwe", "")


print ("Setting port order for all 8 ports")

portOrderDict = {
Exemplo n.º 5
0
# -*- coding: utf-8 -*-

from calfbox import cbox
import time


def cmd_dumper(cmd, fb, args):
    print("%s(%s)" % (cmd, ",".join(list(map(repr, args)))))


cbox.init_engine("")  #empty string so cbox doesn't look for the .cboxrc file

cbox.Config.set("io", "use_usb", 0)
cbox.Config.set("io", "midi", "*.*")

cbox.start_audio(cmd_dumper)

global Document
Document = cbox.Document

status = cbox.JackIO.status()
client_name = status.client_name
print("Client name: %s" % client_name)
print("Audio inputs: %d, outputs: %d" %
      (status.audio_inputs, status.audio_outputs))
print("Sample rate: %d frames/sec" % (status.sample_rate))
print("JACK period: %d frames" % (status.buffer_size))

left_dry = cbox.JackIO.create_audio_output('left_dry')
right_dry = cbox.JackIO.create_audio_output('right_dry')
left_wet = cbox.JackIO.create_audio_output('left_wet', '#1')
Exemplo n.º 6
0
track1=bd
track2=sd
track3=hh
track4=ho
bd_note=c1
sd_note=d1
hh_note=f#1
ho_note=a#1
bd_trigger=9... .... 9.6. ....
sd_trigger=.... 9..5 .2.. 9...
hh_trigger=9353 7353 7353 73.3
ho_trigger=.... .... .... ..3.
""")

cbox.Config.set("io", "use_usb", 1)
cbox.start_audio(cmd_dumper)

global Document
Document = cbox.Document

status = cbox.JackIO.status()
client_name = status.client_name
print ("Client type: %s" % status.client_type)
print ("Client name: %s" % client_name)
print ("Audio inputs: %d, outputs: %d" % (status.audio_inputs, status.audio_outputs))
print ("Period: %d frames" % (status.buffer_size))
print ("Sample rate: %d frames/sec" % (status.sample_rate))
print ("Output resolution: %d bits/sample" % (status.output_resolution))
print ("MIDI input devices: %s" % (status.midi_input))
#cbox.JackIO.create_midi_output('drums', 'system:midi_playback_1')
Exemplo n.º 7
0
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
"""

import atexit
from pprint import pprint
from calfbox import cbox

cbox.init_engine("")
cbox.Config.set("io", "outputs", 8)
NAME = "Cbox Interactive"
cbox.Config.set("io", "client_name", NAME)

cbox.start_audio()
scene = cbox.Document.get_engine().new_scene()
scene.clear()

print("Setting a pretty name directly on our client")
cbox.JackIO.Metadata.client_set_property(
    "http://jackaudio.org/metadata/pretty-name", NAME + " Pretty Client Name")

print("Setting nonsense meta data to our first two ports and midi port")
cbox.JackIO.Metadata.set_property("Cbox Interactive:out_1", "foo", "bar")
cbox.JackIO.Metadata.set_property("Cbox Interactive:out_1", "faz", "baz")
cbox.JackIO.Metadata.set_property("Cbox Interactive:out_2", "rolf", "hello")
cbox.JackIO.Metadata.set_property("Cbox Interactive:out_2", "rolf", "hello")
cbox.JackIO.Metadata.set_property("Cbox Interactive:midi", "wolf", "world",
                                  "stryng")
cbox.JackIO.Metadata.set_property("Cbox Interactive:midi", "asd", "qwe", "")