class Tsh::Sound

Overview

A collection of note data which can be played. Currently you can play a Tone on every waveform at once, giving the ability to play 8 different sounding musical notes at the same time. Attemps to play multiple tones on the same waveform at the same time or playing over 8 tones in one note will yield unexpected and possibly disastrous results.

Defined in:

sounds.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(notes : Array(Note), looping : Bool = false) #

[View source]

Instance Method Detail

def looping : Bool #

Loop the sound


[View source]
def looping=(looping : Bool) #

Loop the sound


[View source]
def notes : Array(Note) #

The notes for the sound to play


[View source]
def play #

Play the sound from the beginning


[View source]
def playing : Bool #

Is the sound currently playing?


[View source]
def resume #

Resume the sound from where it was stopped


[View source]
def stop #

Stop the sound


[View source]