My favorites | Sign in
Project Home Downloads Wiki Issues Source
Checkout   Browse   Changes    
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
package tonfall.util
{
import tonfall.format.IAudioDecoder;

/**
* Defines a sheet of an instrument where keys are stored in a single audio file
*
* [Check /load/piano.mp3 for instance]
*
* @author Andre Michelle
*/
public interface ISoundSheet
{
/**
* @param note The note that should be played
* @return The nearest key availble in sheet
*/
function getNearestKeyIndexByNote( note: int ): int;

/**
* @param keyIndex The index of the key in sheet
* @return The actual frequency of the key
*/
function getFrequencyByKeyIndex( keyIndex: int ): Number;

/**
* @param keyIndex The index of the key in sheet
* @return The start position in samples
*/
function getStartPositionFromKeyIndex( keyIndex: int ): Number;

/**
* @param keyIndex The index of the key in sheet
* @return The end position in samples
*/
function getEndPositionFromKeyIndex( keyIndex: int ): Number;

/**
* @return The decoder where to read the sheet audio
*/
function get decoder(): IAudioDecoder;
}
}

Change log

r105 by andre.michelle on Apr 4, 2011   Diff
Added a couple of comments
Go to: 
Project members, sign in to write a code review

Older revisions

r100 by andre.michelle on Mar 10, 2011   Diff
No need to restrict the implementation
to run every key with same duration.
r99 by andre.michelle on Mar 10, 2011   Diff
Added a very rough demo of a sound
sheet (real instruments samples)
All revisions of this file

File info

Size: 1061 bytes, 43 lines
Powered by Google Project Hosting