ftp.nice.ch/pub/next/unix/audio/sms.N.bs.tar.gz#/sms/hybridMk

HybridInstrument.h
[View HybridInstrument.h] 
HybridInstrument.m
[View HybridInstrument.m] 
Makefile
 
README
 
cm/
 
hybrid.h
[View hybrid.h] 
hybridMk
 
hybridMk.m
[View hybridMk.m] 
hybridize.c
[View hybridize.c] 
scores/
 

README

file: sms/hybridMk/README


hybridMk is a program that accepts a MusicKit scorefile and outputs a sound file.

Usage: hybridMk <input score file> <output snd file>

hybridMk recognizes the following parameters inside the scorefile:

-sndFile1
	Sound file used as excitation (sound1).

-frameRate (default 100)
	Analisis rate for the STFT (frames/second) of sound1.

-overlapping1 (default 4)
 	Amount of overlapping of the analysis window used for sound1. The actual length of the window in seconds is 1 / ( frameRate * overlapping1).

-overlapping2 (default 4)
	Amount of overlapping of the analysis window used for sound2.

-timeOffset1 (default 0)
	Time offset in seconds for sound1.

-dur1
	Duration in sec. taken from sndFile1. If value is smaler than 1 it takes the whole sound. (this value goes in parenthesis in the scorefile)

-sndFile2
	Sound file used as the hybridizing sound (sound2).

-timeOffset2 (default 0)
	Time offset in sec. for sndFile2.

-dur2 (default total-duration)
	Duration in sec. taken from sndFile2.

-nCoefficients0 (default maximum possible)
	Number of line segments used to approximate the spectrum of sound2 at point 0 of nCoefficientsEnv.

-nCoefficients1 (default maximum possible) 
	Number of line segments used to approximate the spectrum of sound2 at point 1 of nCoefficientsEnv.

-nCoefficientsEnv
	Function to interpolate between nCoefficients0 and nCoefficients1.

-magBalance0 (default 0)
	Magnitude balance between the two sound files at value 0 of magBalanceEnv.

-magBalance1 (default 0)
 	Magnitude balance between the two sound files at value 1 of magBalanceEnv.

-magBalanceEnv (default 1)
	Function to interpolate between magBalance0 and  magBalance1. When only magnitude hybridization is desired, so, no compression parameters are given, the process is done in the time domain and the computation is much faster.

-gain0 (default 0)
	Multiplicative gain for excitation at value 0 of gainEnv. 

-gain1 (default 1) 
	Multiplicative gain for excitation at value 1 of gainEnv. 

-gainEnv (default 1)
	Function to interpolate between gain0 and gain1.

-timeStretch0 (default 0)
	Time stretch value for sound2. Given that the two input sounds can have different durations, an implicit stretching or compression is applied to sound2 in order to have the same number of frames in the two sounds. Therefore the analysis frame-rate used for sound2 is different than the one used for sound1. However when the time-stretch parameter is set, it modifies the implicit stretching. timeStretch0 is the time stretch at point 0 of timeStretchEnv.

-timeStretch1 (default 1)
	time stretch of hybridizing sound at point 1of timeStretchEnv.

-timeStretchEnv (default 1)
	function to interpolate between timeStretch0 and timeStretch1.

-smoothOrder (default 0)
	order of the smoothing filter to use on the spectral envelope.

-compression0Env (default 0)
Before multiplying the magnitude spectra of the two sounds, they are normalized and compressed by applying a compression-envelope as a way to control the relative contribution of each one in the final output. This envelope can have any value between 0 and 2. A value of 0 compresses the corresponding spectrum magnitude point of sound2 and does not modify the spectral value of sound1, therefore the only contributing spectral value is the one of sound2. A value of 2 produces the opposite, and a value of 1 leaves the two spectral magnitude values as they are. compression0Env is the envelope used when compressionIntEnv is at value 0.
	
-compression1Env (default 1)
	 envelope used when compressionIntEnv is at value 1.
	
-compressionIntEnv (default 1)
	Interpolation envelope between compression0Env and compression0Env. When the value is 0 the envelope used is compression0Env, when the value is 1 the envelope used is compression1Env. Values in between result in the interpolation from the two envelopes.

Notes on Envelopes:
Envelopes are formed by (x,y) pairs, being x the relative time, and y the relative amplitude. 
The x range (diference beetween the last (maximal) and first (minimal) x values of the envelope) is applied to the total length of the resulting output sound. 
The y range can also be compressed/expanded using the pairs of parameters formed by two subparameters 0 and 1 (param0, param1), that can be related to these envelopes, and do represent the two values corresponding to y amplitudes of 0 and 1 respectively.

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.