-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
37 changed files
with
659 additions
and
127 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/// Returns the playback position of a Vinyl voice, measured in seconds | ||
/// | ||
/// If the voice has finished playing, this function will return 0 | ||
/// | ||
/// This function will return <undefined> if passed a label name. This function will further | ||
/// return <undefined> for audio played using VinylPlaySimple() | ||
/// | ||
/// @param vinylID | ||
|
||
function VinylPositionGet(_id) | ||
{ | ||
static _idToVoiceDict = __VinylGlobalData().__idToVoiceDict; | ||
|
||
var _voice = _idToVoiceDict[? _id]; | ||
if (is_struct(_voice)) return _voice.__RawPositionGet(); | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/// Sets the playback position of a Vinyl voice | ||
/// | ||
/// If passed a label name, every voice currently assigned to the label will | ||
/// individually have its playback position set paused. This is the same as calling | ||
/// VinylPositionSet() for each individual voice | ||
/// | ||
/// This function CANNOT be used with audio played using VinylPlaySimple() | ||
/// | ||
/// @param vinylID | ||
/// @param position | ||
|
||
function VinylPositionSet(_id, _position) | ||
{ | ||
static _globalData = __VinylGlobalData(); | ||
static _idToVoiceDict = _globalData.__idToVoiceDict; | ||
|
||
var _voice = _idToVoiceDict[? _id]; | ||
if (is_struct(_voice)) return _voice.__RawPositionSet(_position); | ||
|
||
var _label = _globalData.__labelDict[$ _id]; | ||
if (is_struct(_label)) return _label.__RawPositionSet(_position); | ||
|
||
__VinylTrace("Warning! Failed to execute VinylPositionSet() for ", _id); | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
/// Returns an array of names of all definitions for a particular type of Vinyl component | ||
/// | ||
/// The type argument can be one of the follow values: | ||
/// "patterns" | ||
/// "assets" | ||
/// "labels" | ||
/// "effect chains" | ||
/// "knobs" | ||
/// "stacks" | ||
/// | ||
/// @param type | ||
|
||
function VinylSystemArrayOf(_type) | ||
{ | ||
static _globalData = __VinylGlobalData(); | ||
|
||
var _return = []; | ||
|
||
switch(_type) | ||
{ | ||
case "pattern": | ||
case "patterns": | ||
var _array = _globalData.__patternArray; | ||
var _i = 0; | ||
repeat(array_length(_array)) | ||
{ | ||
var _pattern = _array[_i]; | ||
if ((not _pattern.__child) && (_pattern.__patternType != "asset")) array_push(_return, _pattern.__name); | ||
++_i; | ||
} | ||
break; | ||
|
||
case "asset": | ||
case "assets": | ||
var _array = _globalData.__patternArray; | ||
var _i = 0; | ||
repeat(array_length(_array)) | ||
{ | ||
var _pattern = _array[_i]; | ||
if ((not _pattern.__child) && (_pattern.__patternType == "asset")) array_push(_return, audio_get_name(_pattern.__asset)); | ||
++_i; | ||
} | ||
break; | ||
|
||
case "label": | ||
case "labels": | ||
var _array = _globalData.__labelArray; | ||
var _i = 0; | ||
repeat(array_length(_array)) | ||
{ | ||
array_push(_return, _array[_i].__name); | ||
++_i; | ||
} | ||
break; | ||
|
||
case "effect chain": | ||
case "effect chains": | ||
var _array = _globalData.__effectChainArray; | ||
var _i = 0; | ||
repeat(array_length(_array)) | ||
{ | ||
array_push(_return, _array[_i].__name); | ||
++_i; | ||
} | ||
break; | ||
|
||
case "knob": | ||
case "knobs": | ||
var _array = _globalData.__knobArray; | ||
var _i = 0; | ||
repeat(array_length(_array)) | ||
{ | ||
array_push(_return, _array[_i].__name); | ||
++_i; | ||
} | ||
break; | ||
|
||
case "stack": | ||
case "stacks": | ||
var _array = _globalData.__stackArray; | ||
var _i = 0; | ||
repeat(array_length(_array)) | ||
{ | ||
array_push(_return, _array[_i].__name); | ||
++_i; | ||
} | ||
break; | ||
|
||
default: | ||
__VinylError("Return type \"", _type, "\" unhandled"); | ||
break; | ||
} | ||
|
||
return _return; | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/// Returns the callback for execution when a data update occurs | ||
|
||
function VinylUpdateCallbackGet() | ||
{ | ||
static _globalData = __VinylGlobalData(); | ||
return _globalData.__updateCallback; | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.