Main Page | Alphabetical List | Class List | Directories | File List | Class Members | File Members

Mini Class Reference

#include <Mini.hh>

List of all members.


Detailed Description

Provides methods for MINI decoding, encoding as well as the binary operations.

Definition at line 50 of file Mini.hh.

Static Public Member Functions

static void set_mini_word (int *noteArray, int k, char *binaryMiniWord1, int noteOffValue, int *size_mem_mpz, int startKey)
 function is used to encapsulate the process of mini encoding NOT WORKING ! ! !
static void ksub_rank (int k, int *a, mpz_t rank)
 encodes a integer array with k elements int a mpz_t value
static void ksub_unrank (int k, int *a, mpz_t rank)
 decodes a mpz_t value into a integer array with k elements.
static int get_size_mem_int (int value)
 returns the size (in Byte) of memory used to store the int value
static int get_bin_digits_int (int value)
 calculates necessary digits to store int value in binary format.
static int get_size_mem_mpz (mpz_t value)
 returns the size (in Byte) of memory used to store mpz_t value
static int get_bin_digits_mpz (mpz_t number)
 calculates necessary digits to store the mpz value in binary format.
static void mpz_2_bin (mpz_t value, int k, int note, char *mem_pointer)
 converts mpz value into a binary format
static void bin_2_mpz (char *mem_pointer, int *k, mpz_t value, int *note)
 converts the value at the location mem_pointer back to mpz_value
static void extract_size (char firstRead, int *size)
 receives a char which holds the size of the mpz value.
static void print_mem (char *mem_pointer, int size_bin)
 prints the binary content at a specific memory location
static void sort_array (int *noteArray, int size)
 sorts a array.
static void print_array (int *noteArray, int size, int startKey)
 prints out a integer array.


Member Function Documentation

void Mini::bin_2_mpz char *  mem_pointer,
int *  k,
mpz_t  value,
int *  note
[static]
 

converts the value at the location mem_pointer back to mpz_value

Parameters:
mem_pointer Points to a char* in memory.
k A integer value containing the amount of voices.
value A mpz value containing the chord code.
note noteOff value
This method converts a given binary format back into k, the size of bytes used for the whole format, the mpz value and the noteOff value.

See also:
bin_2_int()

Definition at line 345 of file Mini.cpp.

Referenced by mini_function().

void Mini::extract_size char  firstRead,
int *  size
[static]
 

receives a char which holds the size of the mpz value.

Parameters:
firstRead The byte which holds the value.
size the size of the whole binary

Definition at line 433 of file Mini.cpp.

Referenced by mini_function().

int Mini::get_bin_digits_int int  value  )  [static]
 

calculates necessary digits to store int value in binary format.

Parameters:
value A integer value.
Returns:
Amount of digits
See also:
get_bin_digits_mpz()

Definition at line 206 of file Mini.cpp.

Referenced by get_size_mem_int(), and mpz_2_bin().

int Mini::get_bin_digits_mpz mpz_t  number  )  [static]
 

calculates necessary digits to store the mpz value in binary format.

Parameters:
number A mpzt number (chord code).
Returns:
Amount of digits
See also:
get_bin_digits_int()

Definition at line 188 of file Mini.cpp.

Referenced by get_size_mem_mpz(), and mpz_2_bin().

int Mini::get_size_mem_int int  value  )  [inline, static]
 

returns the size (in Byte) of memory used to store the int value

Parameters:
value A integer value.
Returns:
Integer value how many bytes necessary to store value.
See also:
get_size_mem_mpz()

Definition at line 177 of file Mini.hh.

References DIGITS_K_DEF, DIGITS_SIZE_DEF, and get_bin_digits_int().

Here is the call graph for this function:

int Mini::get_size_mem_mpz mpz_t  value  )  [inline, static]
 

returns the size (in Byte) of memory used to store mpz_t value

Parameters:
value A integer value.
Returns:
Integer value how many bytes necessary to store value.
See also:
get_size_mem_int()

Definition at line 188 of file Mini.hh.

References DIGITS_K_DEF, DIGITS_SIZE_DEF, and get_bin_digits_mpz().

Referenced by mini_off_function(), mini_on_function(), mpz_2_bin(), and set_mini_word().

Here is the call graph for this function:

void Mini::ksub_rank int  k,
int *  a,
mpz_t  rank
[static]
 

encodes a integer array with k elements int a mpz_t value

Parameters:
k Integer value holding the amount of elements (notes).
a[] Integer array containing the different values (notes)
rank Multiple precision type standing for the chord-code.
See also:
ksub_unrank()

Definition at line 73 of file Mini.cpp.

Referenced by mini_off_function(), mini_on_function(), and set_mini_word().

void Mini::ksub_unrank int  k,
int *  a,
mpz_t  rank
[static]
 

decodes a mpz_t value into a integer array with k elements.

Parameters:
k Integer value holding the amount of elements (notes).
a[] Integer array containing the different values (notes)
rank Multiple precision type standing for the chord-code.
See also:
ksub_rank()

Definition at line 131 of file Mini.cpp.

Referenced by mini_function().

void Mini::mpz_2_bin mpz_t  value,
int  k,
int  note,
char *  mem_pointer
[static]
 

converts mpz value into a binary format

Parameters:
value A mpz value containing the chord code.
k A integer value containing the amount of voices.
note the noteValue of the pressed key
mem_pointer A memory pointer pointing to a certain address.
The method converts a mpz value and the given parameters k, note and the amount of bytes used to display the whole information, into a binary value.

See also:
int_2_bin()

Definition at line 217 of file Mini.cpp.

References DIGITS_K_DEF, DIGITS_SIZE_DEF, get_bin_digits_int(), get_bin_digits_mpz(), and get_size_mem_mpz().

Referenced by mini_off_function(), mini_on_function(), and set_mini_word().

Here is the call graph for this function:

void Mini::print_array int *  noteArray,
int  size,
int  startKey
[static]
 

prints out a integer array.

Parameters:
noteArray A pointer to the memory where the array lies
size The size of the array, how many entries
startKey To print out the values correctly

Definition at line 422 of file Mini.cpp.

Referenced by mini_function(), mini_off_function(), mini_on_function(), and set_mini_word().

void Mini::print_mem char *  mem_pointer,
int  size_bin
[static]
 

prints the binary content at a specific memory location

Parameters:
mem_pointer The location from which the printing should start
size_bin value containing the size (in Byte) of the printed memory

Definition at line 448 of file Mini.cpp.

Referenced by mini_function(), mini_off_function(), mini_on_function(), and set_mini_word().

void Mini::set_mini_word int *  noteArray,
int  k,
char *  binaryMiniWord,
int  noteOffValue,
int *  size_mem_mpz,
int  startKey
[static]
 

function is used to encapsulate the process of mini encoding NOT WORKING ! ! !

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Definition at line 38 of file Mini.cpp.

References DELIMITER, get_size_mem_mpz(), ksub_rank(), mpz_2_bin(), print_array(), print_mem(), and sort_array().

Here is the call graph for this function:

void Mini::sort_array int *  noteArray,
int  size
[static]
 

sorts a array.

Parameters:
noteArray A pointer to the memory where the array lies
size The size of the array, how many entries

Definition at line 403 of file Mini.cpp.

Referenced by mini_off_function(), mini_on_function(), and set_mini_word().


The documentation for this class was generated from the following files:
Generated on Mon Jun 13 22:06:59 2005 for Netmusic by  doxygen 1.4.3