pygame is
Python
Simple DirectMedia Layer
 
 
pygame.org is
Site Swing
BadPenni - MIDI Triggered Sound Looper

BadPenni - MIDI Triggered Sound Looper - 0.01

Brian Gryder (bgryderclock)

Tags:

Description

This program is a single simple text file. All of the MIDI notes and sound files are assigned near the top of the file and the install/operation instructions are at the bottom. Just edit the parameters, save it in the folder with your sounds, plug up your MIDI device, run the program, and rock out (in a Devo/Skinny Puppy sort of way).

I wrote this to play loops with a midi foot controller while playing live drums. All of the parameters are (editable , but) hard coded in the program, with no fancy knobs and sliders to mess up on-stage. Contact me if you have any suggestions for improvement.
instructions:
---------------------------------------------------------------------
Installing the Program: 

    1) Install Pygame. (pygame.org)
    2) Copy this file into a folder with sound files. 
    3) Edit the file to assign the sound files to simple variable at line 11 like this:

sound1 = pygame.mixer.Sound("beat1.wav")
sound2 = pygame.mixer.Sound("beat2.wav")
sound3 = pygame.mixer.Sound("beat3.wav")
sound4 = pygame.mixer.Sound("beat4.wav")
(and so on..)

    4) Edit the file to assign the sound files to MIDI note numbers 
    (C=48, C#=49, D=50 etc) at line 18 like this: 

        if mymidinote == "48":
            nextsound = sound1
            updateScreenAndQueueNextSound()
        if mymidinote == "50":
            nextsound = sound2
            updateScreenAndQueueNextSound()
        if mymidinote == "52":
            nextsound = sound3
            updateScreenAndQueueNextSound()
        if mymidinote == "53":
            nextsound = sound4
            updateScreenAndQueueNextSound()

(*Hint watch the spaces in front of the lines, they are important)

---------------------------------------------------------------------
Running the Program:

    1) Open a terminal window
    2) Change to the folder with the program and sound files
    3) Enter this command: python -u badpenni.py
    4) This prompt will be displayed:

 0: interface :ALSA:, name :Midi Through Port-0:, opened :0:  (output)
 1: interface :ALSA:, name :Midi Through Port-0:, opened :0:  (input)
 2: interface :ALSA:, name :Virtual Keyboard:, opened :0:  (input)
See list above. Please enter the number for your midi input device:

    6) Enter the number from the list for your MIDI device.

    7) Play the assigned notes with your MIDI device. 
    The assigned sounds will play and loop. 
    Newly triggered sounds will be queued to play when the current loop finishes. 

Links

Home Page: http://bgryderclock.blogspot.com
Source: http://www.fileden.com/files/2007/7/29/1306661//badpenni.py
Windows: http://www.fileden.com/files/2007/7/29/1306661//badpenni.py
Mac: http://www.fileden.com/files/2007/7/29/1306661//badpenni.py

Screenshot


click to view original size

Releases

BadPenni - MIDI Triggered Sound Looper - 0.01 - Dec 31, 2010

Pygame.org account Comments

If you wish to leave a comment with your pygame.org account, please sign in first.

No user comments have been submitted.
spotlight

 
our projects
pygame.org welcomes all python game, art, music, sound, video and multimedia projects. If they use pygame or not.
 
recent releases
Dec 16, 2014


Dec 14, 2014

Dec 9, 2014

Dec 6, 2014

Dec 5, 2014

Dec 3, 2014

Nov 27, 2014


Nov 13, 2014

Nov 11, 2014


... more!
 
for pygame related questions, comments, and suggestions, please see help (lists, irc)