Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
nerrons
purr-data
Commits
898141d6
Commit
898141d6
authored
Mar 09, 2018
by
Jonathan Wilkes
Browse files
fix all compiler errors other than non-existant Buffer type
parent
20eefcc1
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
externals/disis/ADSR.c
View file @
898141d6
...
...
@@ -59,6 +59,11 @@ void stk_ADSR_init(t_stk_ADSR *x)
x
->
sampleRate
=
44100
;
}
t_env_state
stk_ADSR_getState
(
t_stk_ADSR
*
x
)
{
return
x
->
state
;
}
void
stk_ADSR_sampleRateChanged
(
t_stk_ADSR
*
x
,
t_float
newRate
,
t_float
oldRate
)
{
...
...
@@ -67,7 +72,7 @@ void stk_ADSR_sampleRateChanged(t_stk_ADSR *x, t_float newRate,
x
->
releaseRate
=
oldRate
*
x
->
releaseRate
/
newRate
;
}
void
stkADSR_setSampleRate
(
t_stk_ADSR
*
x
,
t_float
newRate
)
void
stk
_
ADSR_setSampleRate
(
t_stk_ADSR
*
x
,
t_float
newRate
)
{
x
->
sampleRate
=
newRate
;
}
...
...
externals/disis/ADSR.h
View file @
898141d6
...
...
@@ -16,13 +16,13 @@
*/
/***************************************************/
/* ADSR envelope states.
/* ADSR envelope states.
*/
typedef
enum
{
ATTACK, /*
!<
Attack */
DECAY
,
/*
!<
Decay */
SUSTAIN
,
/*
!<
Sustain */
RELEASE
,
/*
!<
Release */
IDLE
/*
!<
Before attack / after release */
ATTACK
,
/* Attack */
DECAY
,
/* Decay */
SUSTAIN
,
/* Sustain */
RELEASE
,
/* Release */
IDLE
/* Before attack / after release */
}
t_env_state
;
typedef
struct
_stk_ADSR
{
...
...
@@ -38,6 +38,12 @@ typedef struct _stk_ADSR {
t_float
sampleRate
;
}
t_stk_ADSR
;
/* initialize the struct members to sane values */
void
stk_ADSR_init
(
t_stk_ADSR
*
x
);
/* set the sample rate */
void
stk_ADSR_setSampleRate
(
t_stk_ADSR
*
x
,
t_float
newRate
);
/* Set target = 1, state = ATTACK. */
void
stk_ADSR_keyOn
(
t_stk_ADSR
*
x
);
...
...
@@ -60,7 +66,7 @@ void stk_ADSR_setSustainLevel(t_stk_ADSR *x, t_float level);
void
stk_ADSR_setReleaseRate
(
t_stk_ADSR
*
x
,
t_float
rate
);
/* Set the attack rate based on a time duration (seconds). */
void
stk_ADSR_setAttackTime
(
t_stk_
float
*
x
,
t_float
time
);
void
stk_ADSR_setAttackTime
(
t_stk_
ADSR
*
x
,
t_float
time
);
/* Set the decay rate based on a time duration (seconds). */
void
stk_ADSR_setDecayTime
(
t_stk_ADSR
*
x
,
t_float
time
);
...
...
externals/disis/disis_munger.c
View file @
898141d6
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment