Python pygame.midi error portmidi -
i use debian 8 version of python pygame when try ear midi clicking got :
une erreur est survenue la lecture de ce film exige un greffon décodeur audio/x-midi-event qui n'est pas installé.
but can ear :
aplay monfichier.mid
if try run prog python/pygame know example find on web im sure works :
import pygame import time import pygame.midi pygame.midi.init() player= pygame.midi.output(0) player.set_instrument(48,1) major=[0,4,7,12] def go(note): player.note_on(note, 127,1) time.sleep(1) player.note_off(note,127,1) def arp(base,ints): n in ints: go(base+n) def chord(base, ints): player.note_on(base,127,1) player.note_on(base+ints[1],127,1) player.note_on(base+ints[2],127,1) player.note_on(base+ints[3],127,1) time.sleep(1) player.note_off(base,127,1) player.note_off(base+ints[1],127,1) player.note_off(base+ints[2],127,1) player.note_off(base+ints[3],127,1) def end(): pygame.quit()
i have:
python3 pygameex.py exception ignored in: <pypm.output object @ 0xb6514e30> traceback (most recent call last): file "pypm.pyx", line 306, in pypm.output.__dealloc__ (src/pypm.c:1438) exception: b"portmidi: `bad pointer'"
i tried python 2.7 , python 3 same error looked on web , found same question without answers
i want make notes , chords without passing files i'm looking python module cannot find happyness
in case experience same issue, happens when forget close midi resources @ end of program :
import pygame.midi import time pygame.midi.init() midiout = pygame.midi.output(0) midiout.note_on(64,127) time.sleep(0.5) midiout.note_off(64,127) midiout.close()
Comments
Post a Comment