Nsound Instruments

Instruments are classes that provide a common API, their purpose is to provide a foundation of common musical elements for everyone to use.

All Nsound Instruments will provide the following functions:

Nsound.Instrument.play()

Returns:

demo : Nsound.AudioStream
Returns a demo created by the author of the instrument
Nsound.Instrument.play(duration, frequency)

Parameters:

duration : float
The duration in seconds of sound to generate
frequency : float
The frequency of the sound in Hz

Returns:

out : Nsound.AudioStream
Returns the sound of the instrument at the given frequency for duration seconds

Bass Guitar

Based on a physical model written in Csound by Hans Mikelson.

Nsound.GuitarBass(sample_rate)
sample_rate : float
The number of samples per seconds

Sample here: GuitarBass.mp3.

Clarinet

Based on a physical model written in Csound by Hans Mikelson which was originally based on Perry Cook’s physical model.

Nsound.Clarinet(sample_rate)
sample_rate : float
The number of samples per seconds

Sample here: Clarinet.mp3.

Kick Bass Drum

Nsound.DrumKickBass(sample_rate, high_frequency, low_frequency)
sample_rate : float
The number of samples per seconds
high_frequency : float
The starting frequency of the drum
low_frequency : float
The stopping frequency of the drum as its response decays

Sample here: DrumKickBass.mp3.

BD01 Drum

Simulates a bass drum. Based on a Csound drum.

source: http://www.csounds.com/istvan/html/drums.html

Nsound.DrumBD01(sample_rate)
sample_rate : float
The number of samples per seconds

Sample here: DrumBD01.mp3.

Hat

Simulates a Hat hit, based on a Csound Hat instrument by Steven Cook.

Nsound.Hat(sample_rate)
sample_rate : float
The number of samples per seconds

Sample here: Hat.mp3.

Pipe Organ

Based on a Csound Pipe Organ by Hons Mikelson.

Nsound.OrganPipe(sample_rate)
sample_rate : float
The number of samples per seconds

Sample here: OrganPipe.mp3.

Slide Flute

Based on a physical model written in Csound by Hans Mikelson which was originally based on Perry Cook’s physical model.

Nsound.FluteSlide(sample_rate)
sample_rate : float
The number of samples per seconds

Sample here: FluteSlide.mp3.

Table Of Contents

Previous topic

Nsound Real-Time Audio Playback

Next topic

Nsound Generators

This Page