Peace Synthesizer Framework  0.03
Cross Platform Scriptable Real-Time Visualization & Sound !!
tu_005a_NES_Famicom_sound_emulation.py

Play sequence data of NES (famicom) sound emulation V0.03

Click on each functions for more detail

1 ##\example tu_005a_NES_Famicom_sound_emulation.py
2 #Play sequence data of NES (famicom) sound emulation V0.03
3 #
4 #\n\n <small>Click on each functions for more detail </small>\n
5 #
6 
7 import peaceaudio
8 import time
9 import song.nes.sidepocket_test as demosong
10 
11 buffersize = 128
12 peaceaudio.init_peaceaudio(sample_rate = 44100, inch = 0, outch=2, framesPerBuffer = buffersize)
14 
16 track.initStringCompiler(demosong.text)
17 track.compileString()
18 
19 def callback():
22  return 1
23 
24 
25 mixer = peaceaudio.createMixer()
26 mixer.addTrack(track)
27 
29 peaceaudio.setCallback(callback)
31 
32 while track.stringcompiler.alive:
33  time.sleep(0.1)
35 print "exit"