Skip to content
Snippets Groups Projects
Verified Commit c0d8c532 authored by dos's avatar dos
Browse files

sim: fakes: Basic bl00mbox sampler implementation using pygame

parent 1b34d944
No related branches found
No related tags found
No related merge requests found
class tinysynth:
def __init__(self, a):
pass
import pygame
from _sim import path_replace
def decay_ms(self, a):
pass
def decay(self, a):
class Channel:
def __init__(self, id):
pass
def waveform(self, a):
pass
def new(self, a, *args, **kwargs):
return a(self, *args, **kwargs)
def tone(self, note):
def clear(self):
pass
def start(self):
pass
mixer = None
channel_num = 0
volume = 8000
def sustain(self, a):
pass
def attack_ms(self, a):
pass
class patches:
class sampler:
class Signals:
class Trigger:
def __init__(self, sampler):
self._sampler = sampler
def release_ms(self, a):
pass
def start(self):
self._sampler._sound.set_volume(
self._sampler._channel.volume / 32767
)
self._sampler._sound.play()
def volume(self, a):
pass
def __init__(self, sampler):
self._sampler = sampler
self._trigger = patches.sampler.Signals.Trigger(sampler)
def stop(self):
pass
output = None
@property
def trigger(self):
return self._trigger
class Channel:
def __init__(self, id):
pass
def __init__(self, channel, path):
self._sound = pygame.mixer.Sound(path_replace(path))
self._signals = patches.sampler.Signals(self)
self._channel = channel
def clear(self):
pass
@property
def signals(self):
return self._signals
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment