Skip to main content

Python module for programming simple beat loops.

Project description

========
Beatloop
========

Beatloop is a python module for programming simple beat loops.

Usage
=====

This is an example usage of beatloop. You can find a more detailed
example in the "examples" folder::

import beatloop

loop = beatloop.Loop(300, 4, 4, 3)
#300 BPM, 4 beats with 4 steps each, 3 audio channels

loop.load_sound("kick.ogg", 0) #load kick sound into channel #0
loop.load_sound("hat.ogg", 1) #hat into ch. #1
loop.load_sound("snare.ogg", 2)#snare into ch. #2

loop.set_sound(0, 0, 0) #set kick in beat 0, step 0
loop.set_sound(1, 1, 0) #snare in beat 1, step 0

loop.set_repeat(2, 2) #hats each 2 steps

loop.print_pattern() #display a scheme of the pattern

loop.play_once() #finally, play the loop once

Notes
-----

* Beatloop uses pygame. The pygame sound (and, inherently, beatloop)
only reads .wav and .ogg sound files.

Project details


Release history Release notifications | RSS feed

This version

0.1

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page