The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Audio::ScratchLive::Constants - Some information needed by the Audio::ScratchLive module

SYNOPSIS

    use Audio::ScratchLive::Constants;

    Two constants directly usable:
    Audio::ScratchLive::Constants::DB
    Audio::ScratchLive::Constants::CRATE

    Since there are two types of files ScratchLIVE creates for their database of
    information, we need to know which one we're dealing with. 
    This helps us resolve that issue.

    Each type of database has its own information that gets stored that the other
    type does not.  To find out what should be getting stored in each of these
    types of database, we use the accessors available below.

DESCRIPTION

This library provides some constants and some accessor subroutines needed for all types of ScratchLIVE database information.

METHODS

header_default( $key, $type )

The header_default function returns a scalar value representing what I've found to be a default value for the key->value pairs supplied at the beginning of some database files. Upon error it warns and returns 0.

key

Defaults to ''. Looks in the constants for the key matching the SCALAR you provided here and returns its default value.

type

This tells us what type of DB we're dealing with. Since the key->value pairs are different for each type, we need to know what type we're dealing with: Audio::ScratchLive::Constants::DB or Audio::ScratchLive::Constants::CRATE. DB is default

header_description( $key, $type )

The header_description subroutine returns a scalar string value describing what the value of the key->value pair contains in human words. A lot of the key->value pairs don't have descriptions because I haven't yet found out what they're for. I will take all corrections and additions on this. Upon error, it warns and returns 0.

key

Defaults to ''. This is the key of the key->value pair you want a description for.

type

Defaults to Audio::ScratchLive::Constants::DB. The other acceptable value is Audio::ScratchLive::Constants::CRATE

header_keys( $type )

The header_keys method returns a sorted reference to an array of the header field keys for this type of DB. You can then go through the keys and request the value for that given key.

type

Audio::ScratchLive::Constants::DB is default. Audio::ScratchLive::Constants::CRATE is the other choice

header_type( $key, $type )

the header_type method tells you the data type of the value for the given key->value pair. char, int(4), int(1), and string are the possible types returned. Upon error, it warns and returns 0.

key

Defaults to ''. This is the key of the key->value pair you want a data-type for.

type

Defaults to Audio::ScratchLive::Constants::DB. The other acceptable value is Audio::ScratchLive::Constants::CRATE

track_default( $key, $type )

The track_default subroutine returns a scalar value representing what I've found to be a default value for the key->value pairs supplied in the database. Upon error it warns and returns 0.

key

Defaults to ''. Looks in the constants for the key matching the SCALAR you provided here and returns its default value.

type

This tells us what type of DB we're dealing with. Since the key->value pairs are different for each type, we need to know what type we're dealing with: Audio::ScratchLive::Constants::DB or Audio::ScratchLive::Constants::CRATE. DB is default

track_description( $key, $type )

The track_description subroutine returns a scalar string value describing what the value of the key->value pair contains in human words. A lot of the key->value pairs don't have descriptions because I haven't yet found out what they're for. I will take all corrections and additions on this. Upon error, it warns and returns 0.

key

Defaults to ''. This is the key of the key->value pair you want a description for.

type

Defaults to Audio::ScratchLive::Constants::DB. The other acceptable value is Audio::ScratchLive::Constants::CRATE

track_keys( $type )

The track_keys method returns a sorted reference to an array of the field keys for this type of track. You can then go through the keys and request the value for that given key.

type

Audio::ScratchLive::Constants::DB is default. Audio::ScratchLive::Constants::CRATE is the other choice

track_type( $key, $type )

the track_type method tells you the data type of the value for the given key->value pair. char, int(4), int(1), and string are the possible types returned. Upon error, it warns and returns 0.

key

Defaults to ''. This is the key of the key->value pair you want a data-type for.

type

Defaults to Audio::ScratchLive::Constants::DB. The other acceptable value is Audio::ScratchLive::Constants::CRATE

version_default( $type )

The version_default subroutine returns the default version string for either a crate or DB file.

type

Defaults to Audio::ScratchLive::Constants::DB. The other acceptable value is Audio::ScratchLive::Constants::CRATE

SUPPORT

Please visit EFNet #perl for assistance with this module. "genio" is the author.

CAVEATS

Not enough test cases built into the install yet. More to be added.

A lot of other problems probably.

Not enough documentation.

SEE ALSO

    Author's Web site that will eventually contain a cookbook
    L<http://www.cwhitener.org>

    Rane/Serato's ScratchLIVE website with forums
    L<http://www.scratchlive.net>
    
    ScratchTools (Java app)
    L<http://www.scratchtools.de>

    

AUTHORS

Chase Whitener <cwhitener at gmail dot com>

COPYRIGHT

Copyright 2009, Chase Whitener. All rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.